All Projects → loicdtx → lsru

loicdtx / lsru

Licence: other
🔍 🌐Query and Order Landsat Surface Reflectance data via ESPA

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to lsru

deck.gl-raster
deck.gl layers and WebGL modules for client-side satellite imagery analysis
Stars: ✭ 60 (+150%)
Mutual labels:  landsat, remote-sensing
awesome-spectral-indices
A ready-to-use curated list of Spectral Indices for Remote Sensing applications.
Stars: ✭ 357 (+1387.5%)
Mutual labels:  landsat, remote-sensing
geeSharp.js
Pan-sharpening in the Earth Engine code editor
Stars: ✭ 25 (+4.17%)
Mutual labels:  landsat, remote-sensing
Bayesian LSP
A Bayesian hierarchical model that quantifies long-term annual land surface phenology from sparse time series of vegetation indices.
Stars: ✭ 32 (+33.33%)
Mutual labels:  landsat, remote-sensing
pylandtemp
Algorithms for computing global land surface temperature and emissivity from NASA's Landsat satellite images with Python.
Stars: ✭ 110 (+358.33%)
Mutual labels:  landsat, remote-sensing
Python-for-Remote-Sensing
python codes for remote sensing applications will be uploaded here. I will try to teach everything I learn during my projects in here.
Stars: ✭ 20 (-16.67%)
Mutual labels:  remote-sensing, multispectral-images
eodag
Earth Observation Data Access Gateway
Stars: ✭ 183 (+662.5%)
Mutual labels:  landsat, remote-sensing
ee extra
A ninja python package that unifies the Google Earth Engine ecosystem.
Stars: ✭ 42 (+75%)
Mutual labels:  landsat, remote-sensing
deepwatermap
a deep model that segments water on multispectral images
Stars: ✭ 81 (+237.5%)
Mutual labels:  landsat, remote-sensing
pylandsat
Search, download, and preprocess Landsat imagery 🛰️
Stars: ✭ 49 (+104.17%)
Mutual labels:  landsat, remote-sensing
land-cover-to-land-use-classification
Satellite image processing pipeline to classify land-cover and land-use
Stars: ✭ 64 (+166.67%)
Mutual labels:  landsat, remote-sensing
spectral
Awesome Spectral Indices for the Google Earth Engine JavaScript API (Code Editor).
Stars: ✭ 68 (+183.33%)
Mutual labels:  landsat, remote-sensing
Landsat578
Very simple API to download Landsat [1-5, 7, 8] data from Google
Stars: ✭ 54 (+125%)
Mutual labels:  landsat, remote-sensing
MIRROR-HUNTER
Who are we? We are the Hunters of all Torrent in this world.🗡️.Fork from SlamDevs
Stars: ✭ 86 (+258.33%)
Mutual labels:  download
ms-convSTAR
[RSE21] Pytorch code for hierarchical time series classification with multi-stage convolutional RNN
Stars: ✭ 17 (-29.17%)
Mutual labels:  remote-sensing
downcloud
Download your own Soundcloud tracks (uncompressed)
Stars: ✭ 22 (-8.33%)
Mutual labels:  download
neural-road-inspector
After a hurricane, roads are often flooded or washed out, making them treacherous for motorists. Using state of the art deep learning methods, I attempted to automatically annotate flooded, washed out, or otherwise severely damaged roads. My goal is create a tool that can help detect and visualize anomalous roads in a simple user interface.
Stars: ✭ 37 (+54.17%)
Mutual labels:  remote-sensing
shipsnet-detector
Detect container ships in Planet imagery using machine learning
Stars: ✭ 30 (+25%)
Mutual labels:  remote-sensing
PttImageSpider
PTT 圖片下載器 (抓取整個看板的圖片,並用文章標題作為資料夾的名稱 ) (使用Scrapy)
Stars: ✭ 16 (-33.33%)
Mutual labels:  download
anikimiapi
A Simple, LightWeight, Statically-Typed Python3 API wrapper for GogoAnime.
Stars: ✭ 15 (-37.5%)
Mutual labels:  download

Landsat-ESPA-util

Interface to USGS and ESPA APIs for Landsat surface reflectance data ordering

