Surface model services¶
A service retrieves the elevation grid (DSM) under a polygon. Services are queried on the fly, one request per polygon; polygons can be given in any CRS.
Catalogue¶
| Country / region | Service | Product | Resolution | CRS | Protocol | Licence |
|---|---|---|---|---|---|---|
| France | fr-lidar |
IGN LiDAR HD | 0.5 m | EPSG:2154 | WMS-R | Etalab 2.0 |
| France | fr-correl |
IGN MNS Correl (from aerial images, less precise) | 0.5 m | EPSG:2154 | WMS-R | Etalab 2.0 |
| Netherlands | nl-ahn |
AHN | 0.5 m | EPSG:28992 | WCS 2.0.1 | CC0 |
| Belgium (Flanders) | be-flanders |
DHMV II (2013-2015) | 1 m | EPSG:31370 | WCS 2.0.1 | Modellicentie gratis hergebruik |
| United Kingdom (England) | uk-england |
Environment Agency LiDAR composite DSM | 1 m | EPSG:27700 | WCS 2.0.1 | OGL v3 |
| Germany (North Rhine-Westphalia) | de-nw |
DOM1 | 1 m | EPSG:25832 | WCS 2.0.1 | dl-de/zero-2-0 |
| Germany (Mecklenburg-Vorpommern) | de-mv |
DOM1 | 1 m | EPSG:25833 | WCS 2.0.1 | CC BY 4.0 |
| Poland | pl |
GUGiK NMPT (slow, ~7 s per polygon) | 0.5 m | EPSG:2180 | WCS 1.0.0 | GUGiK |
| Norway | no |
Nasjonal høydemodell DOM | 1 m | EPSG:25833 | WCS 1.0.0 | CC BY 4.0 |
| Switzerland | ch-swisssurface3d |
swisstopo swissSURFACE3D | 0.5 m | EPSG:2056 | STAC + COG | swisstopo OGD |
| Anywhere | path to a folder | your GeoTIFFs (pixel = elevation in metres) | any | any projected | local files | yours |
At 1 m, polygons under about 12 m² have too few pixels to be measured.
import pypvroof
from pypvroof.catalog import services_at, service
pypvroof.available_services() # this table, as a DataFrame
services_at(lon, lat) # services covering a point, most specific first
service("fr-lidar", timeout=60) # a catalogue service with overridden settings
A name works everywhere a service is expected:
characterize_roofs(polys, "nl-ahn"), {"dsm-service": "uk-england"},
plot_polygon(..., services=("de-nw",)).
Rough extents
services_at uses approximate bounding boxes: a service may still answer
no_coverage, in which case the next one can be tried.
Service classes¶
Every service returns a FetchResult(status, patch, meta). meta is a
free-form dict whose content depends on the service; it is passed through to
the output (meta_* columns) without being interpreted.
IGNLidarService(product="MNS", margin=1.0, timeout=30, retries=3, backoff=1.0, fetch_metadata=True)
: IGN LiDAR HD elevation models through the Géoplateforme WMS-R, as raw
float32 GeoTIFFs at the native 50 cm grid. meta holds the acquisition
metadata of the LiDAR tile from the WFS index (tile,
date_debut_acquisition, date_fin_acquisition, date_edition,
code_mission), cached per 1 km tile.
IGNCorrelService(margin=1.0, timeout=30, retries=3, backoff=1.0)
: IGN "MNS Correl" (50 cm), computed by correlation of the BD ORTHO aerial
images. It covers areas without LiDAR HD and is consistent with
detections made on the BD ORTHO, but less precise: on 1,000 random
detections, tilt within 5° of LiDAR for 56% of them (mean absolute
difference 6.6°), azimuth within 15° for 87%.
LocalRasterService(folder, pattern="*.tif", margin=1.0, crs=None)
: Single-band GeoTIFFs whose pixel values are elevations in metres,
georeferenced in a projected CRS. Any file name; the folder is indexed by
extent; all rasters must share the same CRS; polygons spanning several
rasters are handled.
WCSService(url, coverage, crs, resolution, grid_origin=0, version="2.0.1", ...)
: Any surface model served by an OGC WCS (2.0.1 or 1.0.0) returning
GeoTIFFs (multipart responses handled). Services needing a token:
extra_params={"token": ...}.
STACCogService(stac_url, collection, crs, asset_filter, tile_size=1000, latest=True, ...)
: Cloud-Optimized GeoTIFF tiles indexed by a STAC API; only the window
under the polygon is read. The latest acquisition is used.
get_service(spec, **kwargs)
: Builds a service from a DSMService instance, a catalogue name or a folder.
Custom services¶
Subclass DSMService, set crs and implement fetch(geometry):
from pypvroof import DSMService, DSMPatch, FetchResult
class MyService(DSMService):
crs = "EPSG:2154"
def fetch(self, geometry): # geometry in self.crs
z, transform = ... # float elevations (m), affine transform
return FetchResult("ok", DSMPatch(z, transform, self.crs), {"source": "mine"})
To add a country to the catalogue, see Contributing.
Not included¶
Checked in November 2026: Denmark (needs a Dataforsyningen token, usable with
WCSService(..., extra_params={"token": ...})), Wallonia (rendered maps
only), Czech Republic (2 m from a TIN), Spain (5 m only), Sachsen-Anhalt (WCS
returning errors).