Partial implementation for the greenery catalog integration

This commit is contained in:
Guille Gutierrez 2022-03-03 16:52:01 -05:00
parent 024469ac0a
commit 7db319f3fd
8 changed files with 1032 additions and 0 deletions

33
catalogs/catalog.py Normal file
View File

@ -0,0 +1,33 @@
"""
Catalog base class
SPDX - License - Identifier: LGPL - 3.0 - or -later
Copyright © 2022 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca
"""
class Catalog:
"""
Catalog name
"""
@property
def names(self):
"""
Base property to return the catalog entries names
:return: not implemented error
"""
raise NotImplementedError
@property
def entries(self):
"""
Base property to return the catalog entries
:return: not implemented error
"""
raise NotImplementedError
def get_entry(self, name):
"""
Base property to return the catalog entry matching the given name
:return: not implemented error
"""
raise NotImplementedError

View File

@ -0,0 +1,268 @@
<?xml version="1.0" encoding="UTF-8"?>
<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="greenerycatalog" nsURI="http://ca.concordia/greenerycatalog"
nsPrefix="greenery">
<eClassifiers xsi:type="ecore:EClass" name="Soil">
<eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
<details key="constraints" value="nonNegative"/>
</eAnnotations>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
defaultValueLiteral=""/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="roughness" eType="#//Roughness"
defaultValueLiteral="MediumRough">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="defines the relative roughness of a particular material layer. This parameter only influences the convection coefficients, more specifically the exterior convection coefficient. A nominal value is expected in with the options being &quot;VeryRough&quot;, &quot;Rough&quot;, &quot;MediumRough&quot;, &quot;MediumSmooth&quot;, &quot;Smooth&quot;, and &quot;VerySmooth&quot; in order of roughest to smoothest options."/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="conductivityOfDrySoil"
lowerBound="1" eType="ecore:EDataType platform:/plugin/de.hftstuttgart.cityunits.model/model/Quantities.ecore#//Quantity"
defaultValueLiteral="1.0 W/(m*K)">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="Thermal conductivity W/(m-K). Range: 0.2 to 1.5"/>
</eAnnotations>
<eAnnotations source="http://www.hft-stuttgart.de/UomQuantities">
<details key="min" value="0.2"/>
<details key="max" value="1.5"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="densityOfDrySoil" eType="ecore:EDataType platform:/plugin/de.hftstuttgart.cityunits.model/model/Quantities.ecore#//Quantity"
defaultValueLiteral="1100 kg/m³">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="Density in kg/m³. "/>
</eAnnotations>
<eAnnotations source="http://www.hft-stuttgart.de/UomQuantities">
<details key="min" value="0.1"/>
<details key="max" value="10000"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="specificHeatOfDrySoil"
eType="ecore:EDataType platform:/plugin/de.hftstuttgart.cityunits.model/model/Quantities.ecore#//Quantity"
defaultValueLiteral="1200 J/(kg*K)">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="in units of J/(kg-K). Range(300 to 2000)"/>
</eAnnotations>
<eAnnotations source="http://www.hft-stuttgart.de/UomQuantities">
<details key="min" value="0.2"/>
<details key="max" value="2000"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="thermalAbsorptance" eType="ecore:EDataType platform:/plugin/de.hftstuttgart.cityunits.model/model/Quantities.ecore#//Quantity"
defaultValueLiteral="0.9">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="the fraction of incident long wavelength (>2.5 microns) radiation that is absorbed by the material. This parameter is used when calculating the long wavelength radiant exchange between various surfaces and affects the surface heat balances (both inside and outside as appropriate). For long wavelength radiant exchange, thermal emissivity and thermal emittance are equal to thermal absorptance. Range: 0 to 1"/>
</eAnnotations>
<eAnnotations source="http://www.hft-stuttgart.de/UomQuantities">
<details key="min" value="0.0"/>
<details key="max" value="1.0"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="solarAbsorptance" eType="ecore:EDataType platform:/plugin/de.hftstuttgart.cityunits.model/model/Quantities.ecore#//Quantity"
defaultValueLiteral="0.7">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="the fraction of incident solar radiation that is absorbed by the material.&#xA;Solar radiation (0.3 to 2.537 microns) includes the visible spectrum as well as infrared and ultraviolet wavelengths. This parameter is used when calculating the amount of incident solar radiation absorbed by various surfaces and affects the surface heat balances (both inside and outside as appropriate). If solar reflectance (or reflectivity) data is available, then absorptance is equal to 1.0 minus reflectance (for opaque materials).&#xA;Range: 0 to 1"/>
</eAnnotations>
<eAnnotations source="http://www.hft-stuttgart.de/UomQuantities">
<details key="min" value="0.0"/>
<details key="max" value="1.0"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="visibleAbsorptance" eType="ecore:EDataType platform:/plugin/de.hftstuttgart.cityunits.model/model/Quantities.ecore#//Quantity"
defaultValueLiteral="0.75">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="The visible absorptance field in the Material input syntax represents the fraction of incident visible wavelength radiation that is absorbed by the material.&#xA;Visible wavelength radiation (0.37 to 0.78 microns weighted by photopic response) is slightly different than solar radiation in that the visible band of wavelengths is much more narrow while solar radiation includes the visible spectrum as well as infrared and ultraviolet wavelengths.&#xA;This parameter is used when calculating the amount of incident visible radiation absorbed by various surfaces and affects the surface heat balances (both inside and outside as appropriate) as well as the daylighting calculations. If visible reflectance (or reflectivity) data is available, then absorptance is equal to 1.0 minus reflectance (for opaque materials).&#xA;Range: 0.5 to 1.0"/>
</eAnnotations>
<eAnnotations source="http://www.hft-stuttgart.de/UomQuantities">
<details key="min" value="0.5"/>
<details key="max" value="1.0"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="saturationVolumetricMoistureContent"
eType="ecore:EDataType platform:/plugin/de.hftstuttgart.cityunits.model/model/Quantities.ecore#//Quantity"
defaultValueLiteral="0.0">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="input of the saturation moisture content of the soil layer. Range: 0.1 to 0.5"/>
</eAnnotations>
<eAnnotations source="http://www.hft-stuttgart.de/UomQuantities">
<details key="min" value="0.1"/>
<details key="max" value="0.5"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="residualVolumetricMoistureContent"
eType="ecore:EDataType platform:/plugin/de.hftstuttgart.cityunits.model/model/Quantities.ecore#//Quantity"
defaultValueLiteral="0.05">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="Input of the residual moisture content of the soil layer. Range: 0.01 to 0.1"/>
</eAnnotations>
<eAnnotations source="http://www.hft-stuttgart.de/UomQuantities">
<details key="min" value="0.01"/>
<details key="max" value="0.1"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="initialVolumetricMoistureContent"
eType="ecore:EDataType platform:/plugin/de.hftstuttgart.cityunits.model/model/Quantities.ecore#//Quantity"
defaultValueLiteral="0.1">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="Range: 0.05 to 0.5"/>
</eAnnotations>
<eAnnotations source="http://www.hft-stuttgart.de/UomQuantities">
<details key="min" value="0.05"/>
<details key="max" value="0.5"/>
</eAnnotations>
</eStructuralFeatures>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Plant">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="height" lowerBound="1"
eType="ecore:EDataType platform:/plugin/de.hftstuttgart.cityunits.model/model/Quantities.ecore#//Quantity"
defaultValueLiteral="0.1 m">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="Maximum height of plants. Range: 0.005 to 1 m"/>
</eAnnotations>
<eAnnotations source="http://www.hft-stuttgart.de/UomQuantities">
<details key="min" value="0.005"/>
<details key="max" value="1.0"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="leafAreaIndex" lowerBound="1"
eType="ecore:EDataType platform:/plugin/de.hftstuttgart.cityunits.model/model/Quantities.ecore#//Quantity"
defaultValueLiteral="2.5">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="Leaf area per unit area of soil surface. Range: 0.001 to 5.0 m²/m²"/>
</eAnnotations>
<eAnnotations source="http://www.hft-stuttgart.de/UomQuantities">
<details key="min" value="0.001"/>
<details key="max" value="5.0"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="leafReflectivity" lowerBound="1"
eType="ecore:EDataType platform:/plugin/de.hftstuttgart.cityunits.model/model/Quantities.ecore#//Quantity"
defaultValueLiteral="0.1">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="Represents the fraction of incident solar radiation that is reflected by the individual leaf surfaces (albedo).&#xA;Range: 0.05 to 0.5"/>
</eAnnotations>
<eAnnotations source="http://www.hft-stuttgart.de/UomQuantities">
<details key="min" value="0.05"/>
<details key="max" value="0.5"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="leafEmissivity" lowerBound="1"
eType="ecore:EDataType platform:/plugin/de.hftstuttgart.cityunits.model/model/Quantities.ecore#//Quantity"
defaultValueLiteral="0.9">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="Ratio of thermal radiation emitted from leaf surfaces to that emitted by an ideal black body at the same temperature.&#xA;This parameter is used when calculating the long wavelength radiant exchange at the leaf surfaces.&#xA;Range: 0.8 to 1"/>
</eAnnotations>
<eAnnotations source="http://www.hft-stuttgart.de/UomQuantities">
<details key="min" value="0.8"/>
<details key="max" value="1.0"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="minimalStomatalResistance"
lowerBound="1" eType="ecore:EDataType platform:/plugin/de.hftstuttgart.cityunits.model/model/Quantities.ecore#//Quantity"
defaultValueLiteral="100.0 s/m">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="Resistance of the plants to moisture transport.&#xA;Plants with low values of stomatal resistance will result in higher evapotranspiration rates than plants with high resistance.&#xA;Range: 50 to 300 m/s"/>
</eAnnotations>
<eAnnotations source="http://www.hft-stuttgart.de/UomQuantities">
<details key="min" value="50.0"/>
<details key="max" value="300.0"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EReference" name="growsOn" lowerBound="1"
upperBound="-1" eType="#//Soil"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="co2Sequestration" eType="ecore:EDataType platform:/plugin/de.hftstuttgart.cityunits.model/model/Quantities.ecore#//Quantity"
defaultValueLiteral="kgCO₂eq"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="SupportEnvelope">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="roughness" eType="#//Roughness"
defaultValueLiteral="MediumRough"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="solarAbsorptance" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDouble"
defaultValueLiteral="0.0"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="conductivity" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDouble"
defaultValueLiteral="0.0"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="visibleAbsorptance" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDouble"
defaultValueLiteral="0.0"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="specificHeat" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDouble"
defaultValueLiteral="0.0"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="density" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDouble"
defaultValueLiteral="0.0"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="thermalAbsorptance" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDouble"
defaultValueLiteral="0.0"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="GreeneryCatalog">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="description" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="source" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="plantCategories" lowerBound="1"
upperBound="-1" eType="#//PlantCategory" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="vegetationCategories" lowerBound="1"
upperBound="-1" eType="#//VegetationCategory" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="soils" upperBound="-1"
eType="#//Soil" containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="PlantCategory">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="Excluding (that is non-overlapping) categories like Trees, Hedeges, Grasses that help users finding a specific biol. plant species."/>
</eAnnotations>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="plants" upperBound="-1"
eType="#//Plant" containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="IrrigationSchedule">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Vegetation">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="Plant life or total plant cover (as of an area)"/>
</eAnnotations>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="thicknessOfSoil" lowerBound="1"
eType="ecore:EDataType platform:/plugin/de.hftstuttgart.cityunits.model/model/Quantities.ecore#//Quantity"
defaultValueLiteral="20 cm">
<eAnnotations source="http://www.hft-stuttgart.de/UomQuantities">
<details key="min" value="0"/>
<details key="max" value="1000"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EReference" name="soil" lowerBound="1" eType="#//Soil"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="plants" lowerBound="1"
upperBound="-1" eType="#//PlantPercentage" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="management" lowerBound="1"
eType="#//Management" defaultValueLiteral="NA"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="airGap" lowerBound="1"
eType="ecore:EDataType platform:/plugin/de.hftstuttgart.cityunits.model/model/Quantities.ecore#//Quantity"
defaultValueLiteral="0.0 cm"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="VegetationCategory">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="Excluding (that is non-overlapping) categories to help users finding a specific vegetation template."/>
</eAnnotations>
<eStructuralFeatures xsi:type="ecore:EReference" name="vegetationTemplates" upperBound="-1"
eType="#//Vegetation" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EEnum" name="Management">
<eLiterals name="Intensive"/>
<eLiterals name="Extensive" value="1"/>
<eLiterals name="SemiIntensive" value="2"/>
<eLiterals name="NA" value="3"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="PlantPercentage">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="percentage" lowerBound="1"
eType="ecore:EDataType platform:/plugin/de.hftstuttgart.cityunits.model/model/Quantities.ecore#//Quantity"
defaultValueLiteral="100">
<eAnnotations source="http://www.hft-stuttgart.de/UomQuantities">
<details key="min" value="0"/>
<details key="max" value="100"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EReference" name="plant" lowerBound="1" eType="#//Plant"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EEnum" name="Roughness">
<eLiterals name="VeryRough"/>
<eLiterals name="Rough" value="1"/>
<eLiterals name="MediumRough" value="2"/>
<eLiterals name="MediumSmooth" value="3"/>
<eLiterals name="Smooth" value="4"/>
<eLiterals name="VerySmooth" value="5"/>
</eClassifiers>
</ecore:EPackage>