https://travis-ci.org/loicdtx/lsru.svg?branch=master Documentation Status

Online doc at lsru.readthedocs.io

Before, downloading Landsat surface reflectance data for a given area meant:

  • Manually querying the sceneIDs on Earth Explorer
  • Saving these lists of sceneIDs to text files
  • Manually uploading these files to ESPA to place the order
  • Downloading the processed data with a download manager

Now, thanks to USGS API, and espa API it can all be done programtically.

Example

Send a spatio-temporal query to the Usgs API

Used to retrieve a list of available scenes metadata

from lsru import Usgs
import datetime

# Define query extent
bbox = (3.5, 43.4, 4, 44)

# Instantiate Usgs class and login
usgs = Usgs()
usgs.login()

# Query the Usgs api to find scene intersecting with the spatio-temporal window
scene_list = usgs.search(collection='LANDSAT_8_C1',
                         bbox=bbox,
                         begin=datetime.datetime(2013,1,1),
                         end=datetime.datetime(2016,1,1),
                         max_results=10,
                         max_cloud_cover=40)

# Extract Landsat scene ids for each hit from the metadata
scene_list = [x['displayId'] for x in scene_list]

Place a processing order to Espa

The scene list can be used to send a processing order to Espa via the Espa API. Many options are available (full scene, pixel resizing, reprojection, cropping).

Order full scenes

from lsru import Espa
from pprint import pprint

# Instantiate Espa class
espa = Espa()

# Place order (full scenes, no reprojection, sr and pixel_qa)
order = espa.order(scene_list=scene_list, products=['sr', 'pixel_qa'])
print(order.orderid)

# [email protected]'

Check current orders status

for order in espa.orders:
    # Orders have their own class with attributes and methods
    print('%s: %s' % (order.orderid, order.status))

# [email protected]: ordered
# [email protected]: complete
# [email protected]: complete
# [email protected]: complete
# [email protected]: complete

Download completed orders. When Espa finishes pre-processing an order, its status changes to complete, we can then download the processed scenes.

for order in espa.orders:
    if order.is_complete:
        order.download_all_complete('/media/landsat/download/dir')

It is also possible order processing with reprojection, cropping, resizing, etc

# Inspect aea projection parameters
pprint(espa.projections['aea'])
# Define projection parameters
proj_params = {'aea': {'central_meridian': 3.8,
                       'datum': 'wgs84',
                       'false_easting': 0,
                       'false_northing': 0,
                       'latitude_of_origin': 43.7,
                       'standard_parallel_1': 43,
                       'standard_parallel_2': 44}}
# Place order
order_meta = espa.order(scene_list=scene_list, products=['sr', 'pixel_qa'],
                        note='cropped order with resampling', projection=proj_params,
                        extent=bbox, resolution=60)

Installation

Activate a virtualenv (optional but preferable) and run:

pip install lsru

Setup

The package requires a configuration file in which usgs credentials are written. By default the file is called ~/.lsru (this can be modified if you want to join this configuration with the configuration of another project) and has the following structure.

[usgs]
username=your_usgs_username
password=your_very_secure_password

Why can't I just retrieve my Landsat data from Earth Explorer, Amazon or Google cloud?

You can but it will be top of atmosphere (TOA) radiance, not surface reflectance. If you aim to have a scientific use of the data, you probably want to have surface reflectance.

The critical part between TOA radiance and surface reflectance is the atmospheric correction. That means that surface reflectance data are corrected for atmospheric effects, therefore providing accurate measurements of the target's spectral properties.

Today (October 2016), there are a few ways to obtain Landsat surface reflectance data (All of them have been processed by LEDAPS, the reference high level Landsat processing tool):

  1. By ordering them via the ESPA system
  • this is what this utility helps you to do
  • ESPA does on demand pre-processing of full (reprojected) scenes or subsets
  • A cloud mask (fmask) and vegetation indices can also be added to the order
  1. By ordering them from Google Earth Engine
  • GEE has ingested the entire ESPA surface reflectance collection to make it available via its platform
  1. By downloading TOA data from any source and processing with a local installation of LEDAPS
  • Not necessarily trivial
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].