diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 00000000..e69de29b diff --git a/404.html b/404.html new file mode 100644 index 00000000..076dd257 --- /dev/null +++ b/404.html @@ -0,0 +1,1128 @@ + + + +
+ + + + + + + + + + + + + + + + + + +Make sure you have downloaded the FES2014 tide model following the guide 'How to Download the Tide Model'
+1.Choose a session
+dnz3_extract_shorelines_10_yr
and using ROI ID_dnz3_datetime12-22-23__09_10_44
C:\development\doodleverse\coastseg\CoastSeg\sessions\dnz3_extract_shorelines_10_yr\ID_dnz3_datetime12-22-23__09_10_44
2.Get the location of the config_gdf.geojson file
+-C
-C "C:\development\doodleverse\coastseg\CoastSeg\sessions\dnz3_extract_shorelines_10_yr\ID_dnz3_datetime12-22-23__09_10_44\config_gdf.geojson"
3.Get the location of the transect_time_series.csv file
+-T
-T "C:\development\doodleverse\coastseg\CoastSeg\sessions\dnz3_extract_shorelines_10_yr\ID_dnz3_datetime12-22-23__09_10_44\transect_time_series.csv"
4.Get the location of the tide_model
+-M
-M "C:\development\doodleverse\coastseg\CoastSeg\tide_model"
5.Select a Beach Elevation
+-E 3.2
6.Select a Beach Slope
+-S 2.1
7.Assemble the command
+1 +2 +3 +4 |
|
8.Run the command
+1.-C (or -c) [CONFIG_FILE_PATH]
+-C "path_to_config_file"
CONFIG_FILE_PATH
: Path to the configuration file. This is the config_gdf.geojson
in the session directory generated when shorelines were extracted2.-T (or -t) [RAW_TIMESERIES_FILE_PATH]
+-T "path_to_timeseries_file"
RAW_TIMESERIES_FILE_PATH
: Path to a csv file containing the time series created by extracting shorelines with coastseg. This timeseries
+ represents the intersection of each transect with the shoreline extracted for a particular date and time. It is not tidally corrected.3.-E (or -e) [REFERENCE_ELEVATION]
+-E 3
4.-S (or -s) [BEACH_SLOPE]
+-S 2
If you didn't install the tide model in the default location you will need to modify the following variables
+5.-P (or -p) [TIDE_PREDICTIONS_FILE_NAME]
+-P "tidal_predictions.csv"
6.-O (or -o) [TIDALLY_CORRECTED_FILE_NAME]
+-O "tidally_corrected_time_series.csv"
7.-R (or -r) [MODEL_REGIONS_GEOJSON_PATH]
+tide_regions_map.geojson
in the scripts
directory-R "c:\coastseg\scripts\tide_regions_map.geojson"
MODEL_REGIONS_GEOJSON_PATH
: Path to the location of the geojson file containing the regions used to create the clipped tide model in the previous steps. This file is typically located in the scripts directory within coastseg. "c:\coastseg\scripts\tide_regions_map.geojson"`8.-M (or -m) [FES_2014_MODEL_PATH]
+-M "c:\coastseg\tide_model"
FES_2014_MODEL_PATH
: Path to the FES 2014 tide model, by default attempts to load from coastseg\tide_model
if you installed the tide_model from
+ step 3 in a different location modify this variable to have the full location to the directory containing the clipped 2014 fes tide model.Use the parameters as described while executing the script. Here's an example usage: +Example 1: Only Required Parameter
+1 +2 |
|
1 |
|
Example 2: All Available Parameters
+1 +2 |
|
1 +2 |
|
The results will be located in the scripts directory where the apply_tidal_correction.py
script is located.
tidal_predictions.csv
: Contains the tide predictions for each datetime in the timeseries csv file given by RAW_TIMESERIES_FILE_PATH
."tidally_corrected_time_series.csv"
: Contains the tidally corrected time series data based on the timeseries csv file given by RAW_TIMESERIES_FILE_PATH
.Thank you DEA-Coastlines for making a guide on how to use pyTMD and pyTMD for making a easy to use script to download the AVISO FES 2014 Model.
+The model_tides
in this code has been modified and the original function was originally written by Robbi Bishop-Taylor for the dea-tools
package https://github.com/GeoscienceAustralia/dea-notebooks/blob/develop/Tools/dea_tools/coastal.py#L466-L473
This guide provides instructions on how to use the CoastSeg API to download imagery, extract shorelines, and apply tide correction.
+1 |
|
Launch the Script
+Navigate to the directory containing your script and run:
+1 |
|
The script performs the following actions:
+Optionally applies tide correction (uncomment the tide correction section if needed).
+Understanding the Script Output:
+The script will download imagery to the specified data folder.
+After completing the imagery download and initial extraction, you can proceed with the second script for further shoreline extraction. +Note: This script should be run after the first one because it loads the 'sample_session1' created by the first script
+1 |
|
Apply Tide Correction (Optional)
+Ensure you have downloaded the tide model as per the prerequisites.
+beach slope
and reference_elevation
for your site.1 |
|
Launch the Script
+Navigate to the directory containing your script and run:
+1 |
|
It performs the following:
+To apply tide correction:
+Ensure you have downloaded the tide model as per the prerequisites.
+Uncomment the tide correction section in each script:
+1 |
|
Replace beach_slope and reference_elevation with the appropriate values for your region of interest. 3. Re-run the script after uncommenting and modifying the tide correction section.
+Remember, tide correction is optional and should be applied based on your specific requirements and the characteristics of the imagery and region of interest.
+ + + + + + + + + + + + + +Thank you for your interest in contributing to CoastSeg we appreciate any contributions. Every +little bit helps, and credit will always be given. +You can contribute in many ways:
+Report bugs at https://github.com/SatelliteShorelines/CoastSeg/issues/new/choose.
+If you are reporting a bug, please include:
+Look through the GitHub issues for bugs. Anything tagged with "bug" and "help wanted" is open to whoever wants to implement it.
+Look through the GitHub issues for features. Anything tagged with "enhancement" and "help wanted" is open to whoever wants to implement it.
+CoastSeg could always use more documentation, whether as part of the official wiki, in docstrings, or even updates to the readme. Submit an issue with your updated documentation and our team will merge it in and credit you.
+The best way to send feedback is to file an issue at https://github.com/SatelliteShorelines/CoastSeg/issues/new/choose.
+If you are proposing a feature:
+In the activated anaconda environment coastseg_dev
change directories to be in the main coastseg directory. Within the main coastseg directory is a directory named tests
within anaconda prompt use the command cd tests
to change to this directory. Run the command pytest
to run all the tests in the tests
directory
Run the following commands within the coastseg directory.
+1 +2 +3 |
|
Coastseg has a source layout which is the recommend layout for pypi packages. This means all the source code for coastseg is located under the src
(short for source) directory. Within the src
directory is another directory coastseg
, which contains the source code for coastseg. The source code is what provides all the functions that coastseg uses in notebooks located within the main CoastSeg
directory (aka not within the src/coastseg
directory). If you want to make any changes to the functionality of coastseg you will be changing the code within the source directory.
The UI used in the two notebooks is stored within map_UI.py
and models_UI.py
. In these files you will find one class that creates all the buttons, widgets and even a map that coastseg uses. By separating the UI from the source code it makes it easier to make UI changes without having to change the source code.
1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 |
|
CoastSeg has a github action that publishes a new pypi package if the commit is tagged with the version number of the package to release on pypi. +To ensure a consistent and smooth package release process, follow this step-by-step guide. The release procedure centers around tagging the commit properly.
+When you're ready to release a new package, push a commit with a tag that matches one of the following formats:
+Major, minor, and patch versions: v[0-9]+.[0-9]+.[0-9]+
Example: v1.0.3
Alpha versions: v[0-9]+.[0-9]+.[0-9]+a[0-9]+
Beta versions: v[0-9]+.[0-9]+.[0-9]+b[0-9]+
Release candidate versions: v[0-9]+.[0-9]+.[0-9]+rc[0-9]+
Development versions: v[0-9]+.[0-9]+.[0-9]+dev[0-9]+
v1.2.0dev1
1 |
|
1 |
|
1 |
|
1 |
|
This will display a list of recent commits with their shortened hash. Identify the commit you want to tag, then tag it using:
+1 |
|
1 |
|
1 |
|
Following these steps ensures that the release process is structured and standardized across different versions and packages.
+ + + + + + + + + + + + + +Ready to contribute? Here's how to set up CoastSeg for local development. +This guide will walk you through the installation process, testing procedures, and best practices for contributing to CoastSeg.
+Click the fork
button located at the top right of the coastseg repository. This will create a fork copy of the coastseg repository that you can edit on your GitHub account. Learn How to Fork from GitHub Docs
Clone your fork locally:
+git clone your fork of coastseg onto your local computer +
1 |
|
Create an Anaconda Environment for CoastSeg Development
+We will install the CoastSeg package and its development dependencies in this environment.
+1 |
|
1 |
|
Change Directory to the CoastSeg
+Go to the location where CoastSeg was installed on your computer.
+
cd <directory where you have coastseg source code installed>
+
Example: cd c:\users\CoastSeg
+
1 |
|
Install CoastSeg locally as a pip editable installation +
1 |
|
This command reads the required dependencies from CoastSeg's pyproject.toml
file and installs them within your anaconda environment.
CoastSeg
directory that contains the pyproject.toml
file otherwise this command will fail because pip won't find the pyproject.toml
file-e
means create an editable install of the package. This will add the files to the python path on your computer making it possible to find the sub directories of the package.See the official documentation..
means use the current working directory to install
Install Geopandas and JupyterLab Locally
+1 |
|
Install the Development Dependencies +
1 |
|
black
is a python formater that you can run on the code
pytest
is used to automatically run tests on the code
Create a branch for local development:
+1 |
|
Now you can make your changes locally.
+When you're done making changes, use pytest
to check that your changes pass the tests.
1 +2 +3 +4 |
|
Format the code using Black
+ To make your code adhere to python style standards use the black
code formatter to automatically format the code. You'll need to change directories to the src
directory, then to the sub directory coastseg
and run the black
here. If you were to run black
in the main coastseg directory it would not format the code because the code for coastseg is located in directory coastseg>src>coastseg
.
1 +2 +3 +4 |
|
Commit your changes and push your branch to GitHub:
+1 |
|
1 |
|
1 |
|
Submit a pull request through the GitHub website.
+To learn how to load these features in follow the guide at How to Upload Features
+In order to extract shorelines with CoastSeg you will need a reference shoreline. If you have interior and exterior shorelines you will need to select only one reference shoreline and adjust the shoreline buffer so that the other shoreline doesn't get picked up.
+In this example we will be creating a reference Shoreline for Fire Island in New York.
+Use the Line tool in https://geojson.io/ to create a reference shoreline
+Make sure to draw the shoreline with many shoreline points
+This matters because coastseg dilates each point the shoreline consists of to create the reference shoreline buffer
+If you use a very small reference shoreline buffer (<100m) and not enough points your reference shoreline will look like the image below.
+1.Always put the origin (starting point) of the transect on land and the end point on the sea.
+2.Modify the geoJSON file to give each transect a unique "id" (Optional)
+
+
3.Save the a geoJSON file
+1.Use the box tool in https://geojson.io/ to create a ROI
+2.Edit the geojson contents to give each ROI its own ID otherwise CoastSeg will automatically assign them
+This example shows how to do it with a transect but the process is the same for ROIs
+Make your ROI ID follows the format <3 letters 1 number> example : fvk6
+
+
3.Save the a geoJSON file
+ + + + + + + + + + + + + +This guide will walk you through signing up for the necessary account and then choosing between two methods to download and clip the tide model for use in CoastSeg.
+Step 1: Register for an AVISO+ Account
+
+
You have two options to download and clip the tide model: using a Jupyter Notebook (Recommended) or using a Script (Alternative). Choose one based on your comfort level and requirements.
+The easiest way to download and clip the tide model is to use this notebook. Run all the code in the notebook and you're done!
+Download_tide_model.ipynb
in Jupyter Notebook.1 +2 |
|
3.Run Code: Execute all cells in the notebook. The code will guide you through the download and clipping process automatically.
+4.Check Results: Confirm that the model files are correctly downloaded and clipped in the specified directory.
+5.Downloaded Tide Model Contents
+1 +2 +3 |
|
Run Download Script: Execute the aviso_fes_tides.py
script with the necessary parameters, including your AVISO credentials and target directory for the tide model.
⚠️ Enter your AVISO password when prompted. Note that the password won't display as you type. After you have finished typing, press Enter to proceed.
+C:\Users\Sample\coastseg
with the actual location of your CoastSeg directory.1 |
|
clip_and_write_new_nc_files_cmd_line.py
script with the paths to your tide model directory and the regions geojson file.To make the tide predictions compute faster we will clip the model it to various regions across the planet. After we've clipped the model to each region, when we want to predict the tide at a particular latitude and longitude we first figure out which region the point lies within, then we load the tide model we clipped to that region.
+-R or --regions_file
the full path to the regions geojson file. You should find this file tide_regions_map.geojson
in the scripts
-T or --tide_model
the full path to the directory containing the tide model downloadedC:\Users\Sample\coastseg
with the actual location of your CoastSeg directory.1 |
|
Validate: Ensure each region directory under tide_model contains clipped tide model files.
+Each region will have the same format as region0 the full list of files is omitted for brevity.
+1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 |
|
4.Downloaded Tide Model Contents
+If you are running coastseg on a secure network you may need to make the following modifications to your .condarc
file.
CondaValueError: You have chosen a non-default solver backend(libmamba) but it was not recongized
solve:libmamba
ssl_verify
to either True or False depending on your network security.ssl_verify
to True if you ever set it it to False for debugging purposes.⚠️ You must have run the script to download the FES2014 tide model before attempting to correct tides +This script provides utilities for modeling tides and correcting time series data based on tide predictions.
+If the tide model was NOT downloaded to CoastSeg/tide_model
then the tide correction button will NOT work. The tide correction button will try to load the tide model from <CoastSeg location>/tide_model
and an error will occur. Instead follow the instructions in at Option 2: Tide Correction Script
If you downloaded the tide model to a different location follow the instructions at Option 2: Tide Correction Script
+to use the script apply_tidal_correction.py
Ever since coastseg 1.1.0 released you can now use the correct tides
button in coastseg to automatically correct the timeseries. This button will automatically find which files need to be tidally corrected and apply the tidal correction for you.
If the tide model was NOT downloaded to CoastSeg/tide_model
then the tide correction button will NOT work. The tide correction button will try to load the tide model from <CoastSeg location>/tide_model
and an error will occur. Instead follow the instructions in at Option 2: Tide Correction Script
WARNING
+You must have downloaded the tide model to the tide_model
folder within coastseg for this button to work correctly.
Enter the beach slope
+This is the beach slope in meters for the ROI you have selected.
+Enter the beach elevation
+This is the beach elevation in meters for the ROI you have selected.
+Select the ROIs' ids to tidally correct
+Click compute tides and wait a few minutes.
+If you encounter any issues or have any questions please submit an issue at CoastSeg Issues
+⚠️ If the tide model was NOT downloaded to CoastSeg/tide_model
, then you must use the tide correction script.
dnz3_extract_shorelines_10_yr
and using ROI ID_dnz3_datetime12-22-23__09_10_44
C:\development\doodleverse\coastseg\CoastSeg\sessions\dnz3_extract_shorelines_10_yr\ID_dnz3_datetime12-22-23__09_10_44
-C
-C "C:\development\doodleverse\coastseg\CoastSeg\sessions\dnz3_extract_shorelines_10_yr\ID_dnz3_datetime12-22-23__09_10_44\config_gdf.geojson"
-T
-T "C:\development\doodleverse\coastseg\CoastSeg\sessions\dnz3_extract_shorelines_10_yr\ID_dnz3_datetime12-22-23__09_10_44\transect_time_series.csv"
-M
-M "C:\development\doodleverse\coastseg\CoastSeg\tide_model"
-E 3.2
-S 2.1
1 +2 +3 +4 |
|
-C (or -c) [CONFIG_FILE_PATH]
+Description: Path to the configuration file.
+-C "path_to_config_file"
CONFIG_FILE_PATH
: Path to the configuration file. This is the config_gdf.geojson
in the session directory generated when shorelines were extracted
-T (or -t) [RAW_TIMESERIES_FILE_PATH]
+Description: Path to the raw timeseries file.
+-T "path_to_timeseries_file"
RAW_TIMESERIES_FILE_PATH
: Path to a csv file containing the time series created by extracting shorelines with coastseg. This timeseries
+ represents the intersection of each transect with the shoreline extracted for a particular date and time. It is not tidally corrected.
-E (or -e) [REFERENCE_ELEVATION]
+Description: Set the reference elevation value. This is a float number.
+Example: -E 3
-S (or -s) [BEACH_SLOPE]
+-S 2
If you didn't install the tide model in the default location you will need to modify the following variables
+-P (or -p) [TIDE_PREDICTIONS_FILE_NAME]
+Description: File name for saving a csv file containing the tide predictions for each date time in the timeseries provided.
+Example: -P "tidal_predictions.csv"
-O (or -o) [TIDALLY_CORRECTED_FILE_NAME]
+Description: File name for saving the tidally corrected time series csv file.
+Example: -O "tidally_corrected_time_series.csv"
-R (or -r) [MODEL_REGIONS_GEOJSON_PATH]
+Description: Path to the model regions GeoJSON file.
+tide_regions_map.geojson
in the scripts
directory-R "c:\coastseg\scripts\tide_regions_map.geojson"
MODEL_REGIONS_GEOJSON_PATH
: Path to the location of the geojson file containing the regions used to create the clipped tide model in the previous steps. This file is typically located in the scripts directory within coastseg. "c:\coastseg\scripts\tide_regions_map.geojson"`
-M (or -m) [FES_2014_MODEL_PATH]
+-M "c:\coastseg\tide_model"
FES_2014_MODEL_PATH
: Path to the FES 2014 tide model, by default attempts to load from coastseg\tide_model
if you installed the tide_model from
+ step 3 in a different location modify this variable to have the full location to the directory containing the clipped 2014 fes tide model.Use the parameters as described while executing the script. Here's an example usage: +Example 1: Only Required Parameter
+1 +2 |
|
1 |
|
Example 2: All Available Parameters
+1 +2 |
|
1 +2 |
|
The results will be located in the scripts directory where the apply_tidal_correction.py
script is located.
tidal_predictions.csv
: Contains the tide predictions for each datetime in the timeseries csv file given by RAW_TIMESERIES_FILE_PATH
."tidally_corrected_time_series.csv"
: Contains the tidally corrected time series data based on the timeseries csv file given by RAW_TIMESERIES_FILE_PATH
.Thank you DEA-Coastlines for making a guide on how to use pyTMD and pyTMD for making a easy to use script to download the AVISO FES 2014 Model.
+The model_tides
in this code has been modified and the original function was originally written by Robbi Bishop-Taylor for the dea-tools
package https://github.com/GeoscienceAustralia/dea-notebooks/blob/develop/Tools/dea_tools/coastal.py#L466-L473
Extracting the best shorelines requires that only the best imagery is used which means that bad imagery needs to be sorted out. You should filter out bad imagery in data/roi_id/jpg_files/preprocessed/RGB
by moving any bad imagery to a designated subdirectory named 'bad'.
It is important to note that this operation does not delete any TIFF files, but rather helps to improve the efficiency of shoreline extraction and enhance the quality of the extracted shorelines. Check out the wiki page about the shoreline extraction process for more information about how to extract shorelines.
+Download data with the SDS_coastsat_classifier.ipynb
and make sure it downloaded to your data
directory within coastseg
+1. Open the data
directory within coastseg
+2. Navigate to the ROI directory
+- If you're not sure which ROI directory you used for a particular session go to the sessions
directory, click the session you are interested in and open the config.json
file. Look for the variable sitename
and the sitename will be in a format similar to ID_yvk1_datetime06-05-23__07_07_42
. This is the name of the ROI directory containing the downloaded data in the data
directory within coastseg
jpg_files>preprocessed>RGB
CoastSeg\data\ID_yvk1_datetime06-05-23__06_57_26\jpg_files\preprocessed\RGB
data/roi_id/jpg_files/preprocessed/RGB
directory has improved the efficiency and quality of the extracted shorelines. Check out the wiki page about the shoreline extraction process for more information about how to extract shorelines.⚠️Make sure you have downloaded the FES2014 tide model following the guide 'How to Download the Tide Model'⚠️
+Ever since coastseg 1.1.0 released you can now use the correct tides
button in coastseg to automatically correct the timeseries. This button will automatically find which files need to be tidally corrected and apply the tidal correction for you.
⚠️ Important ⚠️
+If the tide model was NOT downloaded to CoastSeg/tide_model
then the tide correction button will NOT work. The tide correction button will try to load the tide model from <CoastSeg location>/tide_model
and an error will occur. Instead follow the instructions in at Option 2: Tide Correction Script
WARNING
+You must have downloaded the tide model to the tide_model
folder within coastseg for this button to work correctly.
1.Load a Session
+-- predicted_tides.csv
: contains the tide prediction from the tide model for each transect end point for each date a shoreline was detected on it.
-- tidally_corrected_transect_time_series_points.geojson
: contains the tidally_corrected shoreline transect intersections points from raw_transect_time_series_merged.csv
.
-- tidally_corrected_raw_transect_time_series_vectors.geojson
: contains the tidally_corrected shoreline transect intersections from raw_transect_time_series_merged.csv
. as vectors by connecting points that occurred on the same date together.
2.Enter the beach slope
+3.Enter the beach elevation
+3.Select the ROIs' ids to tidally correct
+-- You should see some extracted shorelines on the map if you don't then the ROI ID won't appear in the dropdown
+4.Click 'Correct Tides' and wait a few minutes.
+If you encounter any issues or have any questions please submit an issue at CoastSeg Issues
+⚠️ If the tide model was NOT downloaded to CoastSeg/tide_model
, then you must use the tide correction script.
1.Choose a session
+dnz3_extract_shorelines_10_yr
and using ROI ID_dnz3_datetime12-22-23__09_10_44
C:\development\doodleverse\coastseg\CoastSeg\sessions\dnz3_extract_shorelines_10_yr\ID_dnz3_datetime12-22-23__09_10_44
2.Get the location of the config_gdf.geojson file
+-C
-C "C:\development\doodleverse\coastseg\CoastSeg\sessions\dnz3_extract_shorelines_10_yr\ID_dnz3_datetime12-22-23__09_10_44\config_gdf.geojson"
3.Get the location of the transect_time_series.csv file
+-T
-T "C:\development\doodleverse\coastseg\CoastSeg\sessions\dnz3_extract_shorelines_10_yr\ID_dnz3_datetime12-22-23__09_10_44\transect_time_series.csv"
4.Get the location of the tide_model
+-M
-M "C:\development\doodleverse\coastseg\CoastSeg\tide_model"
5.Select a Beach Elevation
+-E 3.2
6.Select a Beach Slope
+-S 2.1
7.Assemble the command
+1 +2 +3 +4 |
|
8.Run the command
+1.-C (or -c) [CONFIG_FILE_PATH]
+-C "path_to_config_file"
CONFIG_FILE_PATH
: Path to the configuration file. This is the config_gdf.geojson
in the session directory generated when shorelines were extracted2.-T (or -t) [RAW_TIMESERIES_FILE_PATH]
+-T "path_to_timeseries_file"
RAW_TIMESERIES_FILE_PATH
: Path to a csv file containing the time series created by extracting shorelines with coastseg. This timeseries
+ represents the intersection of each transect with the shoreline extracted for a particular date and time. It is not tidally corrected.3.-E (or -e) [REFERENCE_ELEVATION]
+-E 3
4.-S (or -s) [BEACH_SLOPE]
+-S 2
If you didn't install the tide model in the default location you will need to modify the following variables
+5.-P (or -p) [TIDE_PREDICTIONS_FILE_NAME]
+-P "tidal_predictions.csv"
6.-O (or -o) [TIDALLY_CORRECTED_FILE_NAME]
+-O "tidally_corrected_time_series.csv"
7.-R (or -r) [MODEL_REGIONS_GEOJSON_PATH]
+tide_regions_map.geojson
in the scripts
directory-R "c:\coastseg\scripts\tide_regions_map.geojson"
MODEL_REGIONS_GEOJSON_PATH
: Path to the location of the geojson file containing the regions used to create the clipped tide model in the previous steps. This file is typically located in the scripts directory within coastseg. "c:\coastseg\scripts\tide_regions_map.geojson"`8.-M (or -m) [FES_2014_MODEL_PATH]
+-M "c:\coastseg\tide_model"
FES_2014_MODEL_PATH
: Path to the FES 2014 tide model, by default attempts to load from coastseg\tide_model
if you installed the tide_model from
+ step 3 in a different location modify this variable to have the full location to the directory containing the clipped 2014 fes tide model.Use the parameters as described while executing the script. Here's an example usage: +Example 1: Only Required Parameter
+1 +2 |
|
1 |
|
Example 2: All Available Parameters
+1 +2 |
|
1 +2 |
|
The results will be located in the scripts directory where the apply_tidal_correction.py
script is located.
tidal_predictions.csv
: Contains the tide predictions for each datetime in the timeseries csv file given by RAW_TIMESERIES_FILE_PATH
."tidally_corrected_time_series.csv"
: Contains the tidally corrected time series data based on the timeseries csv file given by RAW_TIMESERIES_FILE_PATH
.Thank you DEA-Coastlines for making a guide on how to use pyTMD and pyTMD for making a easy to use script to download the AVISO FES 2014 Model.
+The model_tides
in this code has been modified and the original function was originally written by Robbi Bishop-Taylor for the dea-tools
package https://github.com/GeoscienceAustralia/dea-notebooks/blob/develop/Tools/dea_tools/coastal.py#L466-L473
1.transects_swap_points.py
+config_gdf.geojson
and swaps the origin & end point for each transect.reversed_transects.geojson
) are saved to the scripts directory2.shorten_transects.py
+shortened_transects.geojson
) are saved to the scripts directory1. Open Anaconda Prompt
+2. Navigate to the Scripts Directory
+1 +2 |
|
1 |
|
1. Example: Use config_gdf.geojson +To run the script named transects_swap_points.py, you can execute:
+1 |
|
2. Example: Use transects.geojson
+1 |
|
Example 1: Shorten the transects by 500m
+-s
shorten the length of the transect by 500 meters by moving the origin seaward1 |
|
Example 2: Shorten the transects by 500m from the origin and lengthen by 100m from the seaward point
+-s
shorten the length of the transect by 500 meters by moving the origin towards the end point
-l
lengthen the length of the transect by 100 meters by moving the end point more seaward
1 |
|
Example 3: Shorten the transects by 500m from the origin and lengthen by 100m from the seaward point and save to shortened_transects2.geojson
+-s
shorten the length of the transect by 500 meters by moving the origin towards the end point
-l
lengthen the length of the transect by 100 meters by moving the end point more seaward
-o
save the new transects to file "shortened_transects2.geojson"
1 |
|
For most scripts, you can get a description of the available options and how to use them by using the -h or --help flag:
+1 |
|
Or:
+1 |
|
You can also open the script in any text editor or IDE like Notepad++, VSCode, or similar to view the documentation.
+ + + + + + + + + + + + + +Running Python scripts using the Anaconda Prompt can be an efficient way to execute your scripts, especially when using libraries that are available in your Anaconda environment. Here's a step-by-step guide to help you run Python scripts using the Anaconda Prompt:
+1.transects_swap_points.py
+config_gdf.geojson
and swaps the origin & end point for each transect.reversed_transects.geojson
) are saved to the scripts directory2.shorten_transects.py
+shortened_transects.geojson
) are saved to the scripts directory3.get_transects_points.py
+config_gdf.geojson
and creates two geojson files origin_points.geojson
containing the origin point & end_points.geojson
for each transect.4.georeference_jpgs.py
+5.preview_images_for_dates.py
+results.json
1 +2 |
|
Replace path_to_your_directory with the location where the coastseg directory is located on your machine.
+1 |
|
Example: +To run the script named transects_swap_points.py, you can execute:
+1 |
|
For most scripts, you can get a description of the available options and how to use them by using the -h or --help flag:
+1 |
|
Or:
+1 |
|
Most well-maintained scripts include a header comment or a docstring at the beginning of the file that provides a brief overview of the script's purpose, usage, and available options. You can open the script in any text editor or IDE like Notepad++, VSCode, or similar to view this documentation.
+1 |
|
1 |
|
This script georeferences JPEG images using the georeferencing information available in corresponding TIFF images. Georeferencing provides spatial location information to images, allowing them to be placed at a specific location on the Earth's surface.
+1 |
|
For each specified ROI directory, the script will:
+Save the georeferenced JPEGs in a subdirectory named georeferenced within each subdirectory.
+For example, if your RGB directory contains JPEGs and its path is:
+ path_to_roi_dir1/jpg_files/preprocessed/RGB/
path_to_roi_dir1/jpg_files/preprocessed/RGB/georeferenced/
Georeferenced JPEGs are standard JPEG images with associated spatial data. This spatial data allows the JPEG to be mapped to a specific location on Earth. The georeferencing information usually includes details about the image's projection, coordinates, and resolution. This is crucial for various applications in geographic information systems (GIS), remote sensing, and cartography, enabling the combination of the image with other spatial datasets in a meaningful way.
+ + + + + + + + + + + + + +