Extract landsats files from tar extension, rename all the files and calculate most of the spectral indices.

Overview

LANDASAT_8_9

extractlandsat.py Extract landsats files from tar extension. renamelandsat.py This script helps users of rename the landsat image and focus on the date of the image, and save all the images names as csv file. landsatinices.py Calculate most of the spectral indices. It's worthwhile that all the scripts have help in order to guid the users.

To get the benefits of those scripts the following are the right steps.

1- rename granular using the renamelandsat.py

2- extract Landsat files from tar format extractlandsat.py

3- Landsat indices make most of the calculations landsatindices.py

"Example"

root_path = 'D:/Chapter/landsat/LC08__L2SP_169036_20150402'

dirpath = 'D:/Chapter/landsat/'

band4 = LandSatEightNine(root_path, 4)

band5 = LandSatEightNine(root_path, 5)

band6 = LandSatEightNine(root_path, 6)

band3 = LandSatEightNine(root_path, 3)

ndvi = NDVI(band5.band, band4.band)

output_file_ndvi = dirpath + 'ndvi_9_test.tif'

write_raster(ndvi, band4.band_crs, band4.band_transform, output_file_ndvi)

plot_plot(output_file_ndvi, 'NDVI', 'RdYlGn')

dbi = DBI(band6.band, band3.band, ndvi)

output_file_dbi = dirpath + 'dbi_9_test.tif'

write_raster(dbi, band4.band_crs, band4.band_transform, output_file_dbi)

plot_plot(output_file_dbi, 'DBI' , 'RdYlGn')

savi=SAVI(band4.band, band5.band)

output_file_savi = dirpath + 'savi.tif'

write_raster(savi, band4.band_crs, band4.band_transform, output_file_savi)

plot_plot(output_file_savi, 'SAVI' , 'cividis')

msavi2 = MSAVI2(band5.band, band4.band)

output_file_msavi2 = dirpath + 'msavi2_9_test.tif'

write_raster(msavi2, band4.band_crs, band4.band_transform, output_file_msavi2)

plot_plot(output_file_msavi2, 'MSAVI2' , 'cividis')

ndmi = NDMI(band5.band, band6.band)

output_file_ndmi = dirpath + 'ndmi_9_test.tif'

write_raster(ndmi, band4.band_crs, band4.band_transform, output_file_ndmi)

plot_plot(output_file_ndmi, 'NDMI' , 'RdYlBu')

mndwi = MNDWI(band3.band, band6.band)

output_file_mndwi = dirpath + 'mndwi_9_test.tif'

write_raster(mndwi, band3.band_crs, band3.band_transform, output_file_mndwi)

plot_plot(output_file_mndwi, 'MNDWI' , 'RdYlBu')

bai = BAI(band4.band, band5.band)

output_file_bai = dirpath + 'bai_9_test.tif'

write_raster(bai, band3.band_crs, band3.band_transform, output_file_bai)

plot_plot(output_file_bai, 'BAI' , 'PiYG')

nbri = NBRI(band5.band, band6.band)

output_file_nbri = dirpath + 'nbri_9_test.tif'

write_raster(nbri, band3.band_crs, band3.band_transform, output_file_nbri)

plot_plot(output_file_nbri, 'NBRI' , 'PiYG')

ndbi = NDBI(band6.band, band5.band, ndvi)

output_file_ndbi = dirpath + 'ndbi_9_test.tif'

write_raster(ndbi, band3.band_crs, band3.band_transform, output_file_nbri)

plot_plot(output_file_nbri, 'NBRI' , 'terrain')

B4 = normalizer(root_path, 4)

B3 = normalizer(root_path, 3)

B2 = normalizer(root_path, 2)

B4.plotnormalized()

B3.plotnormalized()

B2.plotnormalized()

b4 = B4.Normalizedband

b3 = B3.Normalizedband

b2 = B2.Normalizedband

color_composite(b4, b3, b2, ' Natural Color 4 3 2', cmap='terrain')

equalized_color_composite(b4, b3, b2, ' Natural Color 4 3 2', cmap='terrain')

print(band4.band_name)

print(band4.band_transform)

print(band4.raster_img)

print(band4.band_crs)

print(band4.band_shape)

print(band4.band_profile)

You might also like...

A code that calculates the uncertainty of the DMM for you! No need to calculate all those uncertainties yourself anymore.

ABOUT THE MULTIMETER-UNCERTAINTY-SIMULATION CODE first of all, the digital multimeter this can be used for is the DMM TTi 1604. If you use another mul

Sep 20, 2022

A small tool to rename IEEE magazines and more.

Magazine Renamer What? A small tool to rename IEEE magazines and more. Why? As I plan to slim down what I store, and organize the remaining files, I w

Nov 3, 2022

Use Gitlab API to rename branches and help with bulk operations (eg. `master` - `main` migration)

gitlab-bulk-branch-rename Use Gitlab API to rename branches and help with bulk operations (eg. master - main migration) Note: Unless a group id is pa

Sep 2, 2022

This is a PowerFull Telegram File Rename and thumbnail & caption Changer Bot with High Speed

