How shreyask95/context_aware_geospatial works
This is a Flask geospatial chat application. A user submits a query through the map interface; Flask dispatches it to context-aware processing, which interprets intent, retrieves location, POI, route, weather, or timezone data, and returns a response for map display. Sessions and SQLite support follow-up context and history. The source index identifies only main3.py as a core module; separate responsibilities below are therefore components implemented in that file, not independently sampled modules. Other capability links rely on the README where excerpts do not show the implementation.
Main entry points: main3.py Dynamic query handler · map1_1.html Interactive map
Components 18
Interaction
- Interactive map
templates/map1_1.html - Flask query endpoints
main3.py
Conversation processing
- Dynamic query handler
main3.py - Query interpretation
main3.py - Response generation
main3.py
Geospatial services
- Geocoding
main3.py - Nearby POIs
main3.py - Route calculation
main3.py - Weather and timezone
main3.py
Context and history
- History management
main3.py - Flask session context
main3.py - SQLite chat history
main3.py
Other components
- User
- Google Gemini
- Nominatim
- Overpass API
- OpenRouteService
- OpenWeatherMap
Connections 20
- User → Interactive map: submits query
README.md - Interactive map → Flask query endpoints: sends request
README.md - Flask query endpoints → Dynamic query handler: dispatches query
main3.py - Dynamic query handler → Flask session context: reads context
main3.py - Dynamic query handler → Query interpretation: interprets query
README.md - Query interpretation → Google Gemini: uses AI
README.md - Dynamic query handler → Geocoding: resolves places
main3.py - Geocoding → Nominatim: geocodes locations
README.md - Dynamic query handler → Nearby POIs: retrieves nearby POIs
README.md - Nearby POIs → Overpass API: queries features
main3.py - Dynamic query handler → Route calculation: calculates route
main3.py - Route calculation → OpenRouteService: requests directions
main3.py - Dynamic query handler → Weather and timezone: retrieves local details
main3.py - Weather and timezone → OpenWeatherMap: requests weather
main3.py - Dynamic query handler → Response generation: generates answer
README.md - Response generation → Google Gemini: generates text
README.md - Dynamic query handler → History management: maintains conversation
README.md - History management → Flask session context: stores context
README.md - History management → SQLite chat history: stores history
README.md - Flask query endpoints → Interactive map: returns map data
README.md