Skip to content

A small FOSS starter for a Location Wizard: user clicks on a map of India and local Survey-of-India shapefiles are used to return wind (IS 875) and seismic (IS 1893) zone information.

License

Notifications You must be signed in to change notification settings

OsdagScreeningTasks/LocationWizard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🗺️ LocationWizard — OsdagBridge Plugin

LocationWizard is a Free/Libre and Open Source (FOSS) prototype developed as part of the OsdagBridge project.
It allows users to select any location on an interactive map of India and automatically retrieve Seismic Zone (IS 1893) and Wind Zone (IS 875) data for that location, using Survey of India (SoI) shapefiles and other official Indian datasets.

This repository serves as a screening assignment and a reference implementation for developers contributing to OsdagBridge’s Location-based Wizard module.


🎯 Objectives

  • Build an India-specific GIS-based wizard that runs entirely on FOSS tools.
  • Retrieve seismic and wind design parameters based on location (lat, lon).
  • Ensure data provenance and reproducibility using Survey of India and ISRO/NRSC open data portals.
  • Demonstrate compliance with Indian FOSS and open data policies.

🧩 Features

  • Interactive map (via Streamlit + Folium) centered on India.
  • Click on any location → get seismic zone & wind zone data.
  • Works offline once shapefiles are locally available.
  • Modular Python core (core.py) compatible with:
    • Desktop (PySide6) and Web (Django+React) interfaces of OsdagBridge.
    • CLI (command-line) for automation or testing.
  • FOSS-only dependencies (GeoPandas, Shapely, GDAL, Streamlit, Pytest).
  • Template for provenance and reproducibility (data/provenance_template.md).

🏗️ System Requirements


📦 Installation

Clone the repository:

git clone https://github.com/yourusername/LocationWizard.git
cd LocationWizard

Create and activate a virtual environment:

python -m venv venv
source venv/bin/activate   # Windows: venv\Scripts\activate

Install dependencies:

pip install -r requirements.txt

🗂️ Data Requirements

1️⃣ Survey of India (SoI) Shapefiles

  • Required vector data for:
    • Seismic Zones of India
    • Basic Wind Speed Zones
  • Obtain only from the Survey of India portal under “Digital Products / Shapefiles”.
  • Record product names, IDs, and download dates in:
    data/provenance_template.md
    

Place shapefiles in:

data/soi_seismic_zones.shp (+ .shx, .dbf, .prj)
data/soi_wind_regions.shp (+ .shx, .dbf, .prj)

⚠️ Do not commit SoI shapefiles to the repo if redistribution is restricted.
Instead, include download instructions or a fetch script.


2️⃣ Optional: ISRO / NRSC Satellite Data

If you wish to overlay satellite imagery or validate boundaries, use only:

Record dataset names and acquisition dates in data/provenance_template.md.


🚀 Running the App

streamlit run streamlit_app.py

This will open a web app in your browser:

  1. Click anywhere on the map of India.
  2. The coordinates and results (Seismic Zone, Wind Speed) will appear on the sidebar.
  3. The lookup works offline using your local SoI shapefiles.

🧪 Running Tests

To verify correctness and data loading:

pytest -q

Tests are skipped automatically if SoI shapefiles are not found in the data/ folder.


🧱 Repository Structure

LocationWizard/
├─ core.py                     # main geospatial lookup logic
├─ streamlit_app.py            # interactive map-based UI
├─ tests/
│  └─ test_location_properties.py
├─ data/
│  ├─ provenance_template.md    # must be filled with data source details
│  └─ (place SoI shapefiles here)
├─ requirements.txt
├─ README.md
├─ LICENSE
├─ CONTRIBUTING.md
└─ .github/
   └─ ISSUE_TEMPLATE.md

🔍 Expected Output (Example)

After selecting a point near Delhi:

{
  "lat": 28.613939,
  "lon": 77.209021,
  "seismic_zone": "IV",
  "basic_wind_speed": 47,
  "notes": ""
}

✅ Compliance Checklist

Criterion Description Must Follow
FOSS Stack Python, GeoPandas, Folium, etc.
Data Source Survey of India shapefiles only
Raster Data (optional) ISRO/NRSC portals only
Non-sensitive Data Verified SoI/ISRO official downloads
Provenance File data/provenance_template.md filled
Offline Capability Works without Internet

💡 Future Integration

The core function get_location_properties(lat, lon) will later integrate into:

  • osdagbridge-core (CLI / backend)
  • OsdagBridge Desktop (PySide6)
  • OsdagBridge Web (React + Django REST API)

🧾 License

Released under the MIT License.
Developed for educational and research use under the FOSSEE, IIT Bombay initiative.


👥 Maintainers

Osdag Team
Structural Risk and Reliability Lab | IIT Bombay


📚 References

  1. IS 1893 (Part 1): 2016 — Criteria for Earthquake Resistant Design of Structures
  2. IS 875 (Part 3): 2015 — Design Loads (Other than Earthquake) — Wind Loads
  3. Survey of India Official Portal
  4. ISRO-NRSC Bhuvan Portal
  5. MOSDAC, VEDAS, Bhoonidhi

🏁 Summary

This repository sets up a validated, open, reproducible pipeline for retrieving Indian seismic and wind zone data entirely from indigenous FOSS tools and government data sources.
It is both a screening test and a blueprint for OsdagBridge’s geospatial module.

About

A small FOSS starter for a Location Wizard: user clicks on a map of India and local Survey-of-India shapefiles are used to return wind (IS 875) and seismic (IS 1893) zone information.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages