@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
@prefix owl:     <http://www.w3.org/2002/07/owl#> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix xsd:     <http://www.w3.org/2001/XMLSchema#> .
@prefix geo:     <http://www.opengis.net/ont/geosparql#> .
@prefix ea:      <ea#> .
@prefix :        <vocab#> .

# =====================================================================
# DRAFT vocabulary — Linked Energie-Atlas (rooftop PV potential)
#
# The wrapper-coined DOMAIN layer the Energie-Atlas Bayern rooftop-PV-
# potential features are mapped INTO. The upstream feature attributes are
# mirrored verbatim in the sibling namespace ea: (<ea#…>) once their exact
# names are confirmed; do NOT expect upstream field names here.
#
# Everything below is DRAFT: property ranges and the suitability class set
# are provisional until the real feature schema is pinned down
# (TODO(mapping)). Term local-names (stable English) are the identifiers.
# =====================================================================

<vocab>
    a               owl:Ontology ;
    rdfs:label      "Linked Energie-Atlas vocabulary (DRAFT)"@en ,
                    "Linked-Energie-Atlas-Vokabular (ENTWURF)"@de ;
    dcterms:title   "Linked Energie-Atlas vocabulary"@en ;
    dcterms:description
        "DRAFT domain vocabulary the linked-energieatlas wrapper maps the Energie-Atlas Bayern rooftop-PV-potential layer INTO: a roof's overall PV potential, its homogeneous part-surfaces, and the per-surface metrics (installable peak power, expected annual yield, suitable area, orientation, tilt, suitability class). It is NOT the upstream field names — those are mirrored verbatim in the sibling namespace ea: (<ea#…>). These source-agnostic terms overlap the energy-domain terms in linked-mastr's vocab: and are candidates for a future SHARED energy vocabulary."@en ;
    # TODO(licence): confirm the exact licence + attribution for THIS layer
    # before publishing. Bavarian open geodata is customarily dl-de/by-2.0,
    # attribution to the LDBV / Bayerische Vermessungsverwaltung.
    dcterms:license <https://www.govdata.de/dl-de/by-2-0> ;
    dcterms:source  <https://www.energieatlas.bayern.de/erneuerbare-energien/photovoltaik/dachflaechen> ;
    rdfs:seeAlso    <ea> .

# ---- Classes --------------------------------------------------------

:RoofPotential
    a               rdfs:Class ;
    rdfs:label      "Roof PV potential"@en , "PV-Potenzial einer Dachfläche"@de ;
    rdfs:comment    "The aggregate rooftop photovoltaic potential of one building, computed by the Energie-Atlas Bayern from the LoD2 3D building model. Decomposes into one or more :RoofSurface part-surfaces. Keyed by building id (see uri-scheme.md)." .

:RoofSurface
    a               rdfs:Class ;
    rdfs:label      "Roof part-surface"@en , "Dachteilfläche"@de ;
    rdfs:comment    "One homogeneous part-surface of a roof — a contiguous area of uniform orientation and tilt, the unit at which the irradiation analysis reports installable capacity, yield and suitability. Materialised as a hash-IRI sub-resource of the roof document (e.g. <roof/X#surface-1>)." .

# ---- Roof -> surface bridge ----------------------------------------

:hasRoofSurface
    a               rdf:Property ;
    rdfs:label      "has roof part-surface"@en , "hat Dachteilfläche"@de ;
    rdfs:domain     :RoofPotential ;
    rdfs:range      :RoofSurface ;
    rdfs:comment    "Links a roof's PV potential to one of its :RoofSurface hash-IRI sub-resources." .

:onBuilding
    a               rdf:Property ;
    rdfs:label      "on building"@en , "auf Gebäude"@de ;
    rdfs:domain     :RoofPotential ;
    # rdfs:range intentionally open — the object is an external INSPIRE/ALKIS
    # building IRI (e.g. resolvable in linked-inspire) when available.
    rdfs:comment    "The building whose roof this potential describes; object is an external INSPIRE/ALKIS building IRI when the upstream feature carries a stable building id (TODO(mapping))." .

