Quickstart¶
Tilt and azimuth from a surface model¶
from pypvroof import characterize_roofs
out = characterize_roofs("detections.geojson", "fr-lidar", workers=8)
- The input can be a GeoDataFrame, a GeoJSON file or dict, a (Geo)Parquet or GeoPackage file, a list of shapely polygons...
"fr-lidar"is a service of the catalogue; a folder of GeoTIFFs works too.- The output is a GeoDataFrame, in the CRS of the input, with
tilt,azimuth,surface, astatusand the service metadata (meta_*).
No fallback
When a value cannot be measured, it is NaN and status says why
(no_coverage, multimodal, too_few_points...). Try another service,
split the polygon (split=True) or use the heuristics (service=None).
See Bulk characterization.
Which service covers my polygons?¶
import pypvroof
from pypvroof.catalog import services_at
pypvroof.available_services() # table of the catalogue
services_at(2.35, 48.85) # ['fr-lidar', 'fr-correl']
Installed capacity and roof planes¶
out = characterize_roofs("detections.geojson", "fr-lidar", split=True, capacity="clustered")
out[["parent_id", "part", "tilt", "azimuth", "surface", "installed_capacity"]]
capacity is "constant" (1/6.5 kWp/m²), "linear", "clustered" or a
coefficient in kWp/m². For a surface computed elsewhere:
Without a surface model¶
Constant tilt, azimuth from the polygon's minimum rotated rectangle (the side
closest to south), elongation of that rectangle, status = "heuristic".