WRIS Web Services — Programmatic Water Data¶
Provider
CWC / NIH (National Institute of Hydrology)
Portal
Access Level
🟢 WMS no login | 🟡 WFS login
Standards
WMS 1.3.0, WFS 2.0
Key Layers
River basins, dams, water quality, reservoirs
Coverage
Pan-India water resources data
WRIS WMS Endpoints¶
| Layer | URL / Parameters |
|---|---|
| River Basins | https://indiawris.gov.in/wris/services/wms?LAYERS=WRIS:RIVER_BASIN |
| Major Dams | https://indiawris.gov.in/wris/services/wms?LAYERS=WRIS:MAJOR_DAMS |
| Reservoirs | https://indiawris.gov.in/wris/services/wms?LAYERS=WRIS:RESERVOIR_LIVE |
| GW Stations | https://indiawris.gov.in/wris/services/wms?LAYERS=WRIS:GW_STATION |
| Water Quality | https://indiawris.gov.in/wris/services/wms?LAYERS=WRIS:WATER_QUALITY |
Full WMS GetCapabilities:
Add WRIS to QGIS¶
- QGIS → Layer → Add WMS/WMTS Layer → New
- Name:
WRIS India - URL:
https://indiawris.gov.in/wris/services/wms - Connect → Select layers (try
WRIS:MAJOR_DAMSandWRIS:RIVER_BASIN) - Add to canvas
Python: Get Dam Data via WFS¶
from owslib.wfs import WebFeatureService
import geopandas as gpd
from io import BytesIO
import json
# Connect to WRIS WFS
WRIS_WFS = "https://indiawris.gov.in/wris/services/wfs"
try:
wfs = WebFeatureService(WRIS_WFS, version='2.0.0', timeout=60)
print("Available WRIS WFS layers:")
for name in list(wfs.contents)[:15]:
print(f" {name}")
# Get major dams for Karnataka
response = wfs.getfeature(
typename='WRIS:MAJOR_DAMS',
propertyname=['DAM_NAME', 'RIVER', 'STATE', 'GROSS_CAP_MCM', 'geometry'],
outputFormat='application/json'
)
dams_gdf = gpd.read_file(BytesIO(response.read()))
# Filter Karnataka
karnataka_dams = dams_gdf[dams_gdf['STATE'] == 'Karnataka'].copy()
karnataka_dams = karnataka_dams.sort_values('GROSS_CAP_MCM', ascending=False)
print(f"\nMajor Dams in Karnataka: {len(karnataka_dams)}")
print(karnataka_dams[['DAM_NAME', 'RIVER', 'GROSS_CAP_MCM']].head(10).to_string())
# Save
karnataka_dams.to_file("karnataka_major_dams.geojson", driver='GeoJSON')
except Exception as e:
print(f"Error: {e}")
print("Note: WRIS WFS may require login. Try the WRIS portal directly.")
✏️ Practice Exercise¶
Exercise 6.5 — Map All Major Dams in Your State
Goal: Create a map of all major dams in your state with storage capacity.
- In QGIS: Add WRIS WMS (steps above)
- Turn on the Major Dams layer
- Right-click → Filter:
"STATE" = 'MAHARASHTRA'(change to your state) - Style: Graduated by
GROSS_CAP_MCM— larger dams = bigger symbol - Add labels showing dam names
Questions: - [ ] Which is the largest dam in your state by gross storage? - [ ] Which river has the most dams? - [ ] Are the dams clustered in any particular region? - [ ] Cross-reference with CGWB data — are over-exploited groundwater blocks in areas with few dams?
Continue to Chapter 7: Visualizing Data →