# ---- Per-surface metrics (ranges PROVISIONAL — TODO(mapping)) -------

:installableCapacity
    a               rdf:Property ;
    rdfs:label      "installable peak power"@en , "installierbare Leistung"@de ;
    rdfs:domain     :RoofSurface ;
    rdfs:range      xsd:decimal ;   # kWp — unit fixed by convention; confirm upstream unit
    rdfs:comment    "Installable photovoltaic peak power for this part-surface, in kilowatt-peak (kWp). PROVISIONAL: confirm the upstream unit and decimal precision." .

:annualYield
    a               rdf:Property ;
    rdfs:label      "expected annual yield"@en , "erwarteter Jahresertrag"@de ;
    rdfs:domain     :RoofSurface ;
    rdfs:range      xsd:decimal ;   # kWh/a
    rdfs:comment    "Expected annual energy yield of a PV installation on this part-surface, in kilowatt-hours per year (kWh/a), from the pvlib + PVGIS irradiation analysis. PROVISIONAL unit." .

:suitableArea
    a               rdf:Property ;
    rdfs:label      "suitable area"@en , "geeignete Fläche"@de ;
    rdfs:domain     :RoofSurface ;
    rdfs:range      xsd:decimal ;   # m^2
    rdfs:comment    "Roof area of this part-surface usable for PV after deducting dormers, chimneys and other roof structures, in square metres (m²). PROVISIONAL unit." .

:orientation
    a               rdf:Property ;
    rdfs:label      "orientation (azimuth)"@en , "Ausrichtung (Azimut)"@de ;
    rdfs:domain     :RoofSurface ;
    rdfs:range      xsd:decimal ;   # degrees; confirm reference (0 = South vs 0 = North)
    rdfs:comment    "Compass orientation (azimuth) of this part-surface, in degrees. PROVISIONAL: confirm the upstream azimuth reference (0 = South or 0 = North) — or whether orientation is given as a category (S/SE/SW/…) rather than degrees." .

:tilt
    a               rdf:Property ;
    rdfs:label      "tilt (inclination)"@en , "Neigung"@de ;
    rdfs:domain     :RoofSurface ;
    rdfs:range      xsd:decimal ;   # degrees from horizontal
    rdfs:comment    "Inclination of this part-surface from the horizontal, in degrees (0 = flat). PROVISIONAL unit/precision." .

:suitabilityClass
    a               rdf:Property ;
    rdfs:label      "suitability class"@en , "Eignungsklasse"@de ;
    rdfs:domain     :RoofSurface ;
    rdfs:range      :SuitabilityClass ;
    rdfs:comment    "The qualitative PV-suitability class of this part-surface; object is a skos:Concept in the cl/suitability codelist." .

# ---- Suitability codelist scaffold (PROVISIONAL set — TODO(mapping)) -

:SuitabilityClass
    a               rdfs:Class ;
    rdfs:subClassOf <http://www.w3.org/2004/02/skos/core#Concept> ;
    rdfs:label      "PV suitability class"@en , "PV-Eignungsklasse"@de ;
    rdfs:comment    "A qualitative roof-PV-suitability level. The concrete instances live in the cl/suitability SKOS concept scheme. PROVISIONAL: the upstream class set is not yet confirmed (e.g. sehr gut / gut / bedingt geeignet / ungeeignet)." .

# ---- Per-Gemeinde biomass metrics -----------------------------------
#
# Curated metrics merged INTO the same :AreaPotential thing as the rooftop-PV
# metrics, sourced from three per-Gemeinde Energie-Atlas Bayern "Recherche"
# biomass exports (biogas potential; installed biomass-electricity capacity;
# biomass share of electricity consumption). Domain is :AreaPotential — these
# describe a Bavarian administrative region, not a roof.

:biogasPotentialElectricKWhPerYear
    a               rdf:Property ;
    rdfs:label      "technical biogas potential (electric)"@en ,
                    "technisches Biogaspotenzial (elektrisch)"@de ;
    rdfs:domain     :AreaPotential ;
    rdfs:range      xsd:decimal ;   # kWh/a
    rdfs:comment    "Total technical biogas potential of the region expressed as electrical energy, in kilowatt-hours per year (kWh/a). From the Energie-Atlas Bayern biogas-potential layer (\"Technisches Biogaspotenzial - gesamt (elektrisch)\")." .