View File

@ -0,0 +1,318 @@
"""Definition of meta model 'greenerycatalog'."""
from functools import partial
import pyecore.ecore as Ecore
from pyecore.ecore import *
name = 'greenerycatalog'
nsURI = 'http://ca.concordia/greenerycatalog'
nsPrefix = 'greenery'
eClass = EPackage(name=name, nsURI=nsURI, nsPrefix=nsPrefix)
eClassifiers = {}
getEClassifier = partial(Ecore.getEClassifier, searchspace=eClassifiers)
Management = EEnum('Management', literals=['Intensive', 'Extensive', 'SemiIntensive', 'NA'])
Roughness = EEnum('Roughness', literals=['VeryRough', 'Rough',
'MediumRough', 'MediumSmooth', 'Smooth', 'VerySmooth'])
class Soil(EObject, metaclass=MetaEClass):
name = EAttribute(eType=EString, unique=True, derived=False, changeable=True)
roughness = EAttribute(eType=Roughness, unique=True, derived=False,
changeable=True, default_value=Roughness.MediumRough)
conductivityOfDrySoil = EAttribute(
eType=EString, unique=True, derived=False, changeable=True, default_value='1.0 W/(m*K)')
densityOfDrySoil = EAttribute(eType=EString, unique=True, derived=False,
changeable=True, default_value='1100 kg/m³')
specificHeatOfDrySoil = EAttribute(
eType=EString, unique=True, derived=False, changeable=True, default_value='1200 J/(kg*K)')
thermalAbsorptance = EAttribute(eType=EString, unique=True,
derived=False, changeable=True, default_value='0.9')
solarAbsorptance = EAttribute(eType=EString, unique=True,
derived=False, changeable=True, default_value='0.7')
visibleAbsorptance = EAttribute(eType=EString, unique=True,
derived=False, changeable=True, default_value='0.75')
saturationVolumetricMoistureContent = EAttribute(
eType=EString, unique=True, derived=False, changeable=True, default_value='0.0')
residualVolumetricMoistureContent = EAttribute(
eType=EString, unique=True, derived=False, changeable=True, default_value='0.05')
initialVolumetricMoistureContent = EAttribute(
eType=EString, unique=True, derived=False, changeable=True, default_value='0.1')
def __init__(self, *, name=None, roughness=None, conductivityOfDrySoil=None, densityOfDrySoil=None, specificHeatOfDrySoil=None, thermalAbsorptance=None, solarAbsorptance=None, visibleAbsorptance=None, saturationVolumetricMoistureContent=None, residualVolumetricMoistureContent=None, initialVolumetricMoistureContent=None):
# if kwargs:
# raise AttributeError('unexpected arguments: {}'.format(kwargs))
super().__init__()
if name is not None:
self.name = name
if roughness is not None:
self.roughness = roughness
if conductivityOfDrySoil is not None:
self.conductivityOfDrySoil = conductivityOfDrySoil
if densityOfDrySoil is not None:
self.densityOfDrySoil = densityOfDrySoil
if specificHeatOfDrySoil is not None:
self.specificHeatOfDrySoil = specificHeatOfDrySoil
if thermalAbsorptance is not None:
self.thermalAbsorptance = thermalAbsorptance
if solarAbsorptance is not None:
self.solarAbsorptance = solarAbsorptance
if visibleAbsorptance is not None:
self.visibleAbsorptance = visibleAbsorptance
if saturationVolumetricMoistureContent is not None:
self.saturationVolumetricMoistureContent = saturationVolumetricMoistureContent
if residualVolumetricMoistureContent is not None:
self.residualVolumetricMoistureContent = residualVolumetricMoistureContent
if initialVolumetricMoistureContent is not None:
self.initialVolumetricMoistureContent = initialVolumetricMoistureContent
class Plant(EObject, metaclass=MetaEClass):
name = EAttribute(eType=EString, unique=True, derived=False, changeable=True)
height = EAttribute(eType=EString, unique=True, derived=False,
changeable=True, default_value='0.1 m')
leafAreaIndex = EAttribute(eType=EString, unique=True, derived=False,
changeable=True, default_value='2.5')
leafReflectivity = EAttribute(eType=EString, unique=True,
derived=False, changeable=True, default_value='0.1')
leafEmissivity = EAttribute(eType=EString, unique=True, derived=False,
changeable=True, default_value='0.9')
minimalStomatalResistance = EAttribute(
eType=EString, unique=True, derived=False, changeable=True, default_value='100.0 s/m')
co2Sequestration = EAttribute(eType=EString, unique=True, derived=False,
changeable=True, default_value='kgCO₂eq')
growsOn = EReference(ordered=True, unique=True, containment=False, derived=False, upper=-1)
def __init__(self, *, name=None, height=None, leafAreaIndex=None, leafReflectivity=None, leafEmissivity=None, minimalStomatalResistance=None, growsOn=None, co2Sequestration=None):
# if kwargs:
# raise AttributeError('unexpected arguments: {}'.format(kwargs))
super().__init__()
if name is not None:
self.name = name
if height is not None:
self.height = height
if leafAreaIndex is not None:
self.leafAreaIndex = leafAreaIndex
if leafReflectivity is not None:
self.leafReflectivity = leafReflectivity
if leafEmissivity is not None:
self.leafEmissivity = leafEmissivity
if minimalStomatalResistance is not None:
self.minimalStomatalResistance = minimalStomatalResistance
if co2Sequestration is not None:
self.co2Sequestration = co2Sequestration
if growsOn:
self.growsOn.extend(growsOn)
class SupportEnvelope(EObject, metaclass=MetaEClass):
roughness = EAttribute(eType=Roughness, unique=True, derived=False,
changeable=True, default_value=Roughness.MediumRough)
solarAbsorptance = EAttribute(eType=EDouble, unique=True,
derived=False, changeable=True, default_value=0.0)
conductivity = EAttribute(eType=EDouble, unique=True, derived=False,
changeable=True, default_value=0.0)
visibleAbsorptance = EAttribute(eType=EDouble, unique=True,
derived=False, changeable=True, default_value=0.0)
specificHeat = EAttribute(eType=EDouble, unique=True, derived=False,
changeable=True, default_value=0.0)
density = EAttribute(eType=EDouble, unique=True, derived=False,
changeable=True, default_value=0.0)
thermalAbsorptance = EAttribute(eType=EDouble, unique=True,
derived=False, changeable=True, default_value=0.0)
def __init__(self, *, roughness=None, solarAbsorptance=None, conductivity=None, visibleAbsorptance=None, specificHeat=None, density=None, thermalAbsorptance=None):
# if kwargs:
# raise AttributeError('unexpected arguments: {}'.format(kwargs))
super().__init__()
if roughness is not None:
self.roughness = roughness
if solarAbsorptance is not None:
self.solarAbsorptance = solarAbsorptance
if conductivity is not None:
self.conductivity = conductivity
if visibleAbsorptance is not None:
self.visibleAbsorptance = visibleAbsorptance
if specificHeat is not None:
self.specificHeat = specificHeat
if density is not None:
self.density = density
if thermalAbsorptance is not None:
self.thermalAbsorptance = thermalAbsorptance
class GreeneryCatalog(EObject, metaclass=MetaEClass):
name = EAttribute(eType=EString, unique=True, derived=False, changeable=True)
description = EAttribute(eType=EString, unique=True, derived=False, changeable=True)
source = EAttribute(eType=EString, unique=True, derived=False, changeable=True)
plantCategories = EReference(ordered=True, unique=True,
containment=True, derived=False, upper=-1)
vegetationCategories = EReference(ordered=True, unique=True,
containment=True, derived=False, upper=-1)
soils = EReference(ordered=True, unique=True, containment=True, derived=False, upper=-1)
def __init__(self, *, name=None, description=None, source=None, plantCategories=None, vegetationCategories=None, soils=None):
# if kwargs:
# raise AttributeError('unexpected arguments: {}'.format(kwargs))
super().__init__()
if name is not None:
self.name = name
if description is not None:
self.description = description
if source is not None:
self.source = source
if plantCategories:
self.plantCategories.extend(plantCategories)
if vegetationCategories:
self.vegetationCategories.extend(vegetationCategories)
if soils:
self.soils.extend(soils)
class PlantCategory(EObject, metaclass=MetaEClass):
"""Excluding (that is non-overlapping) categories like Trees, Hedeges, Grasses that help users finding a specific biol. plant species."""
name = EAttribute(eType=EString, unique=True, derived=False, changeable=True)
plants = EReference(ordered=True, unique=True, containment=True, derived=False, upper=-1)
def __init__(self, *, name=None, plants=None):
# if kwargs:
# raise AttributeError('unexpected arguments: {}'.format(kwargs))
super().__init__()
if name is not None:
self.name = name
if plants:
self.plants.extend(plants)
class IrrigationSchedule(EObject, metaclass=MetaEClass):
name = EAttribute(eType=EString, unique=True, derived=False, changeable=True)
def __init__(self, *, name=None):
# if kwargs:
# raise AttributeError('unexpected arguments: {}'.format(kwargs))
super().__init__()
if name is not None:
self.name = name
class Vegetation(EObject, metaclass=MetaEClass):
"""Plant life or total plant cover (as of an area)"""
name = EAttribute(eType=EString, unique=True, derived=False, changeable=True)
thicknessOfSoil = EAttribute(eType=EString, unique=True, derived=False,
changeable=True, default_value='20 cm')
management = EAttribute(eType=Management, unique=True, derived=False,
changeable=True, default_value=Management.NA)
airGap = EAttribute(eType=EString, unique=True, derived=False,
changeable=True, default_value='0.0 cm')
soil = EReference(ordered=True, unique=True, containment=False, derived=False)
plants = EReference(ordered=True, unique=True, containment=True, derived=False, upper=-1)
def __init__(self, *, name=None, thicknessOfSoil=None, soil=None, plants=None, management=None, airGap=None):
# if kwargs:
# raise AttributeError('unexpected arguments: {}'.format(kwargs))
super().__init__()
if name is not None:
self.name = name
if thicknessOfSoil is not None:
self.thicknessOfSoil = thicknessOfSoil
if management is not None:
self.management = management
if airGap is not None:
self.airGap = airGap
if soil is not None:
self.soil = soil
if plants:
self.plants.extend(plants)
class VegetationCategory(EObject, metaclass=MetaEClass):
"""Excluding (that is non-overlapping) categories to help users finding a specific vegetation template."""
name = EAttribute(eType=EString, unique=True, derived=False, changeable=True)
vegetationTemplates = EReference(ordered=True, unique=True,
containment=True, derived=False, upper=-1)
def __init__(self, *, vegetationTemplates=None, name=None):
# if kwargs:
# raise AttributeError('unexpected arguments: {}'.format(kwargs))
super().__init__()
if name is not None:
self.name = name
if vegetationTemplates:
self.vegetationTemplates.extend(vegetationTemplates)
class PlantPercentage(EObject, metaclass=MetaEClass):
percentage = EAttribute(eType=EString, unique=True, derived=False,
changeable=True, default_value='100')
plant = EReference(ordered=True, unique=True, containment=False, derived=False)
def __init__(self, *, percentage=None, plant=None):
# if kwargs:
# raise AttributeError('unexpected arguments: {}'.format(kwargs))
super().__init__()
if percentage is not None:
self.percentage = percentage
if plant is not None:
self.plant = plant

