This repository contains a basic FastAPI application for processing Sentinel-2 satellite images.
- FastAPI
- Rasterio
- NumPy
- Matplotlib
- PIL
- Endpoint:
/attributes/
- Method: POST
- Description: Upload a Sentinel-2 image file and retrieve its attributes.
- Endpoint:
/thumbnail/
- Method: POST
- Description: Generate a thumbnail image from a Sentinel-2 image file as a PNG.
- Endpoint:
/thumbnail2/
- Method: POST
- Description: Generate a thumbnail image from a Sentinel-2 image file as a PNG.
- Endpoint:
/ndvi/
- Method: POST
- Description: Calculate the Normalized Difference Vegetation Index (NDVI) from a Sentinel-2 image file and apply a color palette.
- Install the required dependencies:
pip install fastapi rasterio numpy Pillow python-multipart uvicorn
. - Start the FastAPI server:
uvicorn main:app --reload
. - Access the endpoints using a tool like API testing tool or go to
http://127.0.0.1:8000/docs
.