:biogasPotentialMethaneM3PerYear
    a               rdf:Property ;
    rdfs:label      "technical biogas potential (methane)"@en ,
                    "technisches Biogaspotenzial (Methan)"@de ;
    rdfs:domain     :AreaPotential ;
    rdfs:range      xsd:decimal ;   # m³ CH4/a
    rdfs:comment    "Total technical biogas potential of the region expressed as methane volume, in cubic metres of CH4 per year (m³ CH4/a). From the Energie-Atlas Bayern biogas-potential layer (\"Technisches Biogaspotenzial - gesamt\")." .

:biomassInstallationCount
    a               rdf:Property ;
    rdfs:label      "number of biomass installations"@en , "Anzahl Biomasseanlagen"@de ;
    rdfs:domain     :AreaPotential ;
    rdfs:range      xsd:integer ;
    rdfs:comment    "Count of biomass electricity-generation installations in the region. From the Energie-Atlas Bayern installed-biomass-capacity layer (\"Anzahl Biomasseanlagen\")." .

:biomassInstalledCapacityMW
    a               rdf:Property ;
    rdfs:label      "installed biomass capacity (EEG)"@en ,
                    "installierte Biomasse-Leistung (EEG)"@de ;
    rdfs:domain     :AreaPotential ;
    rdfs:range      xsd:decimal ;   # MW
    rdfs:comment    "Installed electrical capacity of EEG-funded biomass installations in the region, in megawatts (MW). From the Energie-Atlas Bayern installed-biomass-capacity layer (\"Installierte Leistung (MW) Biomasse (nur EEG)\")." .

:biomassElectricityProductionMWh
    a               rdf:Property ;
    rdfs:label      "biomass electricity production"@en , "Stromproduktion Biomasse"@de ;
    rdfs:domain     :AreaPotential ;
    rdfs:range      xsd:decimal ;   # MWh/a
    rdfs:comment    "Annual electricity produced from biomass in the region, in megawatt-hours (MWh). From the Energie-Atlas Bayern installed-biomass-capacity layer (\"Stromproduktion (MWh) Biomasse\")." .

:biomassElectricitySharePct
    a               rdf:Property ;
    rdfs:label      "biomass share of electricity consumption"@en ,
                    "Anteil Biomasse am Stromverbrauch"@de ;
    rdfs:domain     :AreaPotential ;
    rdfs:range      xsd:decimal ;   # %
    rdfs:comment    "Share of the region's electricity consumption covered by biomass-generated electricity, in percent (%). From the Energie-Atlas Bayern biomass-share-of-consumption layer (\"Anteil Biomasse am Stromverbrauch (%)\")." .

# ---- Per-Gemeinde renewable-share metrics ---------------------------
#
# Curated metrics merged INTO the same :AreaPotential thing, from the
# Energie-Atlas Bayern "Anteil EE am Stromverbrauch" per-Gemeinde export: the
# overall renewables share of electricity consumption plus the context figures
# (total consumption, population, area) it is computed against.

:renewableElectricitySharePct
    a               rdf:Property ;
    rdfs:label      "renewables share of electricity consumption"@en ,
                    "Anteil EE am Stromverbrauch"@de ;
    rdfs:domain     :AreaPotential ;
    rdfs:range      xsd:decimal ;   # %
    rdfs:comment    "Share of the region's electricity consumption covered by all renewable sources, in percent (%). From the Energie-Atlas Bayern renewables-share-of-consumption layer (\"Anteil EE am Stromverbrauch (%)\")." .

:electricityConsumptionMWhPerYear
    a               rdf:Property ;
    rdfs:label      "electricity consumption"@en , "Stromverbrauch"@de ;
    rdfs:domain     :AreaPotential ;
    rdfs:range      xsd:decimal ;   # MWh/a
    rdfs:comment    "Total annual electricity consumption of the region, in megawatt-hours per year (MWh/a). From the Energie-Atlas Bayern renewables-share-of-consumption layer (\"Stromverbrauch (MWh/a)\")." .

:population
    a               rdf:Property ;
    rdfs:label      "population"@en , "Einwohnerzahl"@de ;
    rdfs:domain     :AreaPotential ;
    rdfs:range      xsd:integer ;
    rdfs:comment    "Number of inhabitants of the region. From the Energie-Atlas Bayern renewables-share-of-consumption layer (\"Einwohnerzahl\")." .

:areaKm2
    a               rdf:Property ;
    rdfs:label      "area"@en , "Fläche"@de ;
    rdfs:domain     :AreaPotential ;
    rdfs:range      xsd:decimal ;   # km²
    rdfs:comment    "Surface area of the region, in square kilometres (km²). From the Energie-Atlas Bayern renewables-share-of-consumption layer (\"Fläche (km²)\")." .

# ---- Per-Gemeinde ground-mounted (open-space) PV potential ----------
#
# Curated metrics merged INTO the same :AreaPotential thing, from the
# Energie-Atlas Bayern "Photovoltaikpotenzial auf Freiflächen" per-Gemeinde
# export: the available ground-mounted PV potential (overall and broken down by
# the eligible-land categories), plus the current installed capacity. The four
# upstream "… Anteil auf … (%)" zone-share columns are derivable and not mapped.

:groundPvPotentialCapacityMWp
    a               rdf:Property ;
    rdfs:label      "available ground-mounted PV potential (capacity)"@en ,
                    "verfügbares Freiflächen-PV-Potenzial (Leistung)"@de ;
    rdfs:domain     :AreaPotential ;
    rdfs:range      xsd:decimal ;   # MWp
    rdfs:comment    "Total available ground-mounted (open-space) photovoltaic potential of the region as installable peak power, in megawatt-peak (MWp). From the Energie-Atlas Bayern open-space-PV-potential layer (\"Verfügbares Potenzial (Leistung) (MWp)\")." .

:groundPvPotentialYieldMWh
    a               rdf:Property ;
    rdfs:label      "available ground-mounted PV potential (yield)"@en ,
                    "verfügbares Freiflächen-PV-Potenzial (Stromproduktion)"@de ;
    rdfs:domain     :AreaPotential ;
    rdfs:range      xsd:decimal ;   # MWh/a
    rdfs:comment    "Expected annual electricity yield of the available ground-mounted PV potential of the region, in megawatt-hours (MWh). From the Energie-Atlas Bayern open-space-PV-potential layer (\"Verfügbares Potenzial (Stromproduktion) (MWh)\")." .

:groundPvInstalledCapacityMWp
    a               rdf:Property ;
    rdfs:label      "installed ground-mounted PV capacity"@en ,
                    "Ausbaustand Freiflächen-PV (Leistung)"@de ;
    rdfs:domain     :AreaPotential ;
    rdfs:range      xsd:decimal ;   # MWp
    rdfs:comment    "Currently installed ground-mounted (open-space) PV peak power in the region, in megawatt-peak (MWp). From the Energie-Atlas Bayern open-space-PV-potential layer (\"Ausbaustand (Leistung) (MWp)\")." .

:groundPvPotential200mStripMWp
    a               rdf:Property ;
    rdfs:label      "ground-mounted PV potential on 200 m strips (BauGB)"@en ,
                    "Freiflächen-PV-Potenzial auf 200m-Randstreifen (BauGB)"@de ;
    rdfs:domain     :AreaPotential ;
    rdfs:range      xsd:decimal ;   # MWp
    rdfs:comment    "Available ground-mounted PV potential on the 200 m strips alongside motorways and railways privileged under the BauGB, in megawatt-peak (MWp). From the Energie-Atlas Bayern open-space-PV-potential layer (\"Potenzial auf 200m Randstreifen (BauGB) (MWp)\")." .