View File

@ -0,0 +1,268 @@
<?xml version="1.0" encoding="UTF-8"?>
<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="greenerycatalog" nsURI="http://ca.concordia/greenerycatalog"
nsPrefix="greenery">
<eClassifiers xsi:type="ecore:EClass" name="Soil">
<eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
<details key="constraints" value="nonNegative"/>
</eAnnotations>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
defaultValueLiteral=""/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="roughness" eType="#//Roughness"
defaultValueLiteral="MediumRough">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="defines the relative roughness of a particular material layer. This parameter only influences the convection coefficients, more specifically the exterior convection coefficient. A nominal value is expected in with the options being &quot;VeryRough&quot;, &quot;Rough&quot;, &quot;MediumRough&quot;, &quot;MediumSmooth&quot;, &quot;Smooth&quot;, and &quot;VerySmooth&quot; in order of roughest to smoothest options."/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="conductivityOfDrySoil"
lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
defaultValueLiteral="1.0 W/(m*K)">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="Thermal conductivity W/(m-K). Range: 0.2 to 1.5"/>
</eAnnotations>
<eAnnotations source="http://www.hft-stuttgart.de/UomQuantities">
<details key="min" value="0.2"/>
<details key="max" value="1.5"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="densityOfDrySoil" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
defaultValueLiteral="1100 kg/m³">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="Density in kg/m³. "/>
</eAnnotations>
<eAnnotations source="http://www.hft-stuttgart.de/UomQuantities">
<details key="min" value="0.1"/>
<details key="max" value="10000"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="specificHeatOfDrySoil"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
defaultValueLiteral="1200 J/(kg*K)">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="in units of J/(kg-K). Range(300 to 2000)"/>
</eAnnotations>
<eAnnotations source="http://www.hft-stuttgart.de/UomQuantities">
<details key="min" value="0.2"/>
<details key="max" value="2000"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="thermalAbsorptance" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
defaultValueLiteral="0.9">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="the fraction of incident long wavelength (>2.5 microns) radiation that is absorbed by the material. This parameter is used when calculating the long wavelength radiant exchange between various surfaces and affects the surface heat balances (both inside and outside as appropriate). For long wavelength radiant exchange, thermal emissivity and thermal emittance are equal to thermal absorptance. Range: 0 to 1"/>
</eAnnotations>
<eAnnotations source="http://www.hft-stuttgart.de/UomQuantities">
<details key="min" value="0.0"/>
<details key="max" value="1.0"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="solarAbsorptance" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
defaultValueLiteral="0.7">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="the fraction of incident solar radiation that is absorbed by the material.&#xA;Solar radiation (0.3 to 2.537 microns) includes the visible spectrum as well as infrared and ultraviolet wavelengths. This parameter is used when calculating the amount of incident solar radiation absorbed by various surfaces and affects the surface heat balances (both inside and outside as appropriate). If solar reflectance (or reflectivity) data is available, then absorptance is equal to 1.0 minus reflectance (for opaque materials).&#xA;Range: 0 to 1"/>
</eAnnotations>
<eAnnotations source="http://www.hft-stuttgart.de/UomQuantities">
<details key="min" value="0.0"/>
<details key="max" value="1.0"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="visibleAbsorptance" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
defaultValueLiteral="0.75">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="The visible absorptance field in the Material input syntax represents the fraction of incident visible wavelength radiation that is absorbed by the material.&#xA;Visible wavelength radiation (0.37 to 0.78 microns weighted by photopic response) is slightly different than solar radiation in that the visible band of wavelengths is much more narrow while solar radiation includes the visible spectrum as well as infrared and ultraviolet wavelengths.&#xA;This parameter is used when calculating the amount of incident visible radiation absorbed by various surfaces and affects the surface heat balances (both inside and outside as appropriate) as well as the daylighting calculations. If visible reflectance (or reflectivity) data is available, then absorptance is equal to 1.0 minus reflectance (for opaque materials).&#xA;Range: 0.5 to 1.0"/>
</eAnnotations>
<eAnnotations source="http://www.hft-stuttgart.de/UomQuantities">
<details key="min" value="0.5"/>
<details key="max" value="1.0"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="saturationVolumetricMoistureContent"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
defaultValueLiteral="0.0">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="input of the saturation moisture content of the soil layer. Range: 0.1 to 0.5"/>
</eAnnotations>
<eAnnotations source="http://www.hft-stuttgart.de/UomQuantities">
<details key="min" value="0.1"/>
<details key="max" value="0.5"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="residualVolumetricMoistureContent"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
defaultValueLiteral="0.05">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="Input of the residual moisture content of the soil layer. Range: 0.01 to 0.1"/>
</eAnnotations>
<eAnnotations source="http://www.hft-stuttgart.de/UomQuantities">
<details key="min" value="0.01"/>
<details key="max" value="0.1"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="initialVolumetricMoistureContent"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
defaultValueLiteral="0.1">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="Range: 0.05 to 0.5"/>
</eAnnotations>
<eAnnotations source="http://www.hft-stuttgart.de/UomQuantities">
<details key="min" value="0.05"/>
<details key="max" value="0.5"/>
</eAnnotations>
</eStructuralFeatures>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Plant">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="height" lowerBound="1"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
defaultValueLiteral="0.1 m">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="Maximum height of plants. Range: 0.005 to 1 m"/>
</eAnnotations>
<eAnnotations source="http://www.hft-stuttgart.de/UomQuantities">
<details key="min" value="0.005"/>
<details key="max" value="1.0"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="leafAreaIndex" lowerBound="1"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
defaultValueLiteral="2.5">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="Leaf area per unit area of soil surface. Range: 0.001 to 5.0 m²/m²"/>
</eAnnotations>
<eAnnotations source="http://www.hft-stuttgart.de/UomQuantities">
<details key="min" value="0.001"/>
<details key="max" value="5.0"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="leafReflectivity" lowerBound="1"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
defaultValueLiteral="0.1">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="Represents the fraction of incident solar radiation that is reflected by the individual leaf surfaces (albedo).&#xA;Range: 0.05 to 0.5"/>
</eAnnotations>
<eAnnotations source="http://www.hft-stuttgart.de/UomQuantities">
<details key="min" value="0.05"/>
<details key="max" value="0.5"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="leafEmissivity" lowerBound="1"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
defaultValueLiteral="0.9">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="Ratio of thermal radiation emitted from leaf surfaces to that emitted by an ideal black body at the same temperature.&#xA;This parameter is used when calculating the long wavelength radiant exchange at the leaf surfaces.&#xA;Range: 0.8 to 1"/>
</eAnnotations>
<eAnnotations source="http://www.hft-stuttgart.de/UomQuantities">
<details key="min" value="0.8"/>
<details key="max" value="1.0"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="minimalStomatalResistance"
lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
defaultValueLiteral="100.0 s/m">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="Resistance of the plants to moisture transport.&#xA;Plants with low values of stomatal resistance will result in higher evapotranspiration rates than plants with high resistance.&#xA;Range: 50 to 300 m/s"/>
</eAnnotations>
<eAnnotations source="http://www.hft-stuttgart.de/UomQuantities">
<details key="min" value="50.0"/>
<details key="max" value="300.0"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EReference" name="growsOn" lowerBound="1"
upperBound="-1" eType="#//Soil"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="co2Sequestration" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
defaultValueLiteral="kgCO₂eq"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="SupportEnvelope">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="roughness" eType="#//Roughness"
defaultValueLiteral="MediumRough"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="solarAbsorptance" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDouble"
defaultValueLiteral="0.0"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="conductivity" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDouble"
defaultValueLiteral="0.0"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="visibleAbsorptance" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDouble"
defaultValueLiteral="0.0"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="specificHeat" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDouble"
defaultValueLiteral="0.0"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="density" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDouble"
defaultValueLiteral="0.0"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="thermalAbsorptance" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDouble"
defaultValueLiteral="0.0"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="GreeneryCatalog">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="description" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="source" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="plantCategories" lowerBound="1"
upperBound="-1" eType="#//PlantCategory" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="vegetationCategories" lowerBound="1"
upperBound="-1" eType="#//VegetationCategory" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="soils" upperBound="-1"
eType="#//Soil" containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="PlantCategory">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="Excluding (that is non-overlapping) categories like Trees, Hedeges, Grasses that help users finding a specific biol. plant species."/>
</eAnnotations>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="plants" upperBound="-1"
eType="#//Plant" containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="IrrigationSchedule">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Vegetation">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="Plant life or total plant cover (as of an area)"/>
</eAnnotations>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="thicknessOfSoil" lowerBound="1"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
defaultValueLiteral="20 cm">
<eAnnotations source="http://www.hft-stuttgart.de/UomQuantities">
<details key="min" value="0"/>
<details key="max" value="1000"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EReference" name="soil" lowerBound="1" eType="#//Soil"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="plants" lowerBound="1"
upperBound="-1" eType="#//PlantPercentage" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="management" lowerBound="1"
eType="#//Management" defaultValueLiteral="NA"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="airGap" lowerBound="1"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
defaultValueLiteral="0.0 cm"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="VegetationCategory">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="Excluding (that is non-overlapping) categories to help users finding a specific vegetation template."/>
</eAnnotations>
<eStructuralFeatures xsi:type="ecore:EReference" name="vegetationTemplates" upperBound="-1"
eType="#//Vegetation" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EEnum" name="Management">
<eLiterals name="Intensive"/>
<eLiterals name="Extensive" value="1"/>
<eLiterals name="SemiIntensive" value="2"/>
<eLiterals name="NA" value="3"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="PlantPercentage">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="percentage" lowerBound="1"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
defaultValueLiteral="100">
<eAnnotations source="http://www.hft-stuttgart.de/UomQuantities">
<details key="min" value="0"/>
<details key="max" value="100"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EReference" name="plant" lowerBound="1" eType="#//Plant"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EEnum" name="Roughness">
<eLiterals name="VeryRough"/>
<eLiterals name="Rough" value="1"/>
<eLiterals name="MediumRough" value="2"/>
<eLiterals name="MediumSmooth" value="3"/>
<eLiterals name="Smooth" value="4"/>
<eLiterals name="VerySmooth" value="5"/>
</eClassifiers>
</ecore:EPackage>

