Summary
pygaul currently requires Google Earth Engine (GEE) for fetching geometries via pygaul.Items(). This proposal suggests adding native support for FAO's GAUL WFS/WMS services, enabling users to fetch administrative boundaries without GEE authentication:
- Some users might need admin boundaries but don't have or want GEE credentials
- Web apps and scripts could use pygaul without GEE infrastructure
- The package would be using official data
pygaul already uses local parquet for names lookups - geometry fetching could follow the same pattern
FAO provides OGC-compliant services:
We could have something like:
import httpx
import geopandas as gpd
params = {
"service": "WFS",
"version": "2.0.0",
"request": "GetFeature",
"typeName": "gaul:gaul_2024_l0",
"outputFormat": "application/json",
"srsName": "EPSG:4326",
"CQL_FILTER": "gaul0_code=57",
}
async with httpx.AsyncClient( as client:
response = await client.get(FAO_WFS_URL, params=params)
data = response.json()
gdf = gpd.GeoDataFrame.from_features(data["features"], crs="EPSG:4326")
Layers:
- Level 0: gaul:gaul_2024_l0
- Level 1: gaul:g2024_2023_1
- Level 2: gaul:g2024_2023_2
I'm implementing this in sepal-ui and it seems to works well. Happy to contribute a PR if there's interest.
Summary
pygaul currently requires Google Earth Engine (GEE) for fetching geometries via
pygaul.Items(). This proposal suggests adding native support for FAO's GAUL WFS/WMS services, enabling users to fetch administrative boundaries without GEE authentication:pygaulalready uses local parquet for names lookups - geometry fetching could follow the same patternFAO provides OGC-compliant services:
We could have something like:
Layers:
I'm implementing this in
sepal-uiand it seems to works well. Happy to contribute a PR if there's interest.