:groundPvPotential500mStripMWp
    a               rdf:Property ;
    rdfs:label      "ground-mounted PV potential on 500 m strips (EEG)"@en ,
                    "Freiflächen-PV-Potenzial auf 500m-Randstreifen (EEG)"@de ;
    rdfs:domain     :AreaPotential ;
    rdfs:range      xsd:decimal ;   # MWp
    rdfs:comment    "Available ground-mounted PV potential on the 500 m strips alongside motorways and railways eligible under the EEG, in megawatt-peak (MWp). From the Energie-Atlas Bayern open-space-PV-potential layer (\"Potenzial auf 500m Randstreifen (EEG) (MWp)\")." .

:groundPvPotentialDisadvantagedAreasMWp
    a               rdf:Property ;
    rdfs:label      "ground-mounted PV potential on disadvantaged areas (EEG)"@en ,
                    "Freiflächen-PV-Potenzial auf benachteiligten Gebieten (EEG)"@de ;
    rdfs:domain     :AreaPotential ;
    rdfs:range      xsd:decimal ;   # MWp
    rdfs:comment    "Available ground-mounted PV potential on agriculturally disadvantaged areas eligible under the EEG, in megawatt-peak (MWp). From the Energie-Atlas Bayern open-space-PV-potential layer (\"Potenzial auf benachteiligten Gebieten (EEG) (MWp)\")." .

:groundPvPotentialOtherAreasMWp
    a               rdf:Property ;
    rdfs:label      "ground-mounted PV potential on other areas"@en ,
                    "Freiflächen-PV-Potenzial auf sonstigen Flächen"@de ;
    rdfs:domain     :AreaPotential ;
    rdfs:range      xsd:decimal ;   # MWp
    rdfs:comment    "Available ground-mounted PV potential on other eligible areas not covered by the strip/disadvantaged categories, in megawatt-peak (MWp). From the Energie-Atlas Bayern open-space-PV-potential layer (\"Potenzial auf sonstigen Flächen (MWp)\")." .

# ---- Per-Gemeinde renewable-electricity generation mix --------------
#
# Curated metrics merged INTO the same :AreaPotential thing, from the
# Energie-Atlas Bayern "EE-Strom nach Energieträger" per-Gemeinde export: the
# 2024 renewable-electricity generation mix — each renewable carrier's share of
# the EE electricity produced (%) and its absolute annual production (MWh/a),
# plus the total EE production. Population/area are already captured by the
# renewable-share layer; geometry/structural columns are skipped.

:eeShareHydroPct
    a               rdf:Property ;
    rdfs:label      "hydropower share of renewable electricity"@en ,
                    "Anteil Wasserkraft an Stromproduktion EE"@de ;
    rdfs:domain     :AreaPotential ;
    rdfs:range      xsd:decimal ;   # %
    rdfs:comment    "Share of the region's renewable electricity production generated from hydropower, in percent (%). From the Energie-Atlas Bayern renewable-electricity-by-carrier layer (\"Anteil Wasserkraft an Stromproduktion EE (%)\")." .

:eeShareWindPct
    a               rdf:Property ;
    rdfs:label      "wind share of renewable electricity"@en ,
                    "Anteil Wind an Stromproduktion EE"@de ;
    rdfs:domain     :AreaPotential ;
    rdfs:range      xsd:decimal ;   # %
    rdfs:comment    "Share of the region's renewable electricity production generated from wind, in percent (%). From the Energie-Atlas Bayern renewable-electricity-by-carrier layer (\"Anteil Wind an Stromproduktion EE (%)\")." .

:eeSharePvPct
    a               rdf:Property ;
    rdfs:label      "PV share of renewable electricity"@en ,
                    "Anteil PV an Stromproduktion EE"@de ;
    rdfs:domain     :AreaPotential ;
    rdfs:range      xsd:decimal ;   # %
    rdfs:comment    "Share of the region's renewable electricity production generated from photovoltaics, in percent (%). From the Energie-Atlas Bayern renewable-electricity-by-carrier layer (\"Anteil PV an Stromproduktion EE (%)\")." .

:eeShareBiomassPct
    a               rdf:Property ;
    rdfs:label      "biomass share of renewable electricity"@en ,
                    "Anteil Biomasse an Stromproduktion EE"@de ;
    rdfs:domain     :AreaPotential ;
    rdfs:range      xsd:decimal ;   # %
    rdfs:comment    "Share of the region's renewable electricity production generated from biomass, in percent (%). From the Energie-Atlas Bayern renewable-electricity-by-carrier layer (\"Anteil Biomasse an Stromproduktion EE (%)\")." .

