AgroVision is a powerful satellite imagery analysis feature for the SmartAgroX platform that helps farmers monitor crop health using NDVI (Normalized Difference Vegetation Index) data derived from satellite imagery in real-time.
- Live Satellite Data: Connects to Sentinel Hub and Planet APIs to fetch real-time satellite imagery
- Automatic Updates: Configurable auto-refresh settings to keep data current
- Intelligent Caching: Optimizes API usage with smart caching strategies
- Offline Resilience: Falls back to cached data when connectivity is limited
The AgroVision frontend is built with React and consists of several key components:
- AgroVision.tsx: Main page component with farm selection, date controls, and real-time refresh options
- SatelliteMap.tsx: Interactive map component showing NDVI overlays on satellite imagery
- NDVIAnalytics.tsx: Data visualization and analytics for NDVI time series data
- ndviService.ts: Service layer that processes and caches satellite data
- satelliteApi.ts: API integration layer for Sentinel Hub and Planet APIs
AgroVision integrates with multiple satellite data providers:
- Sentinel Hub: Primary source for Sentinel-2 satellite imagery with NDVI calculation
- Planet: Optional high-resolution imagery source for enhanced analysis
- OpenWeatherMap: Weather data correlation with vegetation health
To use AgroVision with real-time satellite data, you'll need:
-
API Keys: Create accounts and obtain API keys from:
- Sentinel Hub
- Planet (optional for higher resolution)
- OpenWeatherMap (for weather correlation)
-
Environment Setup: Create a
.envfile with the following variables:VITE_SENTINEL_HUB_API_KEY=your_sentinel_hub_api_key VITE_SENTINEL_HUB_INSTANCE_ID=your_instance_id VITE_PLANET_API_KEY=your_planet_api_key VITE_MAPBOX_ACCESS_TOKEN=your_mapbox_token VITE_OPENWEATHER_API_KEY=your_openweather_api_key -
Install Dependencies: Run
npm installto install all required packages
- Create a farm with boundary polygons in the SmartAgroX platform
- Access AgroVision at
/agrovisionin the web app - Select a farm and date to analyze
- Toggle auto-refresh for continuous updates
- Click on fields to analyze specific areas
- View NDVI analytics and time series data
- API Rate Limits: Be mindful of API usage limits from satellite providers
- Caching Strategy: Data is cached for 1 hour by default to minimize API calls
- Image Processing: GeoTIFF processing can be resource-intensive; optimize where possible
- Multi-spectral band analysis beyond NDVI
- Machine learning predictions for crop yield estimation
- Integration with soil sensor data for comprehensive analysis
- Custom alerting for significant NDVI changes
If you encounter issues with satellite data:
- Verify API keys are correctly configured
- Check network connectivity
- Examine browser console for error messages
- Try a different date range (cloud cover can affect data quality)
- Ensure field boundaries are properly defined
The NDVI calculation uses the following formula: NDVI = (NIR - RED) / (NIR + RED)
Where:
- NIR = Near Infrared band (Sentinel-2 band 8)
- RED = Red band (Sentinel-2 band 4)
NDVI values range from -1 to 1:
- < 0: Water, buildings, roads, or bare soil
- 0-0.2: Poor vegetation
- 0.2-0.4: Fair vegetation
- 0.4-0.6: Good vegetation
- 0.6-0.8: Very good vegetation
-
0.8: Excellent vegetation