View File

@ -0,0 +1,41 @@
"""
Greenery catalog
SPDX - License - Identifier: LGPL - 3.0 - or -later
Copyright © 2022 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca
"""
from pyecore.resources import ResourceSet, URI
from catalogs.greenery.ecore_greenery.greenerycatalog import GreeneryCatalog as gc
from catalogs.catalog import Catalog
from pathlib import Path
class GreeneryCatalog(Catalog):
def __init__(self, path):
base_path = Path(Path(__file__).parent / 'ecore_greenery' / 'greenerycatalog_no_quantities.ecore')
resource_set = ResourceSet()
data_model = resource_set.get_resource(URI(str(base_path)))
data_model_root = data_model.contents[0]
resource_set.metamodel_registry[data_model_root.nsURI] = data_model_root
resource = resource_set.get_resource(URI(str(path)))
catalog_data: gc = resource.contents[0]
self._data = {'vegetation': []}
vegetation = []
for vegetation_category in catalog_data.vegetationCategories:
vegetation.append({vegetation_category.name: []})
self._data['vegetation'] = vegetation
@property
def names(self):
"""
:parm:
"""
_names = []
for category in self._data:
for value in self._data[category]:
for key in value.keys():
_names.append(key)
return _names

View File

@ -0,0 +1,44 @@
"""
Greenery catalog publish the greenery information
SPDX - License - Identifier: LGPL - 3.0 - or -later
Copyright © 2022 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca
"""
from pathlib import Path
from catalogs.greenery.greenery_catalog import GreeneryCatalog
class GreeneryCatalogFactory:
"""
GeometryFactory class
"""
def __init__(self, file_type, base_path=None):
if base_path is None:
base_path = Path(Path(__file__).parent.parent / 'data/greenery')
self._file_type = '_' + file_type.lower()
self._path = base_path
@property
def _nrel(self) -> GreeneryCatalog:
"""
Return a greenery catalog using ecore as datasource
:return: GreeneryCatalog
"""
print('greenery')
return GreeneryCatalog((self._path / 'ecore_greenery_catalog.xml').resolve())
@property
def catalog(self) -> GreeneryCatalog:
"""
Enrich the city given to the class using the class given handler
:return: City
"""
return getattr(self, self._file_type, lambda: None)
@property
def catalog_debug(self) -> GreeneryCatalog:
"""
Enrich the city given to the class using the class given handler
:return: City
"""
return GreeneryCatalog((self._path / 'ecore_greenery_catalog.xml').resolve())

