Giter Site home page Giter Site logo

dmjoy / sentinel2_angle_bands Goto Github PK

View Code? Open in Web Editor NEW

This project forked from brazil-data-cube/s2-angs

0.0 0.0 0.0 207 KB

Script to calculate Sentinel-2 (A-B) view_zenith, view_azimuth, sun_zenith and sun_azimuth

License: MIT License

Python 100.00%

sentinel2_angle_bands's Introduction

Sentinel-2 Angle Bands

Generate Sentinel-2 Resampled Angle bands (Solar Azimuth, Solar Zenith, View Azimuth, View Zenith).

This script uses Sentinel-2 L1C products as input to generate angle bands (Solar Azimuth, Solar Zenith, View Azimuth and View Zenith). Originally the angles are provided as a 23x23 grid (5000 m resolution) in MTD_TL.xml file (Inside GRANULE folder). This script resample the angles through bilinear function to a 10 m spatial resolution.

Dependencies

  • Numpy
  • GDAL

Installing via Git

python3 -m pip install git+https://github.com/marujore/sentinel2_angle_bands

or

git clone https://github.com/marujore/sentinel2_angle_bands
cd sentinel2_angle_bands
pip install .

Usage

import s2_angs

#You can indicate a .zip, a .SAFE or the MTD_TL.xml file
s2_angs.gen_s2_ang('/path/to/my/S2_file/S2B_MSIL1C_20191223T131239_N0208_R138_T23KMR_20191223T135458.zip')

Results

Intermediary files (matrix 23x23)

Solar_azimuth_23

Solar_zenith_23

View_azimuth_23

View_zenith_23

Resampled

Solar_azimuth_resampled

Solar_zenith_resample

View_azimuth_resample

View_zenith_resample

Disclaimer

The script may not work on L2A products, since the MTD_TL.xml file is different from L1C.

sentinel2_angle_bands's People

Contributors

marujore avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.