Landsat8image Save

A simple python script that, given a location and a date, uses the Nasa Earth API to show a photo taken by the Landsat 8 satellite. The script must be executed on the command-line.

Project README

GitHub GitHub last commit GitHub file size in bytes GitHub contributors

What does it do?

Given a location and a date, it uses the Nasa Earth API to show a photo taken by the Landsat 8 satellite. The script must be executed on the command-line.

Setup

Before using the script, you must have access to the Nasa's API key. You can quickly get a key at https://api.nasa.gov/. After that, save your key as an environment variable called NASA_API_KEY. Then, you are good to go.

How to use

In the same directory where the script is saved*, run the following code on the command-line:


get_image.py -LAT [latitude] -LON [longitude] -DATE [date] -DIM [dimension] --info --save [filename]


-DATE, -DIM, --info and --save are optional. -DATE defaults to today. -DIM defaults to 0.15.

If --info is provided, then the latitude and longitude you input are written onto the image.

You can save the image with --save [filename].

*You can also add the script path to PATH and run it from anywhere.

Note

If the image can not be retrieved, chances are the coordinates are in the ocean. The Landsat 8 sattelite does not capture ocean images.

Examples

By running the following line

you get this image

By running the following line

you get this image

Open Source Agenda is not affiliated with "Landsat8image" Project. README Source: v0di/landsat8image

Open Source Agenda Badge

Open Source Agenda Rating