Extract the coastline (shoreline) of a river (the Casamance River) through SWOT Level 2 Water Mask Raster Image Data Pro
-
papesamba123
- Posts: 4
- Joined: Wed Jul 03, 2024 9:12 am America/New_York
Extract the coastline (shoreline) of a river (the Casamance River) through SWOT Level 2 Water Mask Raster Image Data Pro
Hello,
My name is Pape Samba DIOP, and I'm a PhD student. My researches are focus on studying and understanding the estuarine hydrodynamics of the Casamance River in southern Senegal.
My question will be if there is any possibility or suggestion to extract the coastline (shoreline) of a river (the Casamance River) through SWOT Level 2 Water Mask Raster Image Data Product, Version 2.0.
https://search.earthdata.nasa.gov/search/granules?p=C2799438271-POCLOUD&pg[0][v]=f&pg[0][id]=SWOT_L2_HR_Raster_100m_UTM28P_N_x_x_x_%3F%3F%3F_197_088F_*&pg[0][gsk]=-start_date&q=SWOT%20level%202%20raster&sb[0]=-16.99365%2C12.44155%2C-14.97217%2C12.97793&fpj=SWOT&fl=2%2B-%2BGeophys.%2BVariables%252C%2BSensor%2BCoordinates&tl=1719996628.846!3!!&lat=12.79011044613847&long=-17.4990234375&zoom=7
Thank you for your understanding
Pape Samba
My name is Pape Samba DIOP, and I'm a PhD student. My researches are focus on studying and understanding the estuarine hydrodynamics of the Casamance River in southern Senegal.
My question will be if there is any possibility or suggestion to extract the coastline (shoreline) of a river (the Casamance River) through SWOT Level 2 Water Mask Raster Image Data Product, Version 2.0.
https://search.earthdata.nasa.gov/search/granules?p=C2799438271-POCLOUD&pg[0][v]=f&pg[0][id]=SWOT_L2_HR_Raster_100m_UTM28P_N_x_x_x_%3F%3F%3F_197_088F_*&pg[0][gsk]=-start_date&q=SWOT%20level%202%20raster&sb[0]=-16.99365%2C12.44155%2C-14.97217%2C12.97793&fpj=SWOT&fl=2%2B-%2BGeophys.%2BVariables%252C%2BSensor%2BCoordinates&tl=1719996628.846!3!!&lat=12.79011044613847&long=-17.4990234375&zoom=7
Thank you for your understanding
Pape Samba
Filters:
-
PODAAC - celiaoued
- Subject Matter Expert

- Posts: 55
- Joined: Fri May 28, 2021 1:30 pm America/New_York
- Has endorsed: 1 time
- Endorsed: 2 times
Re: Extract the coastline (shoreline) of a river (the Casamance River) through SWOT Level 2 Water Mask Raster Image Data
Hello Pape Samba,
What do you mean by extracting the shoreline of a river? (Are you looking for a vector line, land/water mask, or having pixels line the edge?)
You may be interested in this tutorial which includes applying a quality flag to WSE in the raster product: https://podaac.github.io/tutorials/notebooks/datasets/SWOT_Raster_Notebook_local.html
Or, how about using surface water extent from OPERA product? https://podaac.jpl.nasa.gov/dataset/OPERA_L3_DSWX-HLS_V1
What do you mean by extracting the shoreline of a river? (Are you looking for a vector line, land/water mask, or having pixels line the edge?)
You may be interested in this tutorial which includes applying a quality flag to WSE in the raster product: https://podaac.github.io/tutorials/notebooks/datasets/SWOT_Raster_Notebook_local.html
Or, how about using surface water extent from OPERA product? https://podaac.jpl.nasa.gov/dataset/OPERA_L3_DSWX-HLS_V1
-
papesamba123
- Posts: 4
- Joined: Wed Jul 03, 2024 9:12 am America/New_York
Re: Extract the coastline (shoreline) of a river (the Casamance River) through SWOT Level 2 Water Mask Raster Image Data
Hello,
Thank you for your answer.
I'm looking for a vector line of my river. However, I don't use python, I use Qgis instead. Do you have any suggestions for extract the vector line from de the river ?
Kind regards
Pape Samba
Thank you for your answer.
I'm looking for a vector line of my river. However, I don't use python, I use Qgis instead. Do you have any suggestions for extract the vector line from de the river ?
Kind regards
Pape Samba
-
PODAAC - celiaoued
- Subject Matter Expert

- Posts: 55
- Joined: Fri May 28, 2021 1:30 pm America/New_York
- Has endorsed: 1 time
- Endorsed: 2 times
Re: Extract the coastline (shoreline) of a river (the Casamance River) through SWOT Level 2 Water Mask Raster Image Data
Unfortunately, I myself do not know how to extract the vector of Casamance River from the raster product, but I can see if I can learn a method from colleagues.
For other rivers, a vector line can be obtained from the SWOT_L2_HR_RiverSP_2.0 product if the rivers are in the prior river database: https://www.swordexplorer.com/
Example search, using spatial bounding box and continent code in granule name: https://search.earthdata.nasa.gov/search/granules?p=C2799438299-POCLOUD&pg[0][v]=f&pg[0][id]=SWOT_L2_HR_RiverSP_Reach_%3F%3F%3F_%3F%3F%3F_AF*&pg[0][gsk]=-start_date&q=swot%20l2%20hr%20riversp&sb[0]=-17.0376%2C12.35247%2C-15.79395%2C12.8841&tl=1720650197.112!3!!&lat=12.277510454853228&long=-20.52685546875&zoom=6
Example file: https://archive.swot.podaac.earthdata.nasa.gov/podaac-swot-ops-cumulus-protected/SWOT_L2_HR_RiverSP_2.0/SWOT_L2_HR_RiverSP_Reach_015_503_AF_20240526T070036_20240526T070044_PIC0_01.zip
However, I believe the Casamance River is not in the prior river database and that is why it does not appear in the river reach data of the above example file.
For other rivers, a vector line can be obtained from the SWOT_L2_HR_RiverSP_2.0 product if the rivers are in the prior river database: https://www.swordexplorer.com/
Example search, using spatial bounding box and continent code in granule name: https://search.earthdata.nasa.gov/search/granules?p=C2799438299-POCLOUD&pg[0][v]=f&pg[0][id]=SWOT_L2_HR_RiverSP_Reach_%3F%3F%3F_%3F%3F%3F_AF*&pg[0][gsk]=-start_date&q=swot%20l2%20hr%20riversp&sb[0]=-17.0376%2C12.35247%2C-15.79395%2C12.8841&tl=1720650197.112!3!!&lat=12.277510454853228&long=-20.52685546875&zoom=6
Example file: https://archive.swot.podaac.earthdata.nasa.gov/podaac-swot-ops-cumulus-protected/SWOT_L2_HR_RiverSP_2.0/SWOT_L2_HR_RiverSP_Reach_015_503_AF_20240526T070036_20240526T070044_PIC0_01.zip
However, I believe the Casamance River is not in the prior river database and that is why it does not appear in the river reach data of the above example file.
-
papesamba123
- Posts: 4
- Joined: Wed Jul 03, 2024 9:12 am America/New_York
Re: Extract the coastline (shoreline) of a river (the Casamance River) through SWOT Level 2 Water Mask Raster Image Data
Thank you very for feedback
I'll be in touch if you have any news
I'll be in touch if you have any news
-
papesamba123
- Posts: 4
- Joined: Wed Jul 03, 2024 9:12 am America/New_York
Re: Extract the coastline (shoreline) of a river (the Casamance River) through SWOT Level 2 Water Mask Raster Image Data
However, I do have the shape file for the river, so I don't know if it's possible for you to integrate it for future applications.
-
PODAAC - celiaoued
- Subject Matter Expert

- Posts: 55
- Joined: Fri May 28, 2021 1:30 pm America/New_York
- Has endorsed: 1 time
- Endorsed: 2 times
Re: Extract the coastline (shoreline) of a river (the Casamance River) through SWOT Level 2 Water Mask Raster Image Data
Hello,
I have not yet tried this myself with the Casamance River, but it might be worth trying this notebook on the SWOT_L2_HR_PIXCVec_2.0 data that covers Casamance River:
https://podaac.github.io/tutorials/notebooks/datasets/SWOT_PIXC_Area_localmachine.htm
I have not yet tried this myself with the Casamance River, but it might be worth trying this notebook on the SWOT_L2_HR_PIXCVec_2.0 data that covers Casamance River:
https://podaac.github.io/tutorials/notebooks/datasets/SWOT_PIXC_Area_localmachine.htm