View File

@ -0,0 +1,59 @@
<?xml version="1.0" encoding="UTF-8"?>
<greenery:GreeneryCatalog xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:greenery="http://ca.concordia/greenerycatalog">
<plantCategories name="Flowers">
<plants name="Camellia Sasanqua" height="0.4 m" leafAreaIndex="2.18" leafReflectivity="0.2" leafEmissivity="0.9" minimalStomatalResistance="288 s/m" growsOn="//@soils.0 //@soils.2 //@soils.4 //@soils.3 //@soils.1"/>
<plants name="Rhododendron" height="0.5 m" leafAreaIndex="1.85" minimalStomatalResistance="161 s/m" growsOn="//@soils.0 //@soils.3"/>
<plants name="Ligustrum Japonicum 'Howardii' " height="0.48 m" leafAreaIndex="4.93" minimalStomatalResistance="172 s/m" growsOn="//@soils.0 //@soils.3"/>
<plants name="Viburnum Dilatatum (Thunb)" height="0.7 m" leafAreaIndex="5" minimalStomatalResistance="212 s/m" growsOn="//@soils.0 //@soils.3 //@soils.2 //@soils.4 //@soils.1"/>
<plants name="Lorpetalum Chinense var. Rubrum" height="0.7 m" leafAreaIndex="2" leafReflectivity="0.1" minimalStomatalResistance="228 s/m" growsOn="//@soils.0 //@soils.2 //@soils.3 //@soils.1"/>
<plants name="Buxus sinica" height="0.45 m" leafAreaIndex="4.03" minimalStomatalResistance="165 s/m" growsOn="//@soils.2 //@soils.0 //@soils.3 //@soils.5 //@soils.1"/>
<plants name="Sedum acre" height="0.1 m" leafAreaIndex="3.5" leafReflectivity="0.36" leafEmissivity="0.9" growsOn="//@soils.2 //@soils.0 //@soils.1 //@soils.3"/>
<plants name="Frankenia thymifolia" height="0.15 m" leafAreaIndex="3.6" leafReflectivity="0.32" leafEmissivity="0.83" growsOn="//@soils.2 //@soils.1 //@soils.0 //@soils.3"/>
<plants name="Vinca major" leafAreaIndex="2.7" leafReflectivity="0.25" leafEmissivity="0.78" growsOn="//@soils.2 //@soils.0 //@soils.3 //@soils.1"/>
<plants name="Ivy (hedera helix)" height="0.1 m" leafAreaIndex="5" growsOn="//@soils.4 //@soils.1 //@soils.2 //@soils.0 //@soils.3"/>
</plantCategories>
<plantCategories name="Grass">
<plants name="Lawn" height="0.06 m" leafAreaIndex="1.4" leafReflectivity="0.1" minimalStomatalResistance="50 s/m" growsOn="//@soils.2"/>
</plantCategories>
<plantCategories name="Farming">
<plants name="Strawberry" growsOn="//@soils.2"/>
<plants name="Tomato" leafEmissivity="0.8" growsOn="//@soils.2 //@soils.3"/>
<plants name="Lettuce" growsOn="//@soils.2"/>
</plantCategories>
<vegetationCategories name="Urban Greening">
<vegetationTemplates name="Grass" soil="//@soils.1" management="Extensive">
<plants plant="//@plantCategories.1/@plants.0"/>
</vegetationTemplates>
</vegetationCategories>
<vegetationCategories name="Green Facade">
<vegetationTemplates name="Green Facade" soil="//@soils.2">
<plants percentage="100" plant="//@plantCategories.0/@plants.9"/>
</vegetationTemplates>
</vegetationCategories>
<vegetationCategories name="GreenRoof">
<vegetationTemplates name="Green Roof" thicknessOfSoil="20 cm" soil="//@soils.2">
<plants percentage="10" plant="//@plantCategories.0/@plants.5"/>
<plants percentage="10" plant="//@plantCategories.0/@plants.0"/>
<plants percentage="10" plant="//@plantCategories.0/@plants.8"/>
<plants percentage="10" plant="//@plantCategories.0/@plants.2"/>
<plants percentage="10" plant="//@plantCategories.0/@plants.4"/>
<plants percentage="10" plant="//@plantCategories.0/@plants.6"/>
<plants percentage="10" plant="//@plantCategories.0/@plants.1"/>
<plants percentage="10" plant="//@plantCategories.0/@plants.3"/>
<plants percentage="20" plant="//@plantCategories.0/@plants.7"/>
</vegetationTemplates>
</vegetationCategories>
<vegetationCategories name="Rooftop Farming">
<vegetationTemplates name="Rooftop Farming" thicknessOfSoil="30 cm" soil="//@soils.2">
<plants percentage="19" plant="//@plantCategories.2/@plants.0"/>
<plants percentage="60" plant="//@plantCategories.2/@plants.1"/>
<plants percentage="21" plant="//@plantCategories.2/@plants.2"/>
</vegetationTemplates>
</vegetationCategories>
<soils name="Sand" conductivityOfDrySoil="1.26 W/(m·K)" saturationVolumetricMoistureContent="0.43" residualVolumetricMoistureContent="0.045"/>
<soils name="Loamy sand" conductivityOfDrySoil="0.35 W/(m·K)" saturationVolumetricMoistureContent="0.41" residualVolumetricMoistureContent="0.057"/>
<soils name="Loam" conductivityOfDrySoil="0.67 W/(m·K)" specificHeatOfDrySoil="900 J/(kg·K)" thermalAbsorptance="0.9" saturationVolumetricMoistureContent="0.43" residualVolumetricMoistureContent="0.078"/>
<soils name="Sandy Loam" conductivityOfDrySoil="1.06 W/(m·K)" saturationVolumetricMoistureContent="0.41" residualVolumetricMoistureContent="0.065"/>
<soils name="Clay loam" conductivityOfDrySoil="0.7 W/(m·K)" saturationVolumetricMoistureContent="0.41" residualVolumetricMoistureContent="0.095"/>
<soils name="Silt" conductivityOfDrySoil="0.35 W/(m·K)" saturationVolumetricMoistureContent="0.46" residualVolumetricMoistureContent="0.034"/>
</greenery:GreeneryCatalog>

View File

@ -3,6 +3,7 @@ Rhino module parses rhino files and import the geometry into the city model stru
SPDX - License - Identifier: LGPL - 3.0 - or -later
Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca
"""
import numpy as np
from numpy import inf
from rhino3dm import *
from rhino3dm._rhino3dm import MeshType