ππ˜π‘πŽ π‘π„ππ€πŒπ„ ππŽπ“ Telegram File Renamer Bot DEPLOYEMENT SUPPORT Deploy To Heroku Deploy To Railway Deploy To Oktecto Configs TG_BOT_TOKEN -

Nov 28, 2022

This is a PowerFull Telegram File Rename and thumbnail & caption Changer Bot with High Speed.

This is a PowerFull Telegram File Rename and thumbnail & caption Changer Bot with High Speed.

ππ˜π‘πŽ π‘π„ππ€πŒπ„ ππŽπ“ πŸ…‘πŸ…”πŸ…ŸπŸ…ž πŸ…’πŸ…£πŸ…πŸ…£πŸ…’ SAME BOT (official rename bot) πŸ€– πŸ€– DEPLOYEMENT SUPPORT Deploy To Heroku Deploy To Railway Configs B

Oct 4, 2022

A way to rename subtitles in nested folders. Useful for legal torrenting.

subtitle-renamer-scripts A way to rename subtitles in nested folders. Useful for legal torrenting. Usage Just execute the script with the file path as

Nov 24, 2022

πŸ“ Simple & High Speed Telegram File Rename Bot πŸ€– For only personal use

Simple-Rename-Bot πŸ“ Simple & High Speed Telegram File Rename Bot For only personal use How To Deploy Deployment Support Heroku Railway BotFather Comm

Nov 12, 2022

Zipping files is the most convenient way to save on disk space and transfer files using less bandwidth

Zipping files is the most convenient way to save on disk space and transfer files using less bandwidth. You can even ZIP a file and password protect it for better protection, but what happens when you forget a ZIP password? Unzipping a password-protected ZIP file without its password is a challenging job without specialized tools.

Oct 9, 2022

Source Code and Datasets for "A Deep-Shallow Fusion Network with Multi-Detail Extractor and Spectral Attention for Hyperspectral Pansharpening, IEEE J-STARS, 2022"

Source Code and Datasets for

Hyper-DSNet - Source Codes and Datasets for Hyperspectral Pansharpening in Deep Learning Homepage: https://liangjiandeng.github.io/ Code for the pape

Nov 17, 2022
Owner
Dr. Falah Fakhri
Radar and Optical Remote Sensing.
Dr. Falah Fakhri
In this repository dedicated to physics you will find various python codes to calculate for example: Bullet motion Centripetal acceleration Pendulum How to calculate height Free fall

Physics In this repository dedicated to physics you will find various python codes to calculate for example: Bullet motion Centripetal acceleration Pe

Matte 1 Jun 18, 2022
Rename all files in a directory with random numbers.

Rename all files in a directory with random numbers. Usage git clone https://github.com/jNaimXIII/RandomFileRenames - Clone the repository. mkdir -p ~

Jannatin Naim 0 Nov 11, 2022
RedDrop is a quick and easy web server for capturing and processing encoded and encrypted payloads and tar archives.

RedDrop Exfil Server Check out the accompanying MaverisLabs Blog Post Here! RedDrop Exfil Server is a Python Flask Web Server for Penetration Testers,

null 53 Nov 1, 2022
A Python and R blend for processing Sentinel-1 images, getting SAR-based vegetation indices, and sampling raster

This repository contains a pipeline blending Python and R features, first to: download, preprocess, and compute Sentinel-1 SAR vegetation indices (all in Python); following for image sampling in R.

Erli Pinto dos Santos 17 Nov 13, 2022
An Unofficial Python version of Mdisk API wrapper. Used to convert and rename Mdisk Files.

Mdisky An Unofficial Python version of Mdisk API wrapper Β· Report Bug Β· Usage Β· Reference Mdisky An Unofficial Python version of Mdisk API wrapper. Us

Kevin 10 Oct 26, 2022
A script to batch rename files, so that the filename contains the file's modification date and time

About this script Some applications generate files that have a random string as a name. e.g this happens with the images downloaded through Viber. If

null 1 Sep 11, 2022
A library for building and serving multi-node distributed faiss indices.

About Distributed faiss index service. A lightweight library that lets you work with FAISS indexes which don't fit into a single server memory. It fol

Meta Research 162 Nov 25, 2022
Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target.

Approach: The idea is to count the elements with remainders when divided by x, i.e 0 to x-1, each remainder separately. Suppose we have x as 6, then t

LIGHTNING-FOREVER 1 Aug 11, 2022
Deploys a Trading Bot on different Indian Market Indices using Paper

Deploys a Trading Bot on different Indian Market Indices using Paper Trading feature in TradingView to provide accurate predictions by calculating the Volatility Adjustment Loopback Length to establish potential breakouts.

Harshit Kaushal 1 Jul 20, 2022
The most fresh and updateable Telegram userbot. By one of the most active contibutors to GeekTG

Русская вСрсия страницы Installation VDS installation: Simply run this command out of root: . <(wget -qO- http://gg.gg/get_hikka) Changes ?? Latest Te

Dan Gazizullin 143 Nov 23, 2022