How openshift-roadshow/nationalparks-py works
This is a small Flask backend serving National Parks geolocation data from MongoDB. The main client workflow is a bounding-box request to /ws/data/within, which queries MongoDB and formats matching parks for JSON output; /ws/data/all provides the unfiltered alternative. A separate load endpoint imports the bundled dataset and creates the geospatial index. Health and service-information endpoints support monitoring and discovery. The runtime is concentrated in wsgi.py; relationships below are based on its excerpt and the README.
Main entry points: wsgi.py Collection access · nationalparks.json Park dataset
Components 11
HTTP API
- Flask service
wsgi.py - Health check
wsgi.py - Service info
wsgi.py - All parks
wsgi.py - Bounding-box search
wsgi.py
Data handling
- Dataset loader
wsgi.py - Result formatter
wsgi.py - Park dataset
nationalparks.json
MongoDB access
- Collection access
wsgi.py - MongoDB
Other components
- Parksmap client
Connections 12
- Parksmap client → Health check: checks
README.adoc - Parksmap client → Service info: requests info
README.adoc - Parksmap client → Dataset loader: requests load
README.adoc - Parksmap client → All parks: requests parks
README.adoc - Parksmap client → Bounding-box search: searches area
README.adoc - Dataset loader → Park dataset: reads
wsgi.py - Dataset loader → Collection access: inserts and indexes
wsgi.py - All parks → Collection access: fetches all
wsgi.py - Bounding-box search → Collection access: queries box
wsgi.py - All parks → Result formatter: formats results
wsgi.py - Bounding-box search → Result formatter: formats results
wsgi.py - Collection access → MongoDB: reads and writes
wsgi.py