Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
# NASA Space Apps Challenge 2024 [Noida]

#### Team Name -
#### Problem Statement -
#### Team Leader Email -
#### Team Name - Codee
#### Problem Statement - Landsat Reflectance Data
#### Team Leader Email -[email protected]

## A Brief of the Prototype:
What is your solution? and how it works.
Our solution offers real-time access to Landsat satellite reflectance data, aimed at applications like agriculture, environmental monitoring, and urban planning. It integrates a Flask backend to process satellite data and a React frontend for visualization.

How it Works:
Data Processing: The backend processes Landsat reflectance data dynamically, preparing it for visualization.
Visualization: The frontend displays this data on an interactive Leaflet.js map, highlighting the relevant geographical area, along with a Plotly.js graph that visualizes the reflectance values for easy analysis.
Seamless Interaction: Users can interact with the data visually through a simple interface, making satellite data accessible for non-experts in real-time.

## Code Execution Instruction:
Testing the Application:

Open the frontend in your browser, click the "Fetch Data" button to visualize the reflectance data on the map and chart.

*[If your solution is **not** application based, you can ignore this para]

*The Repository must contain your **Execution Plan PDF**.
Binary file added backend/__pycache__/app.cpython-310.pyc
Binary file not shown.
33 changes: 33 additions & 0 deletions backend/app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
from flask import Flask, jsonify
from flask_cors import CORS # Enables communication between frontend and backend
import rasterio # Used to read Landsat data
import numpy as np

app = Flask(__name__)
CORS(app)

@app.route('/get_landsat_data')
def get_landsat_data():
# Specify the path to your Landsat image file (GeoTIFF)
landsat_file_path = 'path/to/your/landsat_image.tif' # Update this path

try:
with rasterio.open(landsat_file_path) as src:
# Read the reflectance data (assuming it's in the first band)
reflectance_data = src.read(1) # Read the first band
reflectance = reflectance_data.flatten().tolist() # Flatten and convert to list

# Get coordinates (this is just an example, modify as needed)
coordinates = [src.bounds.left, src.bounds.bottom]

sample_data = {
'reflectance': reflectance,
'coordinates': coordinates
}

return jsonify(sample_data)
except Exception as e:
return jsonify({'error': str(e)}), 500

if __name__ == '__main__':
app.run(debug=True)
1 change: 1 addition & 0 deletions backend/t
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Loading