This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. So you better cite it.
Welcome to the Google Earth Engine (GGE) Python package, a powerful toolkit designed to simplify the interaction with the Google Earth Engine API. Our focus is on satellite data analysis, providing comprehensive tools to handle data from various satellite sensors, perform advanced band mathematics, and visualize the results.
Harness the power of satellite imagery to explore and analyze the Earth's surface with ease. Whether you're conducting research, working on environmental projects, or developing innovative solutions, GGE offers the tools you need to achieve your goals.
I have not implemeted all fully, but parts works in each folder, i.e., landsat, landcover, etc..
Before using this package, ensure you have the following installed:
- Python 3.8 or higher
- Google Earth Engine Python API
- Need a project that has access to Google Earth Engine, see https://developers.google.com/earth-engine/tutorials/community/intro-to-python-api
To install the package, follow these steps:
-
Clone the repository:
git clone https://github.com/aalling93/gge.git
-
Navigate to the package directory:
cd gge
-
Install the required dependencies:
pip install -r requirements.txt
or even better
pip install -e .
The GGE package provides a simple and intuitive interface for working with satellite data. Here are some examples:
from gge.sensors.landsat import Landsat
# Define the area and time range
area = (35.6895, 139.6917, 35.6895, 139.6917) # Tokyo coordinates
time_range = ('2020-01-01', '2020-12-31')
# Initialize Landsat object
landsat = Landsat(area, time_range)
# Download data
landsat.download_data()
# Display RGB image
landsat.display_rgb(2)
# Set the item type to Surface Reflectance Band 4
landsat.item_type = "SR_B4"
# Access the first item
img, meta = landsat[0]
Likewise you can do
# Set the item type to Surface Reflectance Band 4
landsat.item_type = "EVI"
# Access the first item
img, meta = landsat[0]
and then you get the EVI for image 0...
I have added a single model, for change detection/anomaly detection. It is the SOM model.
It takes a 3D numpy array of, e.g., NDWI images from a region. It then traing a SOM model and finds where the anomlaies are.
Happy analyzing!