Code Monkey home page Code Monkey logo

eopy's Introduction

eopy

Earth Observation for Python. A collection of helper functions and classes to search, download and process earth observation data.

Examples

Enhancement

Here's an example of some basic contrast enhancement (BCET) and decorrelation stretching (DDS) techniques applied to a Landsat-8 false colour composite.

alt text

Pansharpening

This library also includes the SFIM pansharpenning method, here's an example using a Landsat-8 RGB image where the 30 m multispectral bands are pansharpened using the 15 m panchromatic band.

alt text

Access to cloud data

Searching

Here's an example of searching for imagery in the cloud, Landsat-8 and Sentinel-2 are currently supported.

from datetime import datetime, timedelta
from shapely.geometry import Point
from eopy.cloud import Searcher
from eopy.geometry import GeoPolygon

latitude, longitude = 51.507351, -0.127758
search_boundary = GeoPolygon(Point((longitude, latitude)).buffer(0.1), epsg=4326)

searcher = Searcher()
scenes = searcher.search(
    search_boundary, 
    start=datetime.now() - timedelta(days=7),
    end=datetime.now()
)

print(scenes[0])
>>> <Scene: S2A_39GWH_20191122_0 | Cloud: 15.57 | Date: 2019-11-22>

Downloading

from eopy.cloud import Downloader
from eopy.image import Loader

downloader = Downloader("data")
downloader.download(scene=scene, bands=['B8'])

loader = Loader()
image = loader.load('data/LC8202024019319.tif')

print(image.shape)
>>> (15801, 15601)

Stream

It's not always convenient to have to download a whole image if we are only interested in a specific section. Streaming a scene at a particular boundary is much faster than downloading the whole image and allows us to read it directly into memory.

import maptlotlib.pyplot as plt

image = downloader.stream(scene, bands=['B8'], boundary=search_boundary.transform(scene.epsg))

plt.imshow(image.pixels, cmap='Greys')

alt text

eopy's People

Contributors

barneygordon avatar barnabygordon avatar begordon-axelspace avatar uhho avatar

Stargazers

Jinghao Hu avatar David Montero Loaiza avatar  avatar Aaron Zuspan avatar Yi Dong avatar xiangyi wang avatar Ryder avatar Yusin Chen avatar JBayes avatar Michael Andrew Manalili avatar TJ Slezak avatar Panshi Wang avatar  avatar

Watchers

 avatar  avatar

eopy's Issues

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.