### Install EGMS Toolkit on Windows Source: https://github.com/alexisinsar/egmstoolkit/blob/main/README.rst Clone the repository and install the toolkit using pip. Ensure Python 3 and GDAL are installed. ```bash git clone https://github.com/alexisInSAR/EGMStoolkit.git py -m pip3 install -e EGMStoolkit ``` -------------------------------- ### Install EGMS Toolkit on Linux/MacOS Source: https://github.com/alexisinsar/egmstoolkit/blob/main/README.rst Clone the repository and install the toolkit using pip. Ensure Python 3 and GDAL are installed. ```bash git clone https://github.com/alexisInSAR/EGMStoolkit.git pip3 install -e EGMStoolkit ``` -------------------------------- ### Complete Python Workflow Example for EGMS Toolkit Source: https://context7.com/alexisinsar/egmstoolkit/llms.txt This comprehensive example demonstrates the full workflow of the EGMS Toolkit in Python, from fetching burst IDs and detecting regions of interest to downloading, merging, clipping, gridding, and cleaning data. Ensure you replace 'YOUR_EGMS_TOKEN_HERE' with your actual EGMS token and set the desired output directory. ```python from EGMStoolkit.classes import EGMSS1burstIDapi, EGMSS1ROIapi, EGMSdownloaderapi from EGMStoolkit.functions import egmsdatatools TOKEN = 'YOUR_EGMS_TOKEN_HERE' OUTPUT = './Dublin_EGMS' # Step 1 — Burst ID map info = EGMSS1burstIDapi.S1burstIDmap(verbose=True) # Step 2 — ROI detection for L2a, ascending track 1 ROI = EGMSS1ROIapi.S1ROIparameter(egmslevel='L2a', release='2018_2022', verbose=True) ROI.bbox = [-6.427, 53.260, -6.095, 53.418] ROI.createROI() ROI.detectfromIDmap(infoburstID=info, Track_user=[1], Pass_user=['Ascending']) ROI.displaymap(output=f'{OUTPUT}/search_map.jpg') # Step 3 — Download dl = EGMSdownloaderapi.egmsdownloader(verbose=True) dl.updatelist(infoS1ROIparameter=ROI) dl.token = TOKEN dl.download(outputdir=OUTPUT) dl.unzipfile(outputdir=OUTPUT, unzipmode=True, nbworker=2, cleanmode=True) # Step 4 — Merge (remove duplicate burst-overlap points) egmsdatatools.datamergingcsv( infoEGMSdownloader=dl, inputdir=OUTPUT, outputdir=OUTPUT, mode='onlist', paratosave='all', __removeduplicate__=True, verbose=True) # Step 5 — Clip to ROI egmsdatatools.dataclipping( inputdir=OUTPUT, outputdir=OUTPUT, namefile='all', shapefile='bbox.shp', verbose=True) # Step 6 — Interpolate mean_velocity to 100m raster paragrid = { 'Xmin': 3430000, 'Xmax': 3470000, 'Ymin': 3140000, 'Ymax': 3180000, 'xres': 100, 'yres': 100, 'algo': 'invdist:power=2.0', 'variable': 'mean_velocity' } egmsdatatools.datagridding( paragrid=paragrid, inputdir=OUTPUT, outputdir=OUTPUT, verbose=True) # Step 7 — Clean raw data egmsdatatools.removerawdata(inputdir=OUTPUT, forcemode=True, verbose=True) ``` -------------------------------- ### Run EGMS Toolkit from Shell Source: https://github.com/alexisinsar/egmstoolkit/blob/main/README.rst Example command to run the EGMS toolkit from the shell. Requires a temporary token and specifies download parameters like area, date range, and track information. ```bash EGMStoolkit -l L2a,L2b -r 2018_2022 -t XXXXXXXXXXXXXXXXXXXX -b -6.427059639290446,53.2606655698541,-6.0952332730202095,53.41811986118854 -o ./Output_directory --track 1 --pass Ascending --nomerging -noclipping --quiet --clean ``` -------------------------------- ### Install EGMS Toolkit Source: https://context7.com/alexisinsar/egmstoolkit/llms.txt Install the EGMS Toolkit using pip. Ensure Python version is 3.8+ and GDAL is 3.8.0+. ```bash # Linux / macOS git clone https://github.com/alexisInSAR/EGMStoolkit.git pip3 install -e EGMStoolkit # Windows git clone https://github.com/alexisInSAR/EGMStoolkit.git py -m pip3 install -e EGMStoolkit ``` -------------------------------- ### Get EGMS Toolkit Help Source: https://github.com/alexisinsar/egmstoolkit/blob/main/README.rst Use the -h option to display the help message and available command-line arguments for the EGMS toolkit. ```bash EGMStoolkit -h ``` -------------------------------- ### Get EGMS Toolkit Documentation Source: https://github.com/alexisinsar/egmstoolkit/blob/main/README.rst Use the --docs option to access the documentation for the EGMS toolkit directly from the command line. ```bash EGMStoolkit --docs ``` -------------------------------- ### EGMSS1ROIapi.S1ROIparameter.workdirectory Source: https://github.com/alexisinsar/egmstoolkit/blob/main/docs/build/html/api/nameIndex.html Sets or gets the working directory for S1ROIparameter operations. ```APIDOC ## workdirectory ### Description Sets or gets the working directory for S1ROIparameter operations. ### Method (Not specified in source) ### Endpoint (Not specified in source) ### Parameters (None specified in source) ### Request Example (None specified in source) ### Response (None specified in source) ``` -------------------------------- ### EGMSdownloaderapi.egmsdownloader.__init__ Source: https://github.com/alexisinsar/egmstoolkit/blob/main/docs/build/html/api/nameIndex.html Initializes the EGMSdownloader. ```APIDOC ## __init__ ### Description Initializes the EGMSdownloader. ### Method (Not specified in source) ### Endpoint (Not specified in source) ### Parameters (None specified in source) ### Request Example (None specified in source) ### Response (None specified in source) ``` -------------------------------- ### EGMSdownloaderapi.egmsdownloader.__init__ Source: https://github.com/alexisinsar/egmstoolkit/blob/main/docs/build/html/api/EGMStoolkit.classes.EGMSdownloaderapi.egmsdownloader.html Initializes the EGMSdownloader class with optional lists, token, verbose mode, and log settings. ```APIDOC ## __init__ ### Description Initializes the EGMSdownloader class. ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters - **listL2a** (Optional[any]) - Optional list for L2a data. - **listL2alink** (Optional[any]) - Optional list for L2a links. - **listL2b** (Optional[any]) - Optional list for L2b data. - **listL2blink** (Optional[any]) - Optional list for L2b links. - **listL3UD** (Optional[any]) - Optional list for L3UD data. - **listL3UDlink** (Optional[any]) - Optional list for L3UD links. - **listL3EW** (Optional[any]) - Optional list for L3EW data. - **listL3EWlink** (Optional[any]) - Optional list for L3EW links. - **token** (Optional[str]) - User token. Defaults to 'XXXXXXX--XXXXXXX'. - **verbose** (Optional[bool]) - Verbose mode. Defaults to True. - **log** (Optional[Union[str, None]]) - Logging mode. Defaults to None. ``` -------------------------------- ### EGMStoolkit.functions.egmsdatatools.target_crs Source: https://github.com/alexisinsar/egmstoolkit/blob/main/docs/build/html/api/nameIndex.html Gets the target CRS (Coordinate Reference System) from egmsdatatools. ```APIDOC ## EGMStoolkit.functions.egmsdatatools.target_crs ### Description Gets the target CRS (Coordinate Reference System) from egmsdatatools. ### Method target_crs ### Endpoint N/A (Function) ``` -------------------------------- ### Initialize EGMS Downloader Source: https://github.com/alexisinsar/egmstoolkit/blob/main/docs/build/doctrees/nbsphinx/example/example.ipynb Creates an instance of the EGMSdownloader class to prepare for downloading EGMS datasets. A warning is issued if the user token is not correctly configured. ```python downloadpara = EGMSdownloaderapi.egmsdownloader(verbose=False) ``` -------------------------------- ### EGMStoolkit.classes.EGMSS1ROIapi.target_crs Source: https://github.com/alexisinsar/egmstoolkit/blob/main/docs/build/html/api/nameIndex.html Gets the target CRS (Coordinate Reference System) from S1ROIapi. ```APIDOC ## EGMStoolkit.classes.EGMSS1ROIapi.target_crs ### Description Gets the target CRS (Coordinate Reference System) from S1ROIapi. ### Method target_crs ### Endpoint N/A (Function) ``` -------------------------------- ### EGMStoolkit.EGMStoolkitapp.main Source: https://github.com/alexisinsar/egmstoolkit/blob/main/docs/build/html/api/nameIndex.html Main entry point for the EGMStoolkit application. ```APIDOC ## EGMStoolkit.EGMStoolkitapp.main ### Description Main entry point for the EGMStoolkit application. ### Method main ### Endpoint N/A (Application entry point) ``` -------------------------------- ### EGMStoolkit.functions.egmsdatatools.source_crs Source: https://github.com/alexisinsar/egmstoolkit/blob/main/docs/build/html/api/nameIndex.html Gets the source CRS (Coordinate Reference System) from egmsdatatools. ```APIDOC ## EGMStoolkit.functions.egmsdatatools.source_crs ### Description Gets the source CRS (Coordinate Reference System) from egmsdatatools. ### Method source_crs ### Endpoint N/A (Function) ``` -------------------------------- ### EGMStoolkit.classes.EGMSS1ROIapi.source_crs Source: https://github.com/alexisinsar/egmstoolkit/blob/main/docs/build/html/api/nameIndex.html Gets the source CRS (Coordinate Reference System) from S1ROIapi. ```APIDOC ## EGMStoolkit.classes.EGMSS1ROIapi.source_crs ### Description Gets the source CRS (Coordinate Reference System) from S1ROIapi. ### Method source_crs ### Endpoint N/A (Function) ``` -------------------------------- ### EGMSS1ROIapi.S1ROIparameter.__init__ Source: https://github.com/alexisinsar/egmstoolkit/blob/main/docs/build/html/api/nameIndex.html Initializes the S1ROIparameter. ```APIDOC ## __init__ ### Description Initializes the S1ROIparameter. ### Method (Not specified in source) ### Endpoint (Not specified in source) ### Parameters (None specified in source) ### Request Example (None specified in source) ### Response (None specified in source) ``` -------------------------------- ### EGMStoolkit.classes.EGMSdownloaderapi.egmsdownloader.printlist Source: https://github.com/alexisinsar/egmstoolkit/blob/main/docs/build/html/api/nameIndex.html Prints a list of items from the EGMS downloader class. ```APIDOC ## EGMStoolkit.classes.EGMSdownloaderapi.egmsdownloader.printlist ### Description Prints a list of items from the EGMS downloader class. ### Method printlist ### Endpoint N/A (Class method) ``` -------------------------------- ### EGMSS1burstIDapi.S1burstIDmap.__init__ Source: https://github.com/alexisinsar/egmstoolkit/blob/main/docs/build/html/api/nameIndex.html Initializes the S1burstIDmap. ```APIDOC ## __init__ ### Description Initializes the S1burstIDmap. ### Method (Not specified in source) ### Endpoint (Not specified in source) ### Parameters (None specified in source) ### Request Example (None specified in source) ### Response (None specified in source) ``` -------------------------------- ### EGMSdownloader Initialization Source: https://github.com/alexisinsar/egmstoolkit/blob/main/docs/build/html/api/EGMStoolkit.classes.EGMSdownloaderapi.egmsdownloader.html Initializes the EGMSdownloader class with various optional parameters for data storage and configuration. ```APIDOC ## EGMSdownloader Initialization ### Description Initializes the EGMSdownloader class. ### Parameters - **listL2a** (list, Optional): Storage of available data. Defaults to empty. - **listL2alink** (list, Optional): Storage of available data. Defaults to empty. - **listL2b** (list, Optional): Storage of available data. Defaults to empty. - **listL2blink** (list, Optional): Storage of available data. Defaults to empty. - **listL3UD** (list, Optional): Storage of available data. Defaults to empty. - **listL3UDlink** (list, Optional): Storage of available data. Defaults to empty. - **listL3EW** (list, Optional): Storage of available data. Defaults to empty. - **listL3EWlink** (list, Optional): Storage of available data. Defaults to empty. - **token** (str, Optional): User token. Defaults to 'XXXXXXX--XXXXXXX'. - **verbose** (bool, Optional): Verbose output. Defaults to True. - **log** (str or None, Optional): Logging mode. Defaults to None. ``` -------------------------------- ### Import EGMS Toolkit Modules Source: https://github.com/alexisinsar/egmstoolkit/blob/main/docs/build/doctrees/nbsphinx/example/example.ipynb Import the specific classes and functions required for full EGMS toolkit processing. Ensure all listed modules are installed. ```python from EGMStoolkit.classes import EGMSS1burstIDapi from EGMStoolkit.classes import EGMSS1ROIapi from EGMStoolkit.classes import EGMSdownloaderapi from EGMStoolkit.functions import egmsdatatools ``` -------------------------------- ### EGMSdownloader.print Source: https://github.com/alexisinsar/egmstoolkit/blob/main/docs/build/html/api/EGMStoolkit.classes.EGMSdownloaderapi.egmsdownloader.html Prints the current attributes of the EGMSdownloader class instance. ```APIDOC ## EGMSdownloader.print ### Description Prints the class attributes. ### Method `print` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```python # Example usage: # downloader.print() ``` ### Response #### Success Response (200) Returns the `egmsdownloader` class instance. #### Response Example ```python # Returns an instance of the egmsdownloader class ``` ``` -------------------------------- ### Initialize S1burstIDapi Class Source: https://github.com/alexisinsar/egmstoolkit/blob/main/docs/build/html/example/example.html Instantiate the S1burstIDmap class with verbose and logging modes deactivated. This is the standard way to create an instance for general use. ```python info = EGMSS1burstIDapi.S1burstIDmap(verbose=False, log=None) ``` -------------------------------- ### Configure Interpolation Parameters Source: https://github.com/alexisinsar/egmstoolkit/blob/main/docs/src/advexample/adexample1.rst Set up the parameters for the gridding and interpolation process, including the minimum and maximum coordinates, resolution, interpolation algorithm, and variables to be processed. ```python paragrid = dict() paragrid['Xmin'] = np.fix(np.min(Xcoord)/100)*100 paragrid['Ymin'] = np.fix(np.min(Ycoord)/100)*100 paragrid['Xmax'] = np.fix((np.max(Xcoord)/100)+1)*100 paragrid['Ymax'] = np.fix((np.max(Ycoord)/100)+1)*100 paragrid['xres'] = 100 paragrid['yres'] = 100 paragrid['algo'] = 'average:radius1=100:radius2=100:angle=0.0:nodata=-9999' # Alfgorithm used and options paragrid['variable'] = ','.join(paralist) ``` -------------------------------- ### main() Source: https://github.com/alexisinsar/egmstoolkit/blob/main/docs/build/html/api/EGMStoolkit.EGMStoolkitapp.html The main function of the EGMStoolkit application. This function serves as the entry point for the toolkit's operations. ```APIDOC ## main() ### Description Main function ### Signature def main(): ``` -------------------------------- ### EGMStoolkit.classes.EGMSdownloaderapi.egmsdownloader.print Source: https://github.com/alexisinsar/egmstoolkit/blob/main/docs/build/html/api/nameIndex.html Prints information from the EGMS downloader class. ```APIDOC ## EGMStoolkit.classes.EGMSdownloaderapi.egmsdownloader.print ### Description Prints information from the EGMS downloader class. ### Method print ### Endpoint N/A (Class method) ``` -------------------------------- ### EGMSdownloader.printlist Source: https://github.com/alexisinsar/egmstoolkit/blob/main/docs/build/html/api/EGMStoolkit.classes.EGMSdownloaderapi.egmsdownloader.html Prints the list of available EGMS files. Can be used with verbose output. ```APIDOC ## EGMSdownloader.printlist ### Description Prints the list(s) of EGMS files. ### Method `printlist` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters - **verbose** (bool or None, Optional): Verbose if None, use the verbose mode of the job. Defaults to None. ### Request Example ```python # Example usage: # downloader.printlist(verbose=True) ``` ### Response #### Success Response (200) Returns the `egmsdownloader` class instance. #### Response Example ```python # Returns an instance of the egmsdownloader class ``` ``` -------------------------------- ### __version__ Source: https://github.com/alexisinsar/egmstoolkit/blob/main/docs/build/html/api/EGMStoolkit.constants.html Current version of EGMStoolkit. ```APIDOC ## __version__ ### Description Current version ### Type `str` ``` -------------------------------- ### __copyright__ Source: https://github.com/alexisinsar/egmstoolkit/blob/main/docs/build/html/api/EGMStoolkit.constants.html Copyright information for EGMStoolkit. ```APIDOC ## __copyright__ ### Description Copyright ### Type `str` ``` -------------------------------- ### EGMSdownloaderapi.egmsdownloader.printlist Source: https://github.com/alexisinsar/egmstoolkit/blob/main/docs/build/html/api/EGMStoolkit.classes.EGMSdownloaderapi.egmsdownloader.html Prints the lists of EGMS files. ```APIDOC ## printlist ### Description Print the list(s) of EGMS files ### Method Method ``` -------------------------------- ### EGMStoolkit Constants Source: https://github.com/alexisinsar/egmstoolkit/blob/main/docs/build/html/api/EGMStoolkit.constants.html This section details the instance variables available in the EGMStoolkit.constants module. ```APIDOC ## EGMStoolkit.constants Module ### Description This module stores the different EGMStoolkit constants. ### Instance Variables * `__author__` (string) - Main authors of EGMStoolkit. * `__chunksize__` (int) - Chunk size. Can be modified by the user. * `__copyright__` (string) - Copyright information. * `__displayline1__` (string) - String line (1) for display purposes. * `__displayline2__` (string) - String line (2) for display purposes. * `__error__` (string) - Header string for error messages. * `__loggingmode__` (string) - Logging level. Can be modified by the user. Possible values: NOTSET, DEBUG, INFO, WARN, ERROR, CRITICAL. * `__name__` (string) - Name of the Python package. * `__version__` (string) - Current version of the package. * `__warning__` (string) - Header string for warning messages. * `__pathS1map__` (dict) - Mapping for path S1. * `__unlockfoliumtiles__` (bool) - Flag to unlock Folium tiles. ``` -------------------------------- ### EGMStoolkit.usermessage.openingmsg Source: https://github.com/alexisinsar/egmstoolkit/blob/main/docs/build/html/api/nameIndex.html Displays an opening message to the user. ```APIDOC ## EGMStoolkit.usermessage.openingmsg ### Description Displays an opening message to the user. ### Method openingmsg ### Endpoint N/A (Function) ``` -------------------------------- ### Initialize S1burstIDmap Class Source: https://github.com/alexisinsar/egmstoolkit/blob/main/docs/build/doctrees/nbsphinx/example/example.ipynb Instantiate the S1burstIDmap class with verbose and logging modes deactivated. This is useful for creating an instance without excessive output during initialization. ```python info = EGMSS1burstIDapi.S1burstIDmap(verbose=False,log=None) ``` -------------------------------- ### __namePackage__ Source: https://github.com/alexisinsar/egmstoolkit/blob/main/docs/build/html/api/nameIndex.html Constant representing the name of the package. ```APIDOC ## __namePackage__ ### Description Constant representing the name of the package. ### Method (Not specified in source) ### Endpoint (Not specified in source) ### Parameters (None specified in source) ### Request Example (None specified in source) ### Response (None specified in source) ``` -------------------------------- ### __versionPackage__ Source: https://github.com/alexisinsar/egmstoolkit/blob/main/docs/build/html/api/nameIndex.html Constant representing the version of the package. ```APIDOC ## __versionPackage__ ### Description Constant representing the version of the package. ### Method (Not specified in source) ### Endpoint (Not specified in source) ### Parameters (None specified in source) ### Request Example (None specified in source) ### Response (None specified in source) ``` -------------------------------- ### S1ROIparameter Initialization Source: https://github.com/alexisinsar/egmstoolkit/blob/main/docs/build/html/api/EGMStoolkit.classes.EGMSS1ROIapi.S1ROIparameter.html Initializes an S1ROIparameter object with various configuration options. ```APIDOC ## S1ROIparameter.__init__ ### Description Initializes an S1ROIparameter object. ### Method __init__ ### Parameters - **bbox** (Optional[Union[str, None]]) - Optional - Bounding box for the ROI. - **egmslevel** (Optional[str]) - Optional - EGMS level of LOS-displacement data. Defaults to 'L2a'. - **egmsL3component** (Optional[str]) - Optional - EGMS level of 3D-displacement data. Defaults to 'UD'. - **release** (Optional[str]) - Optional - EGMS release code. Defaults to '2019_2023'. - **workdirectory** (Optional[str]) - Optional - Full path of the work directory. Defaults to './'. - **verbose** (Optional[bool]) - Optional - Verbose mode. Defaults to True. - **log** (Optional[Union[str, None]]) - Optional - Logging mode. Defaults to None. ### Return S1ROIparameter class instance. ``` -------------------------------- ### createROI Source: https://github.com/alexisinsar/egmstoolkit/blob/main/docs/build/html/api/EGMStoolkit.classes.EGMSS1ROIapi.S1ROIparameter.html Creates the ROI file based on the current parameters. Verbose logging can be enabled. ```APIDOC ## createROI ### Description Creates the ROI file using the configured parameters. Verbose output can be controlled. ### Method `createROI(self, verbose: Optional[Union[bool, None]] = None)` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) Returns the `S1ROIparameter` class instance. #### Response Example None ``` -------------------------------- ### EGMStoolkit Command-Line Interface Source: https://context7.com/alexisinsar/egmstoolkit/llms.txt The main entry point for the EGMS Toolkit, allowing users to download and process EGMS data via a single shell command. It supports various options for data levels, releases, geographic regions, and processing stages. ```APIDOC ## EGMStoolkit Command-Line Interface The main entry point wraps the full pipeline into a single shell command with options for level, release, token, bounding box, output directory, track/pass filtering, and toggling each processing stage. ### Usage Examples ```bash # Download L2a and L2b data for a bounding box around Dublin (2018-2022 release), track 1 ascending, skip merging and clipping, quiet mode, keep .zip files. EGMStoolkit \ -l L2a,L2b \ -r 2018_2022 \ -t YOUR_EGMS_TOKEN \ -b -6.427059639290446,53.2606655698541,-6.0952332730202095,53.41811986118854 \ -o ./Output_directory \ --track 1 \ --pass Ascending \ --nomerging \ --noclipping \ --quiet \ --clean # Download all L3 UD and EW data for Ireland (country code IE), latest release EGMStoolkit \ -l L3UD,L3EW \ -r 2019_2023 \ -t YOUR_EGMS_TOKEN \ -b IE \ -o ./Output_Ireland # Show all options EGMStoolkit -h # Open the online documentation in the default browser EGMStoolkit --docs ``` ### Key CLI Options | Flag | Description | Default | |------|-------------|---------| | `-l` / `--level` | Data levels: `L2a`, `L2b`, `L3UD`, `L3EW` (comma-separated) | `L2a,L2b` | | `-r` / `--release` | EGMS release: `2015_2021`, `2018_2022`, `2019_2023` | `2019_2023` | | `-t` / `--token` | Temporary user token from EGMS website | required | | `-b` / `--bbox` | Bounding box `W,S,E,N`, country code (e.g. `IE`), or path to shapefile | required | | `-o` / `--outputdir` | Output directory | `Output` | | `--track` | Sentinel-1 relative orbit numbers (comma-separated) | None (all) | | `--pass` | Orbital pass: `Ascending` or `Descending` | None (both) | | `--nodownload` | Skip downloading | False | | `--nounzip` | Skip unzipping | False | | `--unzipworker` | Number of parallel unzip workers | 1 | | `--nomerging` | Skip merging CSV files | False | | `--noclipping` | Skip clipping/cropping | False | | `--clean` | Remove raw downloaded data after processing | False | | `-q` / `--quiet` | Suppress verbose output | False | | `--nolog` | Disable log file (`egmstoolkit.log`) | False | ``` -------------------------------- ### Utility Functions Source: https://github.com/alexisinsar/egmstoolkit/blob/main/docs/build/html/api/all-documents.html Utility functions for checking release information and downloading files. ```APIDOC ## EGMStoolkit.functions.egmsapitools.check_release ### Description Check the release and get the file extension. ### Function EGMStoolkit.functions.egmsapitools.check_release() ## EGMStoolkit.functions.egmsapitools.check_release_fromfile ### Description Check the release and get the file extension, from a file name. ### Function EGMStoolkit.functions.egmsapitools.check_release_fromfile() ## EGMStoolkit.functions.egmsapitools.download_file ### Description Download function. ### Function EGMStoolkit.functions.egmsapitools.download_file() ``` -------------------------------- ### Print Dataset List Verbose Source: https://github.com/alexisinsar/egmstoolkit/blob/main/docs/build/doctrees/nbsphinx/example/example.ipynb Displays the list of available datasets with detailed information. Set verbose=True for comprehensive output, including file names, release information, and script details. This function may also output warnings if user tokens are invalid. ```python downloadpara.printlist(verbose=True) ``` -------------------------------- ### EGMSdownloaderapi.egmsdownloader.print Source: https://github.com/alexisinsar/egmstoolkit/blob/main/docs/build/html/api/EGMStoolkit.classes.EGMSdownloaderapi.egmsdownloader.html Prints the attributes of the EGMS downloader class. ```APIDOC ## print ### Description Print the class attributes ### Method Method ``` -------------------------------- ### Define Region of Interest and Search Parameters Source: https://github.com/alexisinsar/egmstoolkit/blob/main/docs/build/html/advexample/adexample1.html Configure S1ROIapi with EGMS level, bounding box coordinates, and release year. Then, create the ROI and detect data from the ID map based on track and pass. ```python ROIpara = EGMSS1ROIapi.S1ROIparameter(verbose=False) ROIpara.egmslevel = 'L2a' ROIpara.bbox = [-6.427059639290446,53.2606655698541,-6.0952332730202095,53.41811986118854] ROIpara.release = '2018_2022' ROIpara.createROI(verbose=True) ROIpara.detectfromIDmap(info,Track_user=1,Pass_user='Ascending',verbose=True) ROIpara.displaymap(output='fig_search_adexample1.jpg') ``` -------------------------------- ### egmsdownloader Class Source: https://github.com/alexisinsar/egmstoolkit/blob/main/docs/build/html/api/EGMStoolkit.classes.EGMSdownloaderapi.egmsdownloader.html The egmsdownloader class provides functionality for downloading and managing data files. It includes methods for initialization, parameter checking, cleaning, downloading, printing lists, unzipping files, and updating lists. It also exposes various attributes for managing download lists and configuration. ```APIDOC ## Class egmsdownloader ### Description This class handles the downloading and management of data files. It is initialized with various list and link attributes and provides methods for interacting with the download process. ### Methods * `__init__(listL2a, listL2alink, listL2b, listL2blink, ...)`: Initializes the egmsdownloader object. * `checkparameter()`: Checks the validity of parameters. * `clean()`: Cleans up temporary files or data. * `download()`: Initiates the file download process. * `print()`: Prints information or status. * `printlist()`: Prints the contents of a download list. * `unzipfile()`: Unzips a downloaded file. * `updatelist()`: Updates the download list. ### Attributes * `listL2a`: Attribute related to L2a data list. * `listL2alink`: Attribute for L2a data list links. * `listL2b`: Attribute related to L2b data list. * `listL2blink`: Attribute for L2b data list links. * `listL3EW`: Attribute related to L3EW data list. * `listL3EWlink`: Attribute for L3EW data list links. * `listL3UD`: Attribute related to L3UD data list. * `listL3UDlink`: Attribute for L3UD data list links. * `log`: Logging attribute. * `token`: Authentication token attribute. * `verbose`: Verbose output flag. ``` -------------------------------- ### EGMStoolkit Source: https://github.com/alexisinsar/egmstoolkit/blob/main/docs/build/html/api/nameIndex.html Root module for the EGMStoolkit. ```APIDOC ## EGMStoolkit ### Description This is the root module for the EGMStoolkit, providing access to its various submodules and functionalities. ``` -------------------------------- ### EGMSdownloaderapi.egmsdownloader.verbose Source: https://github.com/alexisinsar/egmstoolkit/blob/main/docs/build/html/api/nameIndex.html Enables verbose logging for the EGMS downloader. ```APIDOC ## verbose ### Description Enables verbose logging for the EGMS downloader. ### Method (Not specified in source) ### Endpoint (Not specified in source) ### Parameters (None specified in source) ### Request Example (None specified in source) ### Response (None specified in source) ``` -------------------------------- ### EGMStoolkit.EGMStoolkitapp.OptionParser Source: https://github.com/alexisinsar/egmstoolkit/blob/main/docs/build/html/api/nameIndex.html Parses options for the EGMStoolkit application. ```APIDOC ## EGMStoolkit.EGMStoolkitapp.OptionParser ### Description Parses options for the EGMStoolkit application. ### Method OptionParser ### Endpoint N/A (Class) ``` -------------------------------- ### createROI Source: https://github.com/alexisinsar/egmstoolkit/blob/main/docs/build/html/api/EGMStoolkit.classes.EGMSS1ROIapi.S1ROIparameter.html Creates the ROI file based on the current parameters. ```APIDOC ## createROI ### Description Create the ROI file. ### Method createROI ``` -------------------------------- ### Import CSV Dataset with MATLAB Source: https://github.com/alexisinsar/egmstoolkit/blob/main/docs/build/html/_sources/contrib.rst.txt Use this script to import any .csv dataset into MATLAB. The delimiter and verbose options are optional. ```matlab data = EGMStoolkitimport('EGMS_file.csv','delimiter',';','verbose',true); ``` -------------------------------- ### print Source: https://github.com/alexisinsar/egmstoolkit/blob/main/docs/build/html/api/EGMStoolkit.classes.EGMSS1burstIDapi.S1burstIDmap.html Prints the class attributes. Returns the S1burstIDmap class instance. ```APIDOC ## print ### Description Print the class attributes. ### Returns - S1burstIDmap class instance ``` -------------------------------- ### Initialize S1burstIDmap Manager Source: https://context7.com/alexisinsar/egmstoolkit/llms.txt Initialize the S1burstIDmap class to manage Sentinel-1 Burst ID reference maps. It checks the local cache and downloads the map if not present. Use `downloadfile()` to force a re-download. ```python from EGMStoolkit.classes import EGMSS1burstIDapi # Initialise: checks local cache; auto-downloads if not present info = EGMSS1burstIDapi.S1burstIDmap( verbose=True, # Print progress messages log='run.log' # Optional log file path ) # Force re-download of the latest burst ID map info.downloadfile() # Check which map is currently loaded print(info.pathIDmap) # Example output: /path/to/EGMStoolkit/3rdparty/S1_burstid_20240601 # Print all attributes info.print() ``` -------------------------------- ### openingmsg Source: https://github.com/alexisinsar/egmstoolkit/blob/main/docs/build/html/api/EGMStoolkit.usermessage.html Generates an opening message for the verbose output and logs. ```APIDOC ## openingmsg ### Description Creates an opening message for the verbose and the log. ### Parameters - **namescript** (str) - Name of the EGMStoolkit module - **defname** (str) - Name of the function - **filescript** (str) - Full path of the EGMStoolkit module - **copyright** (str) - Copyright information - **msg** (str) - The opening message content - **log** (str or None) - Log value - **verbose** (bool) - Verbose flag ### Returns - **str** - The formatted opening message ``` -------------------------------- ### __displayline1__ Source: https://github.com/alexisinsar/egmstoolkit/blob/main/docs/build/html/api/EGMStoolkit.constants.html A display string line (1). ```APIDOC ## __displayline1__ ### Description String line (1) ### Type `str` ``` -------------------------------- ### __copyrightPackage__ Source: https://github.com/alexisinsar/egmstoolkit/blob/main/docs/build/html/api/nameIndex.html Constant representing the copyright of the package. ```APIDOC ## __copyrightPackage__ ### Description Constant representing the copyright of the package. ### Method (Not specified in source) ### Endpoint (Not specified in source) ### Parameters (None specified in source) ### Request Example (None specified in source) ### Response (None specified in source) ``` -------------------------------- ### __pathS1map__ Source: https://github.com/alexisinsar/egmstoolkit/blob/main/docs/build/html/api/EGMStoolkit.constants.html Undocumented constant. ```APIDOC ## __pathS1map__ ### Description Undocumented ### Type `any` ``` -------------------------------- ### constants.__displayline1__ Source: https://github.com/alexisinsar/egmstoolkit/blob/main/docs/build/html/api/nameIndex.html Constant for the first display line. ```APIDOC ## __displayline1__ ### Description Constant for the first display line. ### Method (Not specified in source) ### Endpoint (Not specified in source) ### Parameters (None specified in source) ### Request Example (None specified in source) ### Response (None specified in source) ``` -------------------------------- ### __name__ Source: https://github.com/alexisinsar/egmstoolkit/blob/main/docs/build/html/api/EGMStoolkit.constants.html Name of the Python package. ```APIDOC ## __name__ ### Description Name of the Python package ### Type `str` ``` -------------------------------- ### Create ROI Shapefile from Bounding Box Source: https://github.com/alexisinsar/egmstoolkit/blob/main/docs/build/doctrees/nbsphinx/example/example.ipynb Converts the defined bounding box (bbox) into a ROI shapefile, which is required by the toolkit. The default output file name is 'bbox.shp'. Set verbose=False to suppress detailed output. ```python ROIpara.createROI(verbose=False) ``` -------------------------------- ### print Source: https://github.com/alexisinsar/egmstoolkit/blob/main/docs/build/html/api/EGMStoolkit.classes.EGMSS1ROIapi.S1ROIparameter.html Prints the current attributes of the S1ROIparameter class instance. ```APIDOC ## print ### Description Print the class attributes. ### Method print ``` -------------------------------- ### egmstoolkitprint Source: https://github.com/alexisinsar/egmstoolkit/blob/main/docs/build/html/api/EGMStoolkit.usermessage.html Prints a message to the console, considering verbose and log settings. ```APIDOC ## egmstoolkitprint ### Description Print a message for the verbose and the log. ### Parameters * **msg** (str) - Required - Message to print. * **log** (str or None) - Optional - Log value. * **verbose** (bool) - Required - Verbose value. ``` -------------------------------- ### Define Gridding Parameters for Interpolation Source: https://github.com/alexisinsar/egmstoolkit/blob/main/docs/build/html/_sources/example/example.ipynb.txt Create a dictionary to specify parameters for interpolating point data into a raster file. This includes defining the spatial extent, resolution, and the interpolation algorithm. ```python paragrid = dict() paragrid['Xmin'] = 2896000 # Minimal X coordinate in EPGS:3035 paragrid['Ymin'] = 3317250 # Minimal Y coordinate in EPGS:3035 paragrid['Xmax'] = 3359000 # Maximal X coordinate in EPGS:3035 paragrid['Ymax'] = 3745500 # Maximal Y coordinate in EPGS:3035 paragrid['xres'] = 50 # X spatial resolution in EPGS:3035 paragrid['yres'] = 50 # Y spatial resolution in EPGS:3035 paragrid['algo'] = 'average:radius1=50:radius2=50:angle=0.0:nodata=-9999' # Alfgorithm used and options paragrid['variable'] = 'mean_velocity,mean_velocity_std,acceleration,acceleration_std,seasonality,seasonality_std' # paragrid['algo'] = 'invdist:power=2.0:smoothing=0.0:radius1=0.0:radius2=0.0:angle=0.0:max_points=0:min_points=0:nodata=0.0' # paragrid['algo'] = 'invdistnn:power=2.0:radius=1.0:max_points=12:min_points=0:nodata=0' # paragrid['algo'] = 'average:radius1=0.0:radius2=0.0:angle=0.0:min_points=0:nodata=0.0' # paragrid['algo'] = 'nearest:radius1=0.0:radius2=0.0:angle=0.0:nodata=0.0' # paragrid['algo'] = 'linear:radius=-1.0:nodata=0.0' ``` -------------------------------- ### __author__ Source: https://github.com/alexisinsar/egmstoolkit/blob/main/docs/build/html/api/EGMStoolkit.constants.html Main authors of EGMStoolkit. ```APIDOC ## __author__ ### Description Main authors of `EGMStoolkit`. ### Type `str` ``` -------------------------------- ### Download EGMS Data (CLI) Source: https://context7.com/alexisinsar/egmstoolkit/llms.txt Use the EGMStoolkit command-line interface to download EGMS data. Specify data levels, release, token, and bounding box or country code. ```bash # Download L2a and L2b data for a bounding box around Dublin (2018-2022 release), track 1 ascending, skip merging and clipping, quiet mode, keep .zip files. EGMStoolkit \ -l L2a,L2b \ -r 2018_2022 \ -t YOUR_EGMS_TOKEN \ -b -6.427059639290446,53.2606655698541,-6.0952332730202095,53.41811986118854 \ -o ./Output_directory \ --track 1 \ --pass Ascending \ --nomerging \ --noclipping \ --quiet \ --clean # Download all L3 UD and EW data for Ireland (country code IE), latest release EGMStoolkit \ -l L3UD,L3EW \ -r 2019_2023 \ -t YOUR_EGMS_TOKEN \ -b IE \ -o ./Output_Ireland # Show all options EGMStoolkit -h # Open the online documentation in the default browser EGMStoolkit --docs ``` -------------------------------- ### EGMSS1ROIapi.S1ROIparameter.workdirectory Source: https://github.com/alexisinsar/egmstoolkit/blob/main/docs/build/html/api/all-documents.html Instance variable for the full path of the work directory. ```APIDOC ## EGMSS1ROIapi.S1ROIparameter.workdirectory ### Description Full path of the work directory [Default: './'] ### Attribute PUBLIC Instance Variable ``` -------------------------------- ### openingmsg Source: https://github.com/alexisinsar/egmstoolkit/blob/main/docs/build/html/api/EGMStoolkit.usermessage.html Displays an opening message to the user. ```APIDOC ## openingmsg ### Description Display an opening message. ``` -------------------------------- ### EGMStoolkit.classes.EGMSdownloaderapi.egmsdownloader.unzipfile Source: https://github.com/alexisinsar/egmstoolkit/blob/main/docs/build/html/api/nameIndex.html Unzips a file using the EGMS downloader. ```APIDOC ## EGMStoolkit.classes.EGMSdownloaderapi.egmsdownloader.unzipfile ### Description Unzips a file using the EGMS downloader. ### Method unzipfile ### Endpoint N/A (Class method) ``` -------------------------------- ### Run Data Gridding Source: https://github.com/alexisinsar/egmstoolkit/blob/main/docs/build/doctrees/nbsphinx/example/example.ipynb Execute the data gridding process using the defined parameters. Specify input and output directories and the base filename for processed data. ```python egmsdatatools.datagridding(inputdir='./Output',outputdir='./Output',namefile='all',verbose=True,paragrid=paragrid) ``` -------------------------------- ### EGMStoolkitapp Source: https://github.com/alexisinsar/egmstoolkit/blob/main/docs/build/html/api/nameIndex.html Main application class for EGMStoolkit. ```APIDOC ## EGMStoolkitapp ### Description This is the main application class for the EGMStoolkit, likely serving as the entry point or core controller for the toolkit's functionalities. ``` -------------------------------- ### __warning__ Source: https://github.com/alexisinsar/egmstoolkit/blob/main/docs/build/html/api/EGMStoolkit.constants.html Header for warning messages. ```APIDOC ## __warning__ ### Description Header for the warning message ### Type `str` ``` -------------------------------- ### __displayline2__ Source: https://github.com/alexisinsar/egmstoolkit/blob/main/docs/build/html/api/EGMStoolkit.constants.html A display string line (2). ```APIDOC ## __displayline2__ ### Description String line (2) ### Type `str` ``` -------------------------------- ### EGMSdownloaderapi.egmsdownloader.unzipfile Source: https://github.com/alexisinsar/egmstoolkit/blob/main/docs/build/html/api/EGMStoolkit.classes.EGMSdownloaderapi.egmsdownloader.html Unzips the EGMS files. ```APIDOC ## unzipfile ### Description Unzip the EGMS files ### Method Method ``` -------------------------------- ### Define Gridding Parameters Dictionary Source: https://github.com/alexisinsar/egmstoolkit/blob/main/docs/build/doctrees/nbsphinx/example/example.ipynb Create a dictionary to specify parameters for data gridding, including spatial extent, resolution, and the interpolation algorithm. Ensure coordinates are in EPGS:3035. ```python paragrid = dict() paragrid['Xmin'] = 2896000 # Minimal X coordinate in EPGS:3035 paragrid['Ymin'] = 3317250 # Minimal Y coordinate in EPGS:3035 paragrid['Xmax'] = 3359000 # Maximal X coordinate in EPGS:3035 paragrid['Ymax'] = 3745500 # Maximal Y coordinate in EPGS:3035 paragrid['xres'] = 50 # X spatial resolution in EPGS:3035 paragrid['yres'] = 50 # Y spatial resolution in EPGS:3035 paragrid['algo'] = 'average:radius1=50:radius2=50:angle=0.0:nodata=-9999' # Alfgorithm used and options paragrid['variable'] = 'mean_velocity,mean_velocity_std,acceleration,acceleration_std,seasonality,seasonality_std' ``` -------------------------------- ### checkparameter Source: https://github.com/alexisinsar/egmstoolkit/blob/main/docs/build/html/api/EGMStoolkit.classes.EGMSdownloaderapi.egmsdownloader.html Checks the parameters of the EGMSdownloader instance. ```APIDOC ## checkparameter ### Description Check the parameter ### Method `checkparameter(self, verbose: Optional[Union[bool, None]] = None)` ### Parameters - **verbose** (bool or None, Optional): Verbose if None, use the verbose mode of the job. Defaults to None. ### Return `egmsdownloader` class ``` -------------------------------- ### downloadfile Source: https://github.com/alexisinsar/egmstoolkit/blob/main/docs/build/html/api/EGMStoolkit.classes.EGMSS1burstIDapi.S1burstIDmap.html Downloads the available map(s) stored. Returns the S1burstIDmap class instance. ```APIDOC ## downloadfile ### Description Download the available map(s) stored. ### Parameters - **verbose** (bool or None, Optional) - Verbose if None, use the verbose mode of the job [Default: None] ### Returns - S1burstIDmap class instance ``` -------------------------------- ### EGMSS1ROIapi.S1ROIparameter.bbox Source: https://github.com/alexisinsar/egmstoolkit/blob/main/docs/build/html/api/all-documents.html Instance variable for Bbox. ```APIDOC ## EGMSS1ROIapi.S1ROIparameter.bbox ### Description Bbox [Default: `[None](https://docs.python.org/3/library/constants.html#None)`] ### Attribute PUBLIC Instance Variable ``` -------------------------------- ### Initialize ROI Parameter Object Source: https://github.com/alexisinsar/egmstoolkit/blob/main/docs/build/doctrees/nbsphinx/example/example.ipynb Creates an instance of the S1ROIparameter class to define search parameters for EGMS datasets. Set verbose=False to suppress detailed output during initialization. ```python ROIpara = EGMSS1ROIapi.S1ROIparameter(verbose=False) ``` -------------------------------- ### Download and Unzip EGMS Data Source: https://github.com/alexisinsar/egmstoolkit/blob/main/docs/build/html/_sources/advexample/adexample1.rst.txt Configure the EGMS downloader with the prepared region of interest parameters, print the list of files to be downloaded, and then execute the download and unzipping process. ```python downloadpara = EGMSdownloaderapi.egmsdownloader(verbose=False) downloadpara.updatelist(infoS1ROIparameter=ROIpara) downloadpara.printlist(verbose=True) downloadpara.token = 'xxxxxxxxxxxxxxxxxxxx' downloadpara.download(outputdir='./Output') downloadpara.unzipfile(outputdir='./Output') ``` -------------------------------- ### constants.__version__ Source: https://github.com/alexisinsar/egmstoolkit/blob/main/docs/build/html/api/nameIndex.html Constant representing the version of the toolkit. ```APIDOC ## __version__ ### Description Constant representing the version of the toolkit. ### Method (Not specified in source) ### Endpoint (Not specified in source) ### Parameters (None specified in source) ### Request Example (None specified in source) ### Response (None specified in source) ``` -------------------------------- ### __unlockfoliumtiles__ Source: https://github.com/alexisinsar/egmstoolkit/blob/main/docs/build/html/api/EGMStoolkit.constants.html Undocumented boolean constant. ```APIDOC ## __unlockfoliumtiles__ ### Description Undocumented ### Type `bool` ``` -------------------------------- ### dataclipping Source: https://github.com/alexisinsar/egmstoolkit/blob/main/docs/build/html/api/EGMStoolkit.functions.egmsdatatools.html Clips datasets based on input and output directories, a specified file name, and a shapefile for defining the region of interest. It supports optional verbose logging and the use of ogr2ogr for clipping. ```APIDOC ## dataclipping ### Description Clip the datasets ### Parameters #### Path Parameters - **outputdir** (str, Optional) - Output directory. Defaults to './Output'. - **inputdir** (str, Optional) - Input directory. Defaults to './Output'. - **namefile** (str, Optional) - Name of the selected file. Defaults to 'all'. - **shapefile** (str, Optional) - Shapefile of the ROI. Defaults to 'bbox.shp'. #### Query Parameters - **__clipuseogr2ogr__** (bool, Optional) - Use ogr2ogr for clipping. Defaults to False. - **verbose** (bool, Optional) - Verbose output. Defaults to True. - **log** (str or None, Optional) - Log file path. Defaults to None. ``` -------------------------------- ### S1ROIparameter.loadIDlistL2 Source: https://github.com/alexisinsar/egmstoolkit/blob/main/docs/build/html/api/EGMStoolkit.classes.EGMSS1ROIapi.S1ROIparameter.html Loads L2a/L2b search results from a specified file. This method is useful for initializing the ROI parameter object with pre-existing search data. ```APIDOC ## loadIDlistL2 ### Description Loads the L2a/L2b search results from a file. ### Method `loadIDlistL2(self, input: Optional[str] = 'egmslist.pkl', verbose: Optional[Union[bool, None]] = None)` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters - **input** (str or None) - Optional - File to load search results from. Defaults to 'egmslist.pkl'. - **verbose** (bool or None) - Optional - Controls the verbosity of the loading process. If None, uses the job's default verbose mode. ``` -------------------------------- ### EGMStoolkit.classes.EGMSdownloaderapi.egmsdownloader.log Source: https://github.com/alexisinsar/egmstoolkit/blob/main/docs/build/html/api/nameIndex.html Logs information within the EGMS downloader class. ```APIDOC ## EGMStoolkit.classes.EGMSdownloaderapi.egmsdownloader.log ### Description Logs information within the EGMS downloader class. ### Method log ### Endpoint N/A (Class method) ```