:eeShareGeothermalPct
    a               rdf:Property ;
    rdfs:label      "geothermal share of renewable electricity"@en ,
                    "Anteil Geothermie an Stromproduktion EE"@de ;
    rdfs:domain     :AreaPotential ;
    rdfs:range      xsd:decimal ;   # %
    rdfs:comment    "Share of the region's renewable electricity production generated from geothermal energy, in percent (%). From the Energie-Atlas Bayern renewable-electricity-by-carrier layer (\"Anteil Geothermie an Stromproduktion EE (%)\")." .

:eeProductionHydroMWh
    a               rdf:Property ;
    rdfs:label      "renewable electricity production from hydropower"@en ,
                    "Stromproduktion Wasserkraft"@de ;
    rdfs:domain     :AreaPotential ;
    rdfs:range      xsd:decimal ;   # MWh/a
    rdfs:comment    "Annual electricity produced from hydropower in the region in 2024, in megawatt-hours per year (MWh/a). From the Energie-Atlas Bayern renewable-electricity-by-carrier layer (\"Stromproduktion Wasserkraft 2024 (MWh/a)\")." .

:eeProductionWindMWh
    a               rdf:Property ;
    rdfs:label      "renewable electricity production from wind"@en ,
                    "Stromproduktion Wind"@de ;
    rdfs:domain     :AreaPotential ;
    rdfs:range      xsd:decimal ;   # MWh/a
    rdfs:comment    "Annual electricity produced from wind in the region in 2024, in megawatt-hours per year (MWh/a). From the Energie-Atlas Bayern renewable-electricity-by-carrier layer (\"Stromproduktion Wind 2024 (MWh/a)\")." .

:eeProductionPvMWh
    a               rdf:Property ;
    rdfs:label      "renewable electricity production from PV"@en ,
                    "Stromproduktion PV"@de ;
    rdfs:domain     :AreaPotential ;
    rdfs:range      xsd:decimal ;   # MWh/a
    rdfs:comment    "Annual electricity produced from photovoltaics in the region in 2024, in megawatt-hours per year (MWh/a). From the Energie-Atlas Bayern renewable-electricity-by-carrier layer (\"Stromproduktion PV 2024 (MWh/a)\")." .

:eeProductionBiomassMWh
    a               rdf:Property ;
    rdfs:label      "renewable electricity production from biomass"@en ,
                    "Stromproduktion Biomasse"@de ;
    rdfs:domain     :AreaPotential ;
    rdfs:range      xsd:decimal ;   # MWh/a
    rdfs:comment    "Annual electricity produced from biomass in the region in 2024, in megawatt-hours per year (MWh/a). From the Energie-Atlas Bayern renewable-electricity-by-carrier layer (\"Stromproduktion Biomasse 2024 (MWh/a)\")." .

:eeProductionGeothermalMWh
    a               rdf:Property ;
    rdfs:label      "renewable electricity production from geothermal"@en ,
                    "Stromproduktion Geothermie"@de ;
    rdfs:domain     :AreaPotential ;
    rdfs:range      xsd:decimal ;   # MWh/a
    rdfs:comment    "Annual electricity produced from geothermal energy in the region in 2024, in megawatt-hours per year (MWh/a). From the Energie-Atlas Bayern renewable-electricity-by-carrier layer (\"Stromproduktion Geothermie 2024 (MWh/a)\")." .

:eeProductionTotalMWh
    a               rdf:Property ;
    rdfs:label      "total renewable electricity production"@en ,
                    "Stromproduktion EE"@de ;
    rdfs:domain     :AreaPotential ;
    rdfs:range      xsd:decimal ;   # MWh/a
    rdfs:comment    "Total annual renewable electricity produced in the region in 2024 across all carriers, in megawatt-hours per year (MWh/a). From the Energie-Atlas Bayern renewable-electricity-by-carrier layer (\"Stromproduktion EE 2024 (MWh/a)\")." .
