Skip to content

AlbertoBarrago/sentinel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sentinel SAR Analysis Tool

A Python tool for fetching and analyzing Synthetic Aperture Radar (SAR) data from Copernicus Sentinel-1. This tool allows for data acquisition based on coordinates, processing the imagery, and applying signal processing techniques to detect subsurface anomalies.

Features

  • Fetch SAR data from Copernicus Open Access Hub or Copernicus Data Space Ecosystem

  • Define areas of interest using geographic coordinates

  • Download and process SAR imagery

  • Apply preprocessing techniques including speckle filtering

  • Detect potential subsurface features using edge detection and morphological operations

  • Visualize results with original data, processed data, and detected features

How to obtain API_KEY from copernicus

export KEYCLOAK_TOKEN=$(curl -s -X POST -H "Content-Type: application/x-www-form-urlencoded" \
  --data 'client_id=<client_id>' \
  --data 'client_secret=<client_secret>' \
  --data 'grant_type=client_credentials' \
  'https://identity.dataspace.copernicus.eu/auth/realms/CDSE/protocol/openid-connect/token' | jq -r .access_token)

Installation

You can use setup.py

python setup.py install

or

pip install -r requirements.txt

Prerequisites

  • Python 3.7+
  • pip (Python package installer)

Setup

  1. Clone this repository:
git clone https://github.com/yourusername/sentinel-sar-analysis.git
cd sentinel-sar-analysis
  1. Set up a virtual environment (recommended):

    Using venv (Python's built-in virtual environment):

    # Create a virtual environment
    python3 -m venv .venv
    
    # Activate the virtual environment
    # On macOS/Linux:
    source .venv/bin/activate
    # On Windows:
    # .venv\Scripts\activate

    Using conda (if you prefer Anaconda/Miniconda):

    # Create a conda environment
    conda create -n sentinel-env python=3.9
    
    # Activate the conda environment
    conda activate sentinel-env
  2. Install the required dependencies:

    pip install -r requirements.txt
  3. Set up environment variables (optional):

    Create a .env file in the project root directory with your Copernicus credentials:

    CLIENT_ID=your_copernicus_client_id
    CLIENT_SECRET=your_copernicus_client_secret
    API_URL=https://catalogue.dataspace.copernicus.eu/api/hub
    

    This step is optional but recommended if you plan to use the example script.

Usage

  1. Run the script:
python sentinel_sar_analysis.py
  1. Enter your Copernicus Open Access Hub credentials when prompted
  2. Specify the area of interest by entering coordinates (or use the default Giza, Egypt coordinates)
  3. Enter the date range for SAR data acquisition
  4. The script will download and analyze the data, then display and save the results

Example

The default coordinates are set to the Giza Plateau in Egypt, which is known for its archaeological significance. The script will search for SAR data in this area and analyze it to detect potential subsurface features.

Notes

  • You need a registered account at the Copernicus Open Access Hub
  • The script downloads SAR data which can be large files (several GB)
  • Processing SAR data is computationally intensive and may take time depending on your hardware
  • The results are saved in a 'data' directory created in the current working directory

About

A contribute for rSynthetic Aperture Radar Doppler Tomography Reveals...

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages