Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
IN-SOURCE
FWE ADE
Commits
96135fe8
Commit
96135fe8
authored
Jul 05, 2021
by
Rushikesh Padsala
Browse files
addeded citygml4j
parent
d94d86d1
Pipeline
#4532
passed with stage
in 15 seconds
Changes
28
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
foodwaterenergycitygml4j/src/main/java/de/hft/stuttgart/ade/foodwaterenergycitygml4j/landuse/model/xsd/package-info.java
0 → 100644
View file @
96135fe8
/*-
* Copyright 2021 Hochschule für Technik Stuttgart
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
@javax
.
xml
.
bind
.
annotation
.
XmlSchema
(
namespace
=
"http://transfer.hft-stuttgart.de/pages/in-source/fwe-ade/FWELanduse/v2.1.1/XSD"
,
elementFormDefault
=
javax
.
xml
.
bind
.
annotation
.
XmlNsForm
.
QUALIFIED
,
xmlns
=
{
@javax
.
xml
.
bind
.
annotation
.
XmlNs
(
namespaceURI
=
"http://transfer.hft-stuttgart.de/pages/in-source/fwe-ade/FWELanduse/v2.1.1/XSD"
,
prefix
=
"fwel"
)
})
package
de.hft.stuttgart.ade.foodwaterenergycitygml4j.landuse.model.xsd
;
foodwaterenergycitygml4j/src/main/java/de/hft/stuttgart/ade/foodwaterenergycitygml4j/module/FoodWaterEnergyLandUseADEModule.java
0 → 100644
View file @
96135fe8
/*-
* Copyright 2021 Hochschule für Technik Stuttgart
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
de.hft.stuttgart.ade.foodwaterenergycitygml4j.module
;
import
org.citygml4j.model.gml.feature.AbstractFeature
;
import
org.citygml4j.model.module.ade.ADEModule
;
import
org.citygml4j.model.module.citygml.CityGMLVersion
;
import
de.hft.stuttgart.ade.foodwaterenergycitygml4j.FoodWaterEnergyLandUseADEContext
;
import
de.hft.stuttgart.ade.foodwaterenergycitygml4j.landuse.model.FoodWaterEnergy
;
import
javax.xml.namespace.QName
;
import
java.net.URL
;
import
java.util.*
;
import
java.util.Map.Entry
;
public
class
FoodWaterEnergyLandUseADEModule
extends
ADEModule
{
public
static
final
String
NAMESPACE_URI
=
"http://transfer.hft-stuttgart.de/pages/in-source/fwe-ade/FWELanduse/v2.1.1/XSD"
;
public
static
final
FoodWaterEnergyLandUseADEModule
V0_1
=
new
FoodWaterEnergyLandUseADEModule
();
private
HashMap
<
String
,
Class
<?
extends
AbstractFeature
>>
features
;
private
HashSet
<
String
>
featureProperties
;
private
static
final
long
serialVersionUID
=
8208579547274734280L
;
private
FoodWaterEnergyLandUseADEModule
()
{
super
(
NAMESPACE_URI
,
"fwel"
,
CityGMLVersion
.
v2_0_0
);
features
=
new
HashMap
<>();
features
.
put
(
"FoodWaterEnergy"
,
FoodWaterEnergy
.
class
);
featureProperties
=
new
HashSet
<>();
}
@Override
public
URL
getSchemaResource
()
{
return
FoodWaterEnergyLandUseADEContext
.
class
.
getResource
(
"/schema/FWELanduse.xsd"
);
}
@Override
public
List
<
String
>
getJAXBPackageNames
()
{
return
Collections
.
singletonList
(
"de.hft.stuttgart.ade.foodwaterenergycitygml4j.landuse.model.xsd"
);
}
@Override
public
boolean
hasFeatureProperty
(
String
name
)
{
return
featureProperties
.
contains
(
name
);
}
@Override
public
boolean
hasFeature
(
String
name
)
{
return
features
.
containsKey
(
name
);
}
@Override
public
Class
<?
extends
AbstractFeature
>
getFeatureClass
(
String
name
)
{
return
features
.
get
(
name
);
}
@Override
public
QName
getFeatureName
(
Class
<?
extends
AbstractFeature
>
featureClass
)
{
for
(
Entry
<
String
,
Class
<?
extends
AbstractFeature
>>
entry
:
features
.
entrySet
())
{
if
(
entry
.
getValue
()
==
featureClass
)
return
new
QName
(
getNamespaceURI
(),
entry
.
getKey
());
}
return
null
;
}
@Override
public
Map
<
String
,
Class
<?
extends
AbstractFeature
>>
getFeatures
()
{
return
new
HashMap
<>(
features
);
}
@Override
public
boolean
isTopLevelFeature
(
String
name
)
{
return
false
;
}
}
foodwaterenergycitygml4j/src/main/resources/META-INF/services/org.citygml4j.model.citygml.ade.binding.ADEContext
0 → 100644
View file @
96135fe8
de.hft.stuttgart.ade.foodwaterenergycitygml4j.FoodWaterEnergyLandUseADEContext
\ No newline at end of file
foodwaterenergycitygml4j/src/main/resources/schema/FWELanduse.xsd
0 → 100644
View file @
96135fe8
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<schema
xmlns=
"http://www.w3.org/2001/XMLSchema"
xmlns:fwel=
"http://transfer.hft-stuttgart.de/pages/in-source/fwe-ade/FWELanduse/v2.1.1/XSD"
targetNamespace=
"http://transfer.hft-stuttgart.de/pages/in-source/fwe-ade/FWELanduse/v2.1.1/XSD"
xmlns:core=
"http://www.opengis.net/citygml/2.0"
xmlns:bldg=
"http://www.opengis.net/citygml/building/2.0"
xmlns:luse=
"http://www.opengis.net/citygml/landuse/2.0"
xmlns:gml=
"http://www.opengis.net/gml"
elementFormDefault=
"qualified"
version=
"1.0"
>
<import
namespace=
"http://www.opengis.net/citygml/2.0"
schemaLocation=
"http://schemas.opengis.net/citygml/2.0/cityGMLBase.xsd"
/>
<import
namespace=
"http://www.opengis.net/citygml/building/2.0"
schemaLocation=
"http://schemas.opengis.net/citygml/building/2.0/building.xsd"
/>
<import
namespace=
"http://www.opengis.net/citygml/landuse/2.0"
schemaLocation=
"http://schemas.opengis.net/citygml/landuse/2.0/landUse.xsd"
/>
<import
namespace=
"http://www.opengis.net/citygml/appearance/2.0"
schemaLocation=
"http://schemas.opengis.net/citygml/appearance/2.0/appearance.xsd"
/>
<import
namespace=
"http://www.opengis.net/citygml/generics/2.0"
schemaLocation=
"http://schemas.opengis.net/citygml/generics/2.0/generics.xsd"
/>
<import
namespace=
"http://www.opengis.net/gml"
schemaLocation=
"http://schemas.opengis.net/gml/3.1.1/base/gmlBase.xsd"
/>
<element
name=
"foodwaterenergy"
type=
"fwel:foodwaterenergyType"
substitutionGroup=
"luse:_GenericApplicationPropertyOfLandUse"
/>
<complexType
name=
"foodwaterenergyType"
>
<annotation>
<documentation>
Data structure of foodwaterenergyType
</documentation>
</annotation>
<sequence>
<element
name=
"fweAreaName"
minOccurs=
"0"
maxOccurs=
"1"
type=
"string"
/>
<element
name=
"fweSystemName"
minOccurs=
"0"
maxOccurs=
"1"
type=
"string"
/>
<element
name=
"consistsOfFWESurvey"
minOccurs=
"0"
maxOccurs=
"1"
type=
"fwel:consistsOffwesurveyType"
/>
</sequence>
<attribute
ref=
"gml:id"
/>
</complexType>
<complexType
name=
"consistsOffwesurveyType"
>
<annotation>
<documentation>
Data structure of consistsOffwesurveyType
</documentation>
</annotation>
<sequence>
<element
name=
"landUseSurvey"
minOccurs=
"0"
maxOccurs=
"unbounded"
type=
"fwel:landUseSurveyType"
/>
</sequence>
</complexType>
<complexType
name=
"landUseSurveyType"
>
<annotation>
<documentation>
Data structure of landUseSurveyType
</documentation>
</annotation>
<sequence>
<element
name=
"buildingFootprintArea"
maxOccurs=
"1"
type=
"gml:AreaType"
/>
<element
name=
"population"
maxOccurs=
"1"
type=
"int"
/>
<element
name=
"surveyYear"
maxOccurs=
"1"
type=
"int"
/>
<element
name=
"surveyYearVersion"
maxOccurs=
"1"
type=
"double"
/>
<element
name=
"surveyDescription"
maxOccurs=
"1"
type=
"string"
/>
<element
name=
"surfaceArea"
minOccurs=
"0"
type=
"gml:AreaType"
/>
<element
name=
"foodSurvey"
minOccurs=
"0"
maxOccurs=
"1"
type=
"fwel:foodSurveyType"
/>
<element
name=
"waterSurvey"
minOccurs=
"0"
maxOccurs=
"1"
type=
"fwel:waterSurveyType"
/>
<element
name=
"energySurvey"
minOccurs=
"0"
maxOccurs=
"1"
type=
"fwel:energySurveyType"
/>
</sequence>
<attribute
ref=
"gml:id"
/>
</complexType>
<complexType
name=
"foodSurveyType"
>
<annotation>
<documentation>
Data structure of foodSurveyType
</documentation>
</annotation>
<sequence>
<!-- <element name="animalCalories" minOccurs="0" maxOccurs="1" type="gml:ScaleType"/> -->
<element
name=
"foodCategory"
minOccurs=
"0"
maxOccurs=
"1"
type=
"gml:CodeType"
/>
<element
name=
"foodDemand"
minOccurs=
"0"
maxOccurs=
"1"
type=
"gml:ScaleType"
/>
<element
name=
"foodProduction"
minOccurs=
"0"
maxOccurs=
"1"
type=
"gml:ScaleType"
/>
<element
name=
"foodProductionWaterDemand"
minOccurs=
"0"
maxOccurs=
"1"
type=
"gml:ScaleType"
/>
<element
name=
"foodProductionEnergyDemand"
minOccurs=
"0"
maxOccurs=
"1"
type=
"gml:ScaleType"
/>
<element
name=
"foodConsumption"
minOccurs=
"0"
maxOccurs=
"1"
type=
"gml:ScaleType"
/>
<!-- <element name="vegetalCalories" minOccurs="0" maxOccurs="1" type="gml:ScaleType"/>
<element name="cropCalories" minOccurs="0" maxOccurs="1" type="gml:ScaleType"/> -->
</sequence>
<attribute
ref=
"gml:id"
/>
</complexType>
<complexType
name=
"waterSurveyType"
>
<annotation>
<documentation>
Data structure of waterSurveyType
</documentation>
</annotation>
<sequence>
<element
name=
"domesticHotWaterDemand"
minOccurs=
"0"
maxOccurs=
"1"
type=
"gml:ScaleType"
/>
<element
name=
"domesticHotWaterEnergyDemand"
minOccurs=
"0"
maxOccurs=
"1"
type=
"gml:ScaleType"
/>
<element
name=
"domesticSolidWaste"
minOccurs=
"0"
maxOccurs=
"1"
type=
"gml:ScaleType"
/>
<element
name=
"domesticWaterDemand"
minOccurs=
"0"
maxOccurs=
"1"
type=
"gml:ScaleType"
/>
<element
name=
"domesticWaterWaste"
minOccurs=
"0"
maxOccurs=
"1"
type=
"gml:ScaleType"
/>
<element
name=
"totalDomesticWaste"
minOccurs=
"0"
maxOccurs=
"1"
type=
"gml:ScaleType"
/>
<!--
<element name="irrigationDemand" minOccurs="0" maxOccurs="1" type="gml:ScaleType"/>
<element name="transpirationLoss" minOccurs="0" maxOccurs="1" type="gml:ScaleType"/>
-->
</sequence>
<attribute
ref=
"gml:id"
/>
</complexType>
<complexType
name=
"energySurveyType"
>
<annotation>
<documentation>
Data structure of energySurveyType
</documentation>
</annotation>
<sequence>
<element
name=
"spaceHeatingDemand"
minOccurs=
"0"
maxOccurs=
"1"
type=
"gml:ScaleType"
/>
<element
name=
"spaceCoolingDemand"
minOccurs=
"0"
maxOccurs=
"1"
type=
"gml:ScaleType"
/>
<element
name=
"residentialElectricityDemand"
minOccurs=
"0"
maxOccurs=
"1"
type=
"gml:ScaleType"
/>
<element
name=
"electricityPotentialFromPVBuildings"
minOccurs=
"0"
maxOccurs=
"1"
type=
"gml:ScaleType"
/>
<element
name=
"vegetationCoverCategory"
minOccurs=
"0"
maxOccurs=
"1"
type=
"gml:CodeType"
/>
<element
name=
"biomassPrimaryEnergyPotential"
minOccurs=
"0"
maxOccurs=
"1"
type=
"gml:ScaleType"
/>
<element
name=
"biomassToEnergyWoods"
minOccurs=
"0"
maxOccurs=
"1"
type=
"gml:ScaleType"
/>
<element
name=
"biomassToBiogas"
minOccurs=
"0"
maxOccurs=
"1"
type=
"gml:ScaleType"
/>
<element
name=
"biomassToPlantOil"
minOccurs=
"0"
maxOccurs=
"1"
type=
"gml:ScaleType"
/>
<element
name=
"biomassToBioethanol"
minOccurs=
"0"
maxOccurs=
"1"
type=
"gml:ScaleType"
/>
<element
name=
"biomassToResidualSolidFuel"
minOccurs=
"0"
maxOccurs=
"1"
type=
"gml:ScaleType"
/>
<element
name=
"biomassToSolidFuel"
minOccurs=
"0"
maxOccurs=
"1"
type=
"gml:ScaleType"
/>
<element
name=
"biomassToElectricityPotential"
minOccurs=
"0"
maxOccurs=
"1"
type=
"gml:ScaleType"
/>
<element
name=
"biomassToThermalPotential"
minOccurs=
"0"
maxOccurs=
"1"
type=
"gml:ScaleType"
/>
</sequence>
<attribute
ref=
"gml:id"
/>
</complexType>
</schema>
foodwaterenergycitygml4j/src/main/resources/schema/fwelanduseADE.xsd
0 → 100644
View file @
96135fe8
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<schema
xmlns=
"http://www.w3.org/2001/XMLSchema"
xmlns:fwel=
"http://localhost:8080/3DTiles/ADE/foodwaterenergy/landuse/0.0.1"
targetNamespace=
"http://localhost:8080/3DTiles/ADE/foodwaterenergy/landuse/0.0.1"
xmlns:core=
"http://www.opengis.net/citygml/2.0"
xmlns:bldg=
"http://www.opengis.net/citygml/building/2.0"
xmlns:luse=
"http://www.opengis.net/citygml/landuse/2.0"
xmlns:gml=
"http://www.opengis.net/gml"
elementFormDefault=
"qualified"
version=
"1.0"
>
<import
namespace=
"http://www.opengis.net/citygml/2.0"
schemaLocation=
"http://schemas.opengis.net/citygml/2.0/cityGMLBase.xsd"
/>
<import
namespace=
"http://www.opengis.net/citygml/building/2.0"
schemaLocation=
"http://schemas.opengis.net/citygml/building/2.0/building.xsd"
/>
<import
namespace=
"http://www.opengis.net/citygml/landuse/2.0"
schemaLocation=
"http://schemas.opengis.net/citygml/landuse/2.0/landUse.xsd"
/>
<import
namespace=
"http://www.opengis.net/citygml/appearance/2.0"
schemaLocation=
"http://schemas.opengis.net/citygml/appearance/2.0/appearance.xsd"
/>
<import
namespace=
"http://www.opengis.net/citygml/generics/2.0"
schemaLocation=
"http://schemas.opengis.net/citygml/generics/2.0/generics.xsd"
/>
<import
namespace=
"http://www.opengis.net/gml"
schemaLocation=
"http://schemas.opengis.net/gml/3.1.1/base/gmlBase.xsd"
/>
<element
name=
"foodwaterenergy"
type=
"fwel:foodwaterenergyType"
substitutionGroup=
"luse:_GenericApplicationPropertyOfLandUse"
/>
<complexType
name=
"foodwaterenergyType"
>
<annotation>
<documentation>
Data structure of foodwaterenergyType
</documentation>
</annotation>
<sequence>
<element
name=
"fweAreaName"
minOccurs=
"0"
maxOccurs=
"1"
type=
"string"
/>
<element
name=
"fweSystemName"
minOccurs=
"0"
maxOccurs=
"1"
type=
"string"
/>
<element
name=
"consistsOfFWESurvey"
minOccurs=
"0"
maxOccurs=
"1"
type=
"fwel:consistsOffwesurveyType"
/>
</sequence>
<attribute
ref=
"gml:id"
/>
</complexType>
<complexType
name=
"consistsOffwesurveyType"
>
<annotation>
<documentation>
Data structure of consistsOffwesurveyType
</documentation>
</annotation>
<sequence>
<element
name=
"landUseSurvey"
minOccurs=
"0"
maxOccurs=
"unbounded"
type=
"fwel:landUseSurveyType"
/>
</sequence>
</complexType>
<complexType
name=
"landUseSurveyType"
>
<annotation>
<documentation>
Data structure of landUseSurveyType
</documentation>
</annotation>
<sequence>
<element
name=
"buildingFootprintArea"
maxOccurs=
"1"
type=
"gml:AreaType"
/>
<element
name=
"population"
maxOccurs=
"1"
type=
"int"
/>
<element
name=
"surveyYear"
maxOccurs=
"1"
type=
"int"
/>
<element
name=
"surveyYearVersion"
maxOccurs=
"1"
type=
"double"
/>
<element
name=
"surveyDescription"
maxOccurs=
"1"
type=
"string"
/>
<element
name=
"surfaceArea"
minOccurs=
"0"
type=
"gml:AreaType"
/>
<element
name=
"foodSurvey"
minOccurs=
"0"
maxOccurs=
"1"
type=
"fwel:foodSurveyType"
/>
<element
name=
"waterSurvey"
minOccurs=
"0"
maxOccurs=
"1"
type=
"fwel:waterSurveyType"
/>
<element
name=
"energySurvey"
minOccurs=
"0"
maxOccurs=
"1"
type=
"fwel:energySurveyType"
/>
</sequence>
<attribute
ref=
"gml:id"
/>
</complexType>
<complexType
name=
"foodSurveyType"
>
<annotation>
<documentation>
Data structure of foodSurveyType
</documentation>
</annotation>
<sequence>
<!-- <element name="animalCalories" minOccurs="0" maxOccurs="1" type="gml:ScaleType"/> -->
<element
name=
"foodCategory"
minOccurs=
"0"
maxOccurs=
"1"
type=
"gml:CodeType"
/>
<element
name=
"foodDemand"
minOccurs=
"0"
maxOccurs=
"1"
type=
"gml:ScaleType"
/>
<element
name=
"foodProduction"
minOccurs=
"0"
maxOccurs=
"1"
type=
"gml:ScaleType"
/>
<element
name=
"foodProductionWaterDemand"
minOccurs=
"0"
maxOccurs=
"1"
type=
"gml:ScaleType"
/>
<element
name=
"foodProductionEnergyDemand"
minOccurs=
"0"
maxOccurs=
"1"
type=
"gml:ScaleType"
/>
<element
name=
"foodConsumption"
minOccurs=
"0"
maxOccurs=
"1"
type=
"gml:ScaleType"
/>
<!-- <element name="vegetalCalories" minOccurs="0" maxOccurs="1" type="gml:ScaleType"/>
<element name="cropCalories" minOccurs="0" maxOccurs="1" type="gml:ScaleType"/> -->
</sequence>
<attribute
ref=
"gml:id"
/>
</complexType>
<complexType
name=
"waterSurveyType"
>
<annotation>
<documentation>
Data structure of waterSurveyType
</documentation>
</annotation>
<sequence>
<element
name=
"domesticHotWaterDemand"
minOccurs=
"0"
maxOccurs=
"1"
type=
"gml:ScaleType"
/>
<element
name=
"domesticHotWaterEnergyDemand"
minOccurs=
"0"
maxOccurs=
"1"
type=
"gml:ScaleType"
/>
<element
name=
"domesticSolidWaste"
minOccurs=
"0"
maxOccurs=
"1"
type=
"gml:ScaleType"
/>
<element
name=
"domesticWaterDemand"
minOccurs=
"0"
maxOccurs=
"1"
type=
"gml:ScaleType"
/>
<element
name=
"domesticWaterWaste"
minOccurs=
"0"
maxOccurs=
"1"
type=
"gml:ScaleType"
/>
<element
name=
"totalDomesticWaste"
minOccurs=
"0"
maxOccurs=
"1"
type=
"gml:ScaleType"
/>
<!--
<element name="irrigationDemand" minOccurs="0" maxOccurs="1" type="gml:ScaleType"/>
<element name="transpirationLoss" minOccurs="0" maxOccurs="1" type="gml:ScaleType"/>
-->
</sequence>
<attribute
ref=
"gml:id"
/>
</complexType>
<complexType
name=
"energySurveyType"
>
<annotation>
<documentation>
Data structure of energySurveyType
</documentation>
</annotation>
<sequence>
<element
name=
"spaceHeatingDemand"
minOccurs=
"0"
maxOccurs=
"1"
type=
"gml:ScaleType"
/>
<element
name=
"spaceCoolingDemand"
minOccurs=
"0"
maxOccurs=
"1"
type=
"gml:ScaleType"
/>
<element
name=
"residentialElectricityDemand"
minOccurs=
"0"
maxOccurs=
"1"
type=
"gml:ScaleType"
/>
<element
name=
"electricityPotentialFromPVBuildings"
minOccurs=
"0"
maxOccurs=
"1"
type=
"gml:ScaleType"
/>
<element
name=
"vegetationCoverCategory"
minOccurs=
"0"
maxOccurs=
"1"
type=
"gml:CodeType"
/>
<element
name=
"biomassPrimaryEnergyPotential"
minOccurs=
"0"
maxOccurs=
"1"
type=
"gml:ScaleType"
/>
<element
name=
"biomassToEnergyWoods"
minOccurs=
"0"
maxOccurs=
"1"
type=
"gml:ScaleType"
/>
<element
name=
"biomassToBiogas"
minOccurs=
"0"
maxOccurs=
"1"
type=
"gml:ScaleType"
/>
<element
name=
"biomassToPlantOil"
minOccurs=
"0"
maxOccurs=
"1"
type=
"gml:ScaleType"
/>
<element
name=
"biomassToBioethanol"
minOccurs=
"0"
maxOccurs=
"1"
type=
"gml:ScaleType"
/>
<element
name=
"biomassToResidualSolidFuel"
minOccurs=
"0"
maxOccurs=
"1"
type=
"gml:ScaleType"
/>
<element
name=
"biomassToSolidFuel"
minOccurs=
"0"
maxOccurs=
"1"
type=
"gml:ScaleType"
/>
<element
name=
"biomassToElectricityPotential"
minOccurs=
"0"
maxOccurs=
"1"
type=
"gml:ScaleType"
/>
<element
name=
"biomassToThermalPotential"
minOccurs=
"0"
maxOccurs=
"1"
type=
"gml:ScaleType"
/>
</sequence>
<attribute
ref=
"gml:id"
/>
</complexType>
</schema>
foodwaterenergycitygml4j/src/test/java/de/hft/stuttgart/ade/foodwaterenergycitygml4j/FoodWaterEnergyLandUseTest.java
0 → 100644
View file @
96135fe8
/*-
* Copyright 2021 Hochschule für Technik Stuttgart
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
de.hft.stuttgart.ade.foodwaterenergycitygml4j
;
import
static
org
.
junit
.
jupiter
.
api
.
Assertions
.*;
import
java.io.ByteArrayOutputStream
;
import
java.io.File
;
import
java.io.FileInputStream
;
import
java.io.FileNotFoundException
;
import
java.io.InputStream
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.ServiceLoader
;
import
org.citygml4j.CityGMLContext
;
import
org.citygml4j.builder.jaxb.CityGMLBuilder
;
import
org.citygml4j.builder.jaxb.CityGMLBuilderException
;
import
org.citygml4j.model.citygml.ade.ADEComponent
;
import
org.citygml4j.model.citygml.ade.ADEException
;
import
org.citygml4j.model.citygml.ade.binding.ADEContext
;
import
org.citygml4j.model.citygml.core.AbstractCityObject
;
import
org.citygml4j.model.citygml.core.CityModel
;
import
org.citygml4j.model.citygml.core.CityObjectMember
;
import
org.citygml4j.model.citygml.landuse.LandUse
;
import
org.citygml4j.model.gml.basicTypes.Code
;
import
org.citygml4j.model.gml.measures.Area
;
import
org.citygml4j.model.gml.measures.Scale
;
import
org.citygml4j.model.module.citygml.CityGMLVersion
;
import
org.citygml4j.xml.io.CityGMLInputFactory
;
import
org.citygml4j.xml.io.CityGMLOutputFactory
;
import
org.citygml4j.xml.io.reader.CityGMLReadException
;
import
org.citygml4j.xml.io.reader.CityGMLReader
;
import
org.citygml4j.xml.io.reader.FeatureReadMode
;
import
org.citygml4j.xml.io.writer.CityGMLWriteException
;
import
org.citygml4j.xml.io.writer.CityGMLWriter
;
import
org.junit.jupiter.api.BeforeEach
;
import
org.junit.jupiter.api.Test
;
import
de.hft.stuttgart.ade.foodwaterenergycitygml4j.landuse.model.ConsistsOfFWESurvey
;
import
de.hft.stuttgart.ade.foodwaterenergycitygml4j.landuse.model.EnergySurvey
;
import
de.hft.stuttgart.ade.foodwaterenergycitygml4j.landuse.model.FoodSurvey
;
import
de.hft.stuttgart.ade.foodwaterenergycitygml4j.landuse.model.FoodWaterEnergy
;
import
de.hft.stuttgart.ade.foodwaterenergycitygml4j.landuse.model.LandUseSurvey
;
import
de.hft.stuttgart.ade.foodwaterenergycitygml4j.landuse.model.WaterSurvey
;
import
de.hft.stuttgart.ade.foodwaterenergycitygml4j.module.FoodWaterEnergyLandUseADEModule
;
class
FoodWaterEnergyLandUseTest
{
private
String
path
;
private
String
location
;
@BeforeEach
void
setUp
()
throws
Exception
{
location
=
"src/test/resources/"
;
String
fileName
=
"FWELandUseSample.gml"
;
path
=
location
+
fileName
;
}
private
CityModel
readCityGml
(
InputStream
input
)
throws
ADEException
,
CityGMLBuilderException
,
CityGMLReadException
{
CityGMLContext
context
=
CityGMLContext
.
getInstance
();
//register ADE module
//context.registerADEContext(new FoodWaterEnergyADEContext());
List
<
ADEContext
>
adeContexts
=
context
.
getADEContexts
();
if
(
adeContexts
.
isEmpty
())
{
for
(
ADEContext
adeContext
:
ServiceLoader
.
load
(
ADEContext
.
class
))
{
context
.
registerADEContext
(
adeContext
);
}
}
CityGMLBuilder
builder
=
context
.
createCityGMLBuilder
();
CityGMLInputFactory
in
=
builder
.
createCityGMLInputFactory
();
in
.
setProperty
(
CityGMLInputFactory
.
USE_VALIDATION
,
true
);
in
.
setProperty
(
CityGMLInputFactory
.
FEATURE_READ_MODE
,
FeatureReadMode
.
NO_SPLIT
);
in
.
setValidationEventHandler
(
event
->
{
System
.
out
.
print
(
"["
+
event
.
getLocator
().
getLineNumber
()
+
","
+
event
.
getLocator
().
getColumnNumber
()
+
"] "
);
System
.
out
.
println
(
event
.
getMessage
());
throw
new
IllegalStateException
(
event
.
getLinkedException
());
});
CityModel
cityModel
;
try
(
CityGMLReader
reader
=
in
.
createCityGMLReader
(
"?"
,
input
))
{
cityModel
=
(
CityModel
)
reader
.
nextFeature
();
}
return
cityModel
;
}
private
CityModel
readCityGml
(
File
f
)
throws
FileNotFoundException
,
ADEException
,
CityGMLBuilderException
,
CityGMLReadException
{
return
readCityGml
(
new
FileInputStream
(
f
));
}
private
CityModel
readCityGml
(
String
fileName
)
throws
FileNotFoundException
,
ADEException
,
CityGMLBuilderException
,
CityGMLReadException
{
return
readCityGml
(
new
File
(
fileName
));
}
/*
private CityModel readCityGml(byte[] bytes) throws ADEException, CityGMLBuilderException, CityGMLReadException {
return readCityGml(new ByteArrayInputStream(bytes));
}
*/
private
byte
[]
writeCityGml
(
CityModel
model
)
throws
ADEException
,
CityGMLBuilderException
,
CityGMLWriteException
{
CityGMLContext
context
=
CityGMLContext
.
getInstance
();
List
<
ADEContext
>
adeContexts
=
context
.
getADEContexts
();
if
(
adeContexts
==
null
||
adeContexts
.
isEmpty
())
{
for
(
ADEContext
adeContext
:
ServiceLoader
.
load
(
ADEContext
.
class
))
{
context
.
registerADEContext
(
adeContext
);
}
}
CityGMLBuilder
builder
=
context
.
createCityGMLBuilder
();
CityGMLOutputFactory
outputFactory
=
builder
.
createCityGMLOutputFactory
(
CityGMLVersion
.
DEFAULT
);
ByteArrayOutputStream
out
=
new
ByteArrayOutputStream
();
try
(
CityGMLWriter
writer
=
outputFactory
.
createCityGMLWriter
(
out
))
{
writer
.
setIndentString
(
" "
);
writer
.
setPrefixes
(
CityGMLVersion
.
DEFAULT
);
writer
.
setPrefix
(
"fwel"
,
FoodWaterEnergyLandUseADEModule
.
NAMESPACE_URI
);
writer
.
setSchemaLocation
(
FoodWaterEnergyLandUseADEModule
.
NAMESPACE_URI
,
"http://transfer.hft-stuttgart.de/pages/in-source/fwe-ade/FWELanduse/v2.1.1/XSD"
);
writer
.
setSchemaLocations
(
CityGMLVersion
.
DEFAULT
);
writer
.
write
(
model
);
return
out
.
toByteArray
();
}
}
@Test
void
testForReadingCityObjectMember
()
throws
FileNotFoundException
,
ADEException
,
CityGMLBuilderException
,
CityGMLReadException
{
CityModel
cityModel
=
readCityGml
(
path
);
List
<
CityObjectMember
>
listCityObjectMember
=
cityModel
.
getCityObjectMember
();
assertEquals
(
1
,
listCityObjectMember
.
size
());
}
@Test
void
testForReadingLandUse
()
throws
FileNotFoundException
,
ADEException
,
CityGMLBuilderException
,
CityGMLReadException
{
CityModel
cityModel
=
readCityGml
(
path
);
List
<
CityObjectMember
>
listCityObjectMember
=
cityModel
.
getCityObjectMember
();
CityObjectMember
cityObjectMember
=
listCityObjectMember
.
get
(
0
);
AbstractCityObject
abstractCityObject
=
cityObjectMember
.
getCityObject
();
assertTrue
(
abstractCityObject
instanceof
LandUse
);
}
@Test
void
testForReadingLandUseADEFoodWaterEnergy
()
throws
FileNotFoundException
,
ADEException
,
CityGMLBuilderException
,
CityGMLReadException
{
CityModel
cityModel
=
readCityGml
(
path
);
List
<
CityObjectMember
>
listCityObjectMember
=
cityModel
.
getCityObjectMember
();
CityObjectMember
cityObjectMember
=
listCityObjectMember
.
get
(
0
);
AbstractCityObject
abstractCityObject
=
cityObjectMember
.
getCityObject
();
LandUse
landUse
=
(
LandUse
)
abstractCityObject
;
int
count
=
landUse
.
getGenericApplicationPropertyOfLandUse
().
size
();
assertEquals
(
1
,
count
);
}
@Test
void
testForReadingLandUseADEFoodWaterEnergy_AreaName
()
throws
FileNotFoundException
,
ADEException
,
CityGMLBuilderException
,
CityGMLReadException
{
CityModel
cityModel
=
readCityGml
(
path
);
List
<
CityObjectMember
>
listCityObjectMember
=
cityModel
.
getCityObjectMember
();
CityObjectMember
cityObjectMember
=
listCityObjectMember
.
get
(
0
);
AbstractCityObject
abstractCityObject
=
cityObjectMember
.
getCityObject
();
LandUse
landUse
=
(
LandUse
)
abstractCityObject
;
for
(
ADEComponent
component
:
landUse
.
getGenericApplicationPropertyOfLandUse
())
{
if
(
component
instanceof
FoodWaterEnergy
)
{
FoodWaterEnergy
foodWaterEnergy
=
(
FoodWaterEnergy
)
component
;
assertTrue
(
foodWaterEnergy
.
getAreaName
().
equals
(
"Test_Stuttgart_Ost"
));
}
}
}
@Test
void
testForReadingLandUseADEFoodWaterEnergy_SystemName
()
throws
FileNotFoundException
,
ADEException
,
CityGMLBuilderException
,
CityGMLReadException
{
CityModel
cityModel
=
readCityGml
(
path
);
List
<
CityObjectMember
>
listCityObjectMember
=
cityModel
.
getCityObjectMember
();
CityObjectMember
cityObjectMember
=
listCityObjectMember
.
get
(
0
);
AbstractCityObject
abstractCityObject
=
cityObjectMember
.
getCityObject
();
LandUse
landUse
=
(
LandUse
)
abstractCityObject
;
for
(
ADEComponent
component
:
landUse
.
getGenericApplicationPropertyOfLandUse
())
{
if
(
component
instanceof
FoodWaterEnergy
)
{
FoodWaterEnergy
foodWaterEnergy
=
(
FoodWaterEnergy
)
component
;
assertTrue
(
foodWaterEnergy
.
getSystemName
().
equals
(
"Test_Stuttgart_System"
));
}
}
}
@Test
void
testForReadingLandUseADEFoodWaterEnergy_consistsOfFWEsurvey
()
throws
FileNotFoundException
,
ADEException
,
CityGMLBuilderException
,
CityGMLReadException
{
CityModel
cityModel
=
readCityGml
(
path
);
List
<
CityObjectMember
>
listCityObjectMember
=
cityModel
.
getCityObjectMember
();
CityObjectMember
cityObjectMember
=
listCityObjectMember
.
get
(
0
);
AbstractCityObject
abstractCityObject
=
cityObjectMember
.
getCityObject
();
LandUse
landUse
=
(
LandUse
)
abstractCityObject
;
for
(
ADEComponent
component
:
landUse
.
getGenericApplicationPropertyOfLandUse
())
{
if
(
component
instanceof
FoodWaterEnergy
)
{
FoodWaterEnergy
foodWaterEnergy
=
(
FoodWaterEnergy
)
component
;
assertNotNull
(
foodWaterEnergy
.
getConsistsOfFWESurvey
());
}
}
}
@Test
void
testForReadingLandUseADEFoodWaterEnergy_consistsOfFWEsurvey_landUseSurvey
()
throws
FileNotFoundException
,
ADEException
,
CityGMLBuilderException
,
CityGMLReadException
{
CityModel
cityModel
=
readCityGml
(
path
);
List
<
CityObjectMember
>
listCityObjectMember
=
cityModel
.
getCityObjectMember
();
CityObjectMember
cityObjectMember
=
listCityObjectMember
.
get
(
0
);
AbstractCityObject
abstractCityObject
=
cityObjectMember
.
getCityObject
();
LandUse
landUse
=
(
LandUse
)
abstractCityObject
;
for
(
ADEComponent
component
:
landUse
.
getGenericApplicationPropertyOfLandUse
())
{
if
(
component
instanceof
FoodWaterEnergy
)
{
FoodWaterEnergy
foodWaterEnergy
=
(
FoodWaterEnergy
)
component
;
ConsistsOfFWESurvey
consistsOfFWESurvey
=
foodWaterEnergy
.
getConsistsOfFWESurvey
();
assertEquals
(
1
,
consistsOfFWESurvey
.
getLandUseSurvey
().
size
());
}
}
}
@Test
void
testForReadingLandUseADEFoodWaterEnergy_consistsOfFWEsurvey_landUseSurvey_FoodSurvey
()
throws
FileNotFoundException
,
ADEException
,
CityGMLBuilderException
,
CityGMLReadException
{
CityModel
cityModel
=
readCityGml
(
path
);
List
<
CityObjectMember
>
listCityObjectMember
=
cityModel
.
getCityObjectMember
();
CityObjectMember
cityObjectMember
=
listCityObjectMember
.
get
(
0
);
AbstractCityObject
abstractCityObject
=
cityObjectMember
.
getCityObject
();
LandUse
landUse
=
(
LandUse
)
abstractCityObject
;
for
(
ADEComponent
component
:
landUse
.
getGenericApplicationPropertyOfLandUse
())
{
if
(
component
instanceof
FoodWaterEnergy
)
{
FoodWaterEnergy
foodWaterEnergy
=
(
FoodWaterEnergy
)
component
;
ConsistsOfFWESurvey
consistsOfFWESurvey
=
foodWaterEnergy
.
getConsistsOfFWESurvey
();
for
(
LandUseSurvey
landUseSurvey
:
consistsOfFWESurvey
.
getLandUseSurvey
())
{
assertEquals
(
5.0
,
landUseSurvey
.
getBuildingFootprintArea
().
getValue
());
assertTrue
(
landUseSurvey
.
getBuildingFootprintArea
().
getUom
().
equals
(
"m2"
));
assertNotNull
(
landUseSurvey
.
getFoodsurvey
());
if
(
landUseSurvey
.
getFoodsurvey
()
!=
null
)
{
FoodSurvey
foodSurvey
=
landUseSurvey
.
getFoodsurvey
();
assertEquals
(
12.0
,
foodSurvey
.
getFoodConsumption
().
getValue
());
assertTrue
(
foodSurvey
.
getFoodConsumption
().
getUom
().
equals
(
"no_idea"
));
assertTrue
(
foodSurvey
.
getFoodCategory
().
getValue
().
equals
(
"no_idea_6"
));
assertTrue
(
foodSurvey
.
getFoodCategory
().
getCodeSpace
().
equals
(
"codeSpace_no_idea"
));
assertEquals
(
122.0
,
foodSurvey
.
getFoodDemand
().
getValue
());
assertTrue
(
foodSurvey
.
getFoodDemand
().
getUom
().
equals
(
"no_idea_2"
));
assertEquals
(
123.0
,
foodSurvey
.
getFoodProduction
().
getValue
());
assertTrue
(
foodSurvey
.
getFoodProduction
().
getUom
().
equals
(
"no_idea_3"
));
assertEquals
(
124.0
,
foodSurvey
.
getFoodProductionEnergyDemand
().
getValue
());
assertTrue
(
foodSurvey
.
getFoodProductionEnergyDemand
().
getUom
().
equals
(
"no_idea_4"
));
assertEquals
(
125.0
,
foodSurvey
.
getFoodProductionWaterDemand
().
getValue
());
assertTrue
(
foodSurvey
.
getFoodProductionWaterDemand
().
getUom
().
equals
(
"no_idea_5"
));
}
}
}
}
}
@Test
void
testForReadingLandUseADEFoodWaterEnergy_consistsOfFWEsurvey_landUseSurvey_WaterSurvey
()
throws
FileNotFoundException
,
ADEException
,
CityGMLBuilderException
,
CityGMLReadException
{
CityModel
cityModel
=
readCityGml
(
path
);
List
<
CityObjectMember
>
listCityObjectMember
=
cityModel
.
getCityObjectMember
();
CityObjectMember
cityObjectMember
=
listCityObjectMember
.
get
(
0
);
AbstractCityObject
abstractCityObject
=
cityObjectMember
.
getCityObject
();
LandUse
landUse
=
(
LandUse
)
abstractCityObject
;
for
(
ADEComponent
component
:
landUse
.
getGenericApplicationPropertyOfLandUse
())
{
if
(
component
instanceof
FoodWaterEnergy
)
{
ConsistsOfFWESurvey
consistsOfFWESurvey
=
((
FoodWaterEnergy
)
component
).
getConsistsOfFWESurvey
();
for
(
LandUseSurvey
landUseSurvey
:
consistsOfFWESurvey
.
getLandUseSurvey
())
{
assertEquals
(
5.0
,
landUseSurvey
.
getBuildingFootprintArea
().
getValue
());
assertTrue
(
landUseSurvey
.
getBuildingFootprintArea
().
getUom
().
equals
(
"m2"
));
assertNotNull
(
landUseSurvey
.
getWatersurvey
());
if
(
landUseSurvey
.
getWatersurvey
()
!=
null
)
{
WaterSurvey
waterSurvey
=
landUseSurvey
.
getWatersurvey
();
assertEquals
(
30.0
,
waterSurvey
.
getDomesticHotWaterDemand
().
getValue
());
assertTrue
(
waterSurvey
.
getDomesticHotWaterDemand
().
getUom
().
equals
(
"l"
));
assertEquals
(
31.0
,
waterSurvey
.
getDomesticHotWaterEnergyDemand
().
getValue
());
assertTrue
(
waterSurvey
.
getDomesticHotWaterEnergyDemand
().
getUom
().
equals
(
"l"
));
assertEquals
(
32.0
,
waterSurvey
.
getDomesticSolidWaste
().
getValue
());
assertTrue
(
waterSurvey
.
getDomesticSolidWaste
().
getUom
().
equals
(
"l"
));
assertEquals
(
33.0
,
waterSurvey
.
getDomesticWaterDemand
().
getValue
());
assertTrue
(
waterSurvey
.
getDomesticWaterDemand
().
getUom
().
equals
(
"l"
));
assertEquals
(
34.0
,
waterSurvey
.
getDomesticWaterWaste
().
getValue
());
assertTrue
(
waterSurvey
.
getDomesticWaterWaste
().
getUom
().
equals
(
"l"
));
assertEquals
(
35.0
,
waterSurvey
.
getTotalDomesticWaste
().
getValue
());
assertTrue
(
waterSurvey
.
getTotalDomesticWaste
().
getUom
().
equals
(
"l"
));
}
}
}
}
}
@Test
void
testForReadingLandUseADEFoodWaterEnergy_consistsOfFWEsurvey_landUseSurvey_EnergySurvey
()
throws
FileNotFoundException
,
ADEException
,
CityGMLBuilderException
,
CityGMLReadException
{
CityModel
cityModel
=
readCityGml
(
path
);
List
<
CityObjectMember
>
listCityObjectMember
=
cityModel
.
getCityObjectMember
();
CityObjectMember
cityObjectMember
=
listCityObjectMember
.
get
(
0
);
AbstractCityObject
abstractCityObject
=
cityObjectMember
.
getCityObject
();
LandUse
landUse
=
(
LandUse
)
abstractCityObject
;
for
(
ADEComponent
component
:
landUse
.
getGenericApplicationPropertyOfLandUse
())
{
if
(
component
instanceof
FoodWaterEnergy
)
{
ConsistsOfFWESurvey
consistsOfFWESurvey
=
((
FoodWaterEnergy
)
component
).
getConsistsOfFWESurvey
();
for
(
LandUseSurvey
landUseSurvey
:
consistsOfFWESurvey
.
getLandUseSurvey
())
{
assertEquals
(
5.0
,
landUseSurvey
.
getBuildingFootprintArea
().
getValue
());
assertTrue
(
landUseSurvey
.
getBuildingFootprintArea
().
getUom
().
equals
(
"m2"
));
assertNotNull
(
landUseSurvey
.
getEnergySurvey
());
if
(
landUseSurvey
.
getEnergySurvey
()
!=
null
)
{
EnergySurvey
energySurvey
=
landUseSurvey
.
getEnergySurvey
();
assertEquals
(
300.0
,
energySurvey
.
getSpaceCoolingDemand
().
getValue
());
assertTrue
(
energySurvey
.
getSpaceCoolingDemand
().
getUom
().
equals
(
"J"
));
assertEquals
(
301.0
,
energySurvey
.
getSpaceHeatingDemand
().
getValue
());
assertTrue
(
energySurvey
.
getSpaceHeatingDemand
().
getUom
().
equals
(
"J"
));
assertEquals
(
303.0
,
energySurvey
.
getElectricityPotentialFromPVBuildings
().
getValue
());
assertTrue
(
energySurvey
.
getElectricityPotentialFromPVBuildings
().
getUom
().
equals
(
"J"
));
assertEquals
(
304.0
,
energySurvey
.
getBiomassPrimaryEnergyPotential
().
getValue
());
assertTrue
(
energySurvey
.
getBiomassPrimaryEnergyPotential
().
getUom
().
equals
(
"J"
));
assertEquals
(
305.0
,
energySurvey
.
getBiomassToBioethanol
().
getValue
());
assertTrue
(
energySurvey
.
getBiomassToBioethanol
().
getUom
().
equals
(
"J"
));
assertEquals
(
306.0
,
energySurvey
.
getBiomassToBiogas
().
getValue
());
assertTrue
(
energySurvey
.
getBiomassToBiogas
().
getUom
().
equals
(
"J"
));
assertEquals
(
307.0
,
energySurvey
.
getBiomassToElectricityPotential
().
getValue
());
assertTrue
(
energySurvey
.
getBiomassToElectricityPotential
().
getUom
().
equals
(
"J"
));
assertEquals
(
308.0
,
energySurvey
.
getBiomassToEnergyWoods
().
getValue
());
assertTrue
(
energySurvey
.
getBiomassToEnergyWoods
().
getUom
().
equals
(
"J"
));
assertEquals
(
309.0
,
energySurvey
.
getBiomassToPlantOil
().
getValue
());
assertTrue
(
energySurvey
.
getBiomassToPlantOil
().
getUom
().
equals
(
"J"
));
assertEquals
(
310.0
,
energySurvey
.
getBiomassToResidualSolidFuel
().
getValue
());
assertTrue
(
energySurvey
.
getBiomassToResidualSolidFuel
().
getUom
().
equals
(
"J"
));
assertEquals
(
311.0
,
energySurvey
.
getBiomassToSolidFuel
().
getValue
());
assertTrue
(
energySurvey
.
getBiomassToSolidFuel
().
getUom
().
equals
(
"J"
));
assertEquals
(
312.0
,
energySurvey
.
getBiomassToThermalPotential
().
getValue
());
assertTrue
(
energySurvey
.
getBiomassToThermalPotential
().
getUom
().
equals
(
"J"
));
assertTrue
(
energySurvey
.
getVegetationCoverCategory
().
getCodeSpace
().
equals
(
"Un_code"
));
assertTrue
(
energySurvey
.
getVegetationCoverCategory
().
getValue
().
equals
(
"ndlep"
));
assertEquals
(
302.0
,
energySurvey
.
getResidentialElectricityDemand
().
getValue
());
assertTrue
(
energySurvey
.
getResidentialElectricityDemand
().
getUom
().
equals
(
"J"
));
}
}
}
}
}
@Test
void
testForWritingFWELandUse
()
throws
ADEException
,
CityGMLBuilderException
,
CityGMLWriteException
,
CityGMLReadException
{
CityModel
myCityModel
=
new
CityModel
();
LandUse
luse
=
new
LandUse
();
luse
.
setId
(
"FWEL_DEST007"
);
luse
.
getGenericApplicationPropertyOfLandUse
().
add
(
getOrCreateDummyData
());
myCityModel
.
getCityObjectMember
().
add
(
new
CityObjectMember
(
luse
));
byte
[]
gml
=
writeCityGml
(
myCityModel
);
System
.
out
.
println
(
new
String
(
gml
));
List
<
CityObjectMember
>
listCityObjectMember
=
myCityModel
.
getCityObjectMember
();
assertEquals
(
1
,
listCityObjectMember
.
size
());
CityObjectMember
cityObjectMember
=
listCityObjectMember
.
get
(
0
);
AbstractCityObject
abstractCityObject
=
cityObjectMember
.
getCityObject
();
assertTrue
(
abstractCityObject
instanceof
LandUse
);
LandUse
landUse
=
(
LandUse
)
abstractCityObject
;
for
(
ADEComponent
component
:
landUse
.
getGenericApplicationPropertyOfLandUse
())
{
if
(
component
instanceof
FoodWaterEnergy
)
{
FoodWaterEnergy
foodWaterEnergy
=
(
FoodWaterEnergy
)
component
;
assertTrue
(
foodWaterEnergy
.
getAreaName
().
equals
(
"Test_Stuttgart_Ost"
));
assertTrue
(
foodWaterEnergy
.
getSystemName
().
equals
(
"Test_Stuttgart_System"
));
ConsistsOfFWESurvey
consistsOfFWESurvey
=
foodWaterEnergy
.
getConsistsOfFWESurvey
();
assertEquals
(
1
,
consistsOfFWESurvey
.
getLandUseSurvey
().
size
());
for
(
LandUseSurvey
landUseSurvey
:
consistsOfFWESurvey
.
getLandUseSurvey
())
{
assertEquals
(
5.0
,
landUseSurvey
.
getBuildingFootprintArea
().
getValue
());
assertTrue
(
landUseSurvey
.
getBuildingFootprintArea
().
getUom
().
equals
(
"m2"
));
assertNotNull
(
landUseSurvey
.
getFoodsurvey
());
if
(
landUseSurvey
.
getFoodsurvey
()
!=
null
)
{
FoodSurvey
foodSurvey
=
landUseSurvey
.
getFoodsurvey
();
assertEquals
(
12.0
,
foodSurvey
.
getFoodConsumption
().
getValue
());
}
assertNotNull
(
landUseSurvey
.
getWatersurvey
());
if
(
landUseSurvey
.
getWatersurvey
()
!=
null
)
{
WaterSurvey
waterSurvey
=
landUseSurvey
.
getWatersurvey
();
assertEquals
(
30.0
,
waterSurvey
.
getDomesticHotWaterDemand
().
getValue
());
}
assertNotNull
(
landUseSurvey
.
getEnergySurvey
());
if
(
landUseSurvey
.
getEnergySurvey
()
!=
null
)
{
EnergySurvey
energySurvey
=
landUseSurvey
.
getEnergySurvey
();
assertEquals
(
300.0
,
energySurvey
.
getSpaceCoolingDemand
().
getValue
());
}
}
}
}
}
private
FoodWaterEnergy
getOrCreateDummyData
()
{
LandUseSurvey
landUseSurvey
=
new
LandUseSurvey
();
landUseSurvey
.
setId
(
"landUseSurvey_001"
);
landUseSurvey
.
setSurveyDescription
(
"Test_SurveyDescription"
);
Area
surfaceArea
=
new
Area
();
surfaceArea
.
setUom
(
"m2"
);
surfaceArea
.
setValue
(
12.5
);
landUseSurvey
.
setSurfaceArea
(
surfaceArea
);
landUseSurvey
.
setSurveyYear
(
1975
);
landUseSurvey
.
setSurveyYearVersion
(
0.1
);
landUseSurvey
.
setSurveyDescription
(
"desc"
);
Area
buildingFootPrintArea
=
new
Area
();
buildingFootPrintArea
.
setUom
(
"m2"
);
buildingFootPrintArea
.
setValue
(
5
);
landUseSurvey
.
setBuildingFootprintArea
(
buildingFootPrintArea
);
landUseSurvey
.
setPopulation
(
15000
);
FoodSurvey
foodSurvey
=
new
FoodSurvey
();
foodSurvey
.
setId
(
"foodSurvey_001"
);
Scale
consumption
=
new
Scale
();
consumption
.
setUom
(
"no_idea"
);
consumption
.
setValue
(
12
);
foodSurvey
.
setFoodConsumption
(
consumption
);
Scale
foodDemand
=
new
Scale
();
foodDemand
.
setUom
(
"no_idea_2"
);
foodDemand
.
setValue
(
122
);
foodSurvey
.
setFoodDemand
(
foodDemand
);
Scale
foodProduction
=
new
Scale
();
foodProduction
.
setUom
(
"no_idea_3"
);
foodProduction
.
setValue
(
123
);
foodSurvey
.
setFoodProduction
(
foodProduction
);
Scale
foodProductionEnergyDemand
=
new
Scale
();
foodProductionEnergyDemand
.
setUom
(
"no_idea_4"
);
foodProductionEnergyDemand
.
setValue
(
124
);
foodSurvey
.
setFoodProductionEnergyDemand
(
foodProductionEnergyDemand
);
Scale
foodProductionWaterDemand
=
new
Scale
();
foodProductionWaterDemand
.
setUom
(
"no_idea_5"
);
foodProductionWaterDemand
.
setValue
(
125
);
foodSurvey
.
setFoodProductionWaterDemand
(
foodProductionWaterDemand
);
Code
foodCategory
=
new
Code
();
foodCategory
.
setCodeSpace
(
"codeSpace_no_idea"
);
foodCategory
.
setValue
(
"no_idea_6"
);
foodSurvey
.
setFoodCategory
(
foodCategory
);
WaterSurvey
waterSurvey
=
new
WaterSurvey
();
waterSurvey
.
setId
(
"waterSurvey_001"
);
Scale
domesticHotWaterDemand
=
new
Scale
();
domesticHotWaterDemand
.
setUom
(
"l"
);
domesticHotWaterDemand
.
setValue
(
30
);
waterSurvey
.
setDomesticHotWaterDemand
(
domesticHotWaterDemand
);
Scale
domesticHotWaterEnergyDemand
=
new
Scale
();
domesticHotWaterEnergyDemand
.
setUom
(
"l"
);
domesticHotWaterEnergyDemand
.
setValue
(
31
);
waterSurvey
.
setDomesticHotWaterEnergyDemand
(
domesticHotWaterEnergyDemand
);
Scale
domesticSolidWaste
=
new
Scale
();
domesticSolidWaste
.
setUom
(
"l"
);
domesticSolidWaste
.
setValue
(
32
);
waterSurvey
.
setDomesticSolidWaste
(
domesticSolidWaste
);
Scale
domesticWaterDemand
=
new
Scale
();
domesticWaterDemand
.
setUom
(
"l"
);
domesticWaterDemand
.
setValue
(
33
);
waterSurvey
.
setDomesticWaterDemand
(
domesticWaterDemand
);
Scale
domesticWaterWaste
=
new
Scale
();
domesticWaterWaste
.
setUom
(
"l"
);
domesticWaterWaste
.
setValue
(
34
);
waterSurvey
.
setDomesticWaterWaste
(
domesticWaterWaste
);
Scale
totalDomesticWaste
=
new
Scale
();
totalDomesticWaste
.
setUom
(
"l"
);
totalDomesticWaste
.
setValue
(
35
);
waterSurvey
.
setTotalDomesticWaste
(
totalDomesticWaste
);
EnergySurvey
energySurvey
=
new
EnergySurvey
();
energySurvey
.
setId
(
"energySurvey_001"
);
Scale
spaceCoolingDemand
=
new
Scale
();
spaceCoolingDemand
.
setUom
(
"J"
);
spaceCoolingDemand
.
setValue
(
300
);
energySurvey
.
setSpaceCoolingDemand
(
spaceCoolingDemand
);
Scale
spaceHeatingDemand
=
new
Scale
();
spaceHeatingDemand
.
setUom
(
"J"
);
spaceHeatingDemand
.
setValue
(
301
);
energySurvey
.
setSpaceHeatingDemand
(
spaceHeatingDemand
);
Scale
residentialElectricityDemand
=
new
Scale
();
residentialElectricityDemand
.
setUom
(
"J"
);
residentialElectricityDemand
.
setValue
(
302
);
energySurvey
.
setResidentialElectricityDemand
(
residentialElectricityDemand
);
Scale
electricityPotentialFromPVBuildings
=
new
Scale
();
electricityPotentialFromPVBuildings
.
setUom
(
"J"
);
electricityPotentialFromPVBuildings
.
setValue
(
303
);
energySurvey
.
setElectricityPotentialFromPVBuildings
(
electricityPotentialFromPVBuildings
);
Scale
biomassPrimaryEnergyPotential
=
new
Scale
();
biomassPrimaryEnergyPotential
.
setUom
(
"J"
);
biomassPrimaryEnergyPotential
.
setValue
(
304
);
energySurvey
.
setBiomassPrimaryEnergyPotential
(
biomassPrimaryEnergyPotential
);
Scale
biomassToBioethanol
=
new
Scale
();
biomassToBioethanol
.
setUom
(
"J"
);
biomassToBioethanol
.
setValue
(
305
);
energySurvey
.
setBiomassToBioethanol
(
biomassToBioethanol
);
Scale
biomassToBiogas
=
new
Scale
();
biomassToBiogas
.
setUom
(
"J"
);
biomassToBiogas
.
setValue
(
306
);
energySurvey
.
setBiomassToBiogas
(
biomassToBiogas
);
Scale
biomassToElectricityPotential
=
new
Scale
();
biomassToElectricityPotential
.
setUom
(
"J"
);
biomassToElectricityPotential
.
setValue
(
307
);
energySurvey
.
setBiomassToElectricityPotential
(
biomassToElectricityPotential
);
Scale
biomassToEnergyWoods
=
new
Scale
();
biomassToEnergyWoods
.
setUom
(
"J"
);
biomassToEnergyWoods
.
setValue
(
308
);
energySurvey
.
setBiomassToEnergyWoods
(
biomassToEnergyWoods
);
Scale
biomassToPlantOil
=
new
Scale
();
biomassToPlantOil
.
setUom
(
"J"
);
biomassToPlantOil
.
setValue
(
309
);
energySurvey
.
setBiomassToPlantOil
(
biomassToPlantOil
);
Scale
biomassToResidualSolidFuel
=
new
Scale
();
biomassToResidualSolidFuel
.
setUom
(
"J"
);
biomassToResidualSolidFuel
.
setValue
(
310
);
energySurvey
.
setBiomassToResidualSolidFuel
(
biomassToResidualSolidFuel
);
Scale
biomassToSolidFuel
=
new
Scale
();
biomassToSolidFuel
.
setUom
(
"J"
);
biomassToSolidFuel
.
setValue
(
311
);
energySurvey
.
setBiomassToSolidFuel
(
biomassToSolidFuel
);
Scale
biomassToThermalPotential
=
new
Scale
();
biomassToThermalPotential
.
setUom
(
"J"
);
biomassToThermalPotential
.
setValue
(
312
);
energySurvey
.
setBiomassToThermalPotential
(
biomassToThermalPotential
);
Code
vegetationCoverCategory
=
new
Code
();
vegetationCoverCategory
.
setCodeSpace
(
"Un_code"
);
vegetationCoverCategory
.
setValue
(
"ndlep"
);
energySurvey
.
setVegetationCoverCategory
(
vegetationCoverCategory
);
landUseSurvey
.
setFoodsurvey
(
foodSurvey
);
landUseSurvey
.
setWatersurvey
(
waterSurvey
);
landUseSurvey
.
setEnergySurvey
(
energySurvey
);
ConsistsOfFWESurvey
consistsOfFWESurvey
=
new
ConsistsOfFWESurvey
();
List
<
LandUseSurvey
>
surveyList
=
new
ArrayList
<
LandUseSurvey
>();
surveyList
.
add
(
landUseSurvey
);
consistsOfFWESurvey
.
setLandUseSurvey
(
surveyList
);
FoodWaterEnergy
foodWaterEnergy
=
new
FoodWaterEnergy
();
foodWaterEnergy
.
setId
(
"foodWaterEnergy_001"
);
foodWaterEnergy
.
setAreaName
(
"Test_Stuttgart_Ost"
);
foodWaterEnergy
.
setSystemName
(
"Test_Stuttgart_System"
);
foodWaterEnergy
.
setConsistsOfFWESurvey
(
consistsOfFWESurvey
);
return
foodWaterEnergy
;
}
}
foodwaterenergycitygml4j/src/test/resources/FWELSample2.gml
0 → 100644
View file @
96135fe8
<?xml version="1.0" encoding="UTF-8"?>
<CityModel
xmlns:brid=
"http://www.opengis.net/citygml/bridge/2.0"
xmlns:tran=
"http://www.opengis.net/citygml/transportation/2.0"
xmlns:wtr=
"http://www.opengis.net/citygml/waterbody/2.0"
xmlns:sch=
"http://www.ascc.net/xml/schematron"
xmlns:veg=
"http://www.opengis.net/citygml/vegetation/2.0"
xmlns:frn=
"http://www.opengis.net/citygml/cityfurniture/2.0"
xmlns:gml=
"http://www.opengis.net/gml"
xmlns:tex=
"http://www.opengis.net/citygml/texturedsurface/2.0"
xmlns:gen=
"http://www.opengis.net/citygml/generics/2.0"
xmlns:dem=
"http://www.opengis.net/citygml/relief/2.0"
xmlns:app=
"http://www.opengis.net/citygml/appearance/2.0"
xmlns:bldg=
"http://www.opengis.net/citygml/building/2.0"
xmlns:smil20=
"http://www.w3.org/2001/SMIL20/"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns:smil20lang=
"http://www.w3.org/2001/SMIL20/Language"
xmlns:pbase=
"http://www.opengis.net/citygml/profiles/base/2.0"
xmlns:tun=
"http://www.opengis.net/citygml/tunnel/2.0"
xmlns:sc=
"http://www.interactive-instruments.de/ShapeChange/AppInfo"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
xmlns:grp=
"http://www.opengis.net/citygml/cityobjectgroup/2.0"
xmlns=
"http://www.opengis.net/citygml/2.0"
xmlns:luse=
"http://www.opengis.net/citygml/landuse/2.0"
xmlns:xAL=
"urn:oasis:names:tc:ciq:xsdschema:xAL:2.0"
xmlns:fwel=
"http://localhost:8080/3DTiles/ADE/foodwaterenergy/landuse/0.0.1"
xsi:schemaLocation=
"http://localhost:8080/3DTiles/ADE/foodwaterenergy/landuse/0.0.1 http://localhost:8080/3DTiles/ADE/foodwaterenergy/landuse/0.0.1/fwelanduseADE.xsd"
>
<gml:boundedBy>
<gml:Envelope
srsName=
"EPSG:25832"
srsDimension=
"3"
>
<gml:lowerCorner>
516309.7750000004 5416407.569 0
</gml:lowerCorner>
<gml:upperCorner>
527203.5820000004 5425829.982000001 0
</gml:upperCorner>
</gml:Envelope>
</gml:boundedBy>
<cityObjectMember>
<luse:LandUse
gml:id=
"DEBWB0010000FTzJ"
>
<luse:lod0MultiSurface>
<gml:MultiSurface
srsName=
"EPSG:25832"
srsDimension=
"3"
>
<gml:surfaceMember>
<gml:Polygon>
<gml:exterior>
<gml:LinearRing>
<gml:posList>
519571.82100000046 5419893.291999999 0 519545.77300000004 5419981.391000001 0 519522.2520000003 5419976.294 0 519419.324 5419954.6 0 519409.01400000043 5419950.467 0 519403.70299999975 5419947.0030000005 0 519397.23699999973 5419941.173 0 519398.66000000015 5419937.584000001 0 519399.9299999997 5419933.636 0 519399.61000000034 5419929.368000001 0 519398.66000000015 5419925.729 0 519395.9009999996 5419922.970000001 0 519405.49700000044 5419912.085000001 0 519415.26300000027 5419905.977 0 519431.65699999966 5419898.43 0 519447.31099999975 5419890.693 0 519458.9160000002 5419884.795 0 519468.67200000025 5419878.168 0 519478.20799999963 5419870.111 0 519571.82100000046 5419893.291999999 0
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
</gml:MultiSurface>
</luse:lod0MultiSurface>
<fwel:foodwaterenergy
gml:id=
"foodWaterEnergy_001"
>
<fwel:fweAreaName>
Test_Stuttgart_Ost
</fwel:fweAreaName>
<fwel:fweSystemName>
Test_Stuttgart_System
</fwel:fweSystemName>
<fwel:consistsOfFWESurvey>
<fwel:landUseSurvey
gml:id=
"landUseSurvey_001"
>
<fwel:buildingFootprintArea
uom=
"m2"
>
5.0
</fwel:buildingFootprintArea>
<fwel:population>
15000
</fwel:population>
<fwel:surveyYear>
1975
</fwel:surveyYear>
<fwel:surveyYearVersion>
0.1
</fwel:surveyYearVersion>
<fwel:surveyDescription>
desc
</fwel:surveyDescription>
<fwel:surfaceArea
uom=
"m2"
>
12.5
</fwel:surfaceArea>
<fwel:foodSurvey
gml:id=
"foodSurvey_001"
>
<fwel:foodCategory
codeSpace=
"codeSpace_no_idea"
>
no_idea_6
</fwel:foodCategory>
<fwel:foodDemand
uom=
"no_idea_2"
>
122.0
</fwel:foodDemand>
<fwel:foodProduction
uom=
"no_idea_3"
>
123.0
</fwel:foodProduction>
<fwel:foodProductionWaterDemand
uom=
"no_idea_5"
>
125.0
</fwel:foodProductionWaterDemand>
<fwel:foodProductionEnergyDemand
uom=
"no_idea_4"
>
124.0
</fwel:foodProductionEnergyDemand>
<fwel:foodConsumption
uom=
"no_idea"
>
12.0
</fwel:foodConsumption>
</fwel:foodSurvey>
<fwel:waterSurvey
gml:id=
"waterSurvey_001"
>
<fwel:domesticHotWaterDemand
uom=
"l"
>
30.0
</fwel:domesticHotWaterDemand>
<fwel:domesticHotWaterEnergyDemand
uom=
"l"
>
31.0
</fwel:domesticHotWaterEnergyDemand>
<fwel:domesticSolidWaste
uom=
"l"
>
32.0
</fwel:domesticSolidWaste>
<fwel:domesticWaterDemand
uom=
"l"
>
33.0
</fwel:domesticWaterDemand>
<fwel:domesticWaterWaste
uom=
"l"
>
34.0
</fwel:domesticWaterWaste>
<fwel:totalDomesticWaste
uom=
"l"
>
35.0
</fwel:totalDomesticWaste>
</fwel:waterSurvey>
<fwel:energySurvey
gml:id=
"energySurvey_001"
>
<fwel:spaceHeatingDemand
uom=
"J"
>
301.0
</fwel:spaceHeatingDemand>
<fwel:spaceCoolingDemand
uom=
"J"
>
300.0
</fwel:spaceCoolingDemand>
<fwel:residentialElectricityDemand
uom=
"J"
>
302.0
</fwel:residentialElectricityDemand>
<fwel:electricityPotentialFromPVBuildings
uom=
"J"
>
303.0
</fwel:electricityPotentialFromPVBuildings>
<fwel:vegetationCoverCategory
codeSpace=
"Un_code"
>
ndlep
</fwel:vegetationCoverCategory>
<fwel:biomassPrimaryEnergyPotential
uom=
"J"
>
304.0
</fwel:biomassPrimaryEnergyPotential>
<fwel:biomassToEnergyWoods
uom=
"J"
>
308.0
</fwel:biomassToEnergyWoods>
<fwel:biomassToBiogas
uom=
"J"
>
306.0
</fwel:biomassToBiogas>
<fwel:biomassToPlantOil
uom=
"J"
>
309.0
</fwel:biomassToPlantOil>
<fwel:biomassToBioethanol
uom=
"J"
>
305.0
</fwel:biomassToBioethanol>
<fwel:biomassToResidualSolidFuel
uom=
"J"
>
310.0
</fwel:biomassToResidualSolidFuel>
<fwel:biomassToSolidFuel
uom=
"J"
>
311.0
</fwel:biomassToSolidFuel>
<fwel:biomassToElectricityPotential
uom=
"J"
>
307.0
</fwel:biomassToElectricityPotential>
<fwel:biomassToThermalPotential
uom=
"J"
>
312.0
</fwel:biomassToThermalPotential>
</fwel:energySurvey>
</fwel:landUseSurvey>
</fwel:consistsOfFWESurvey>
</fwel:foodwaterenergy>
</luse:LandUse>
</cityObjectMember>
</CityModel>
foodwaterenergycitygml4j/src/test/resources/FWELandUseSample.gml
0 → 100644
View file @
96135fe8
<?xml version="1.0" encoding="UTF-8"?>
<CityModel
xmlns:brid=
"http://www.opengis.net/citygml/bridge/2.0"
xmlns:tran=
"http://www.opengis.net/citygml/transportation/2.0"
xmlns:wtr=
"http://www.opengis.net/citygml/waterbody/2.0"
xmlns:sch=
"http://www.ascc.net/xml/schematron"
xmlns:veg=
"http://www.opengis.net/citygml/vegetation/2.0"
xmlns:frn=
"http://www.opengis.net/citygml/cityfurniture/2.0"
xmlns:gml=
"http://www.opengis.net/gml"
xmlns:tex=
"http://www.opengis.net/citygml/texturedsurface/2.0"
xmlns:gen=
"http://www.opengis.net/citygml/generics/2.0"
xmlns:dem=
"http://www.opengis.net/citygml/relief/2.0"
xmlns:app=
"http://www.opengis.net/citygml/appearance/2.0"
xmlns:bldg=
"http://www.opengis.net/citygml/building/2.0"
xmlns:smil20=
"http://www.w3.org/2001/SMIL20/"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns:smil20lang=
"http://www.w3.org/2001/SMIL20/Language"
xmlns:pbase=
"http://www.opengis.net/citygml/profiles/base/2.0"
xmlns:tun=
"http://www.opengis.net/citygml/tunnel/2.0"
xmlns:sc=
"http://www.interactive-instruments.de/ShapeChange/AppInfo"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
xmlns:grp=
"http://www.opengis.net/citygml/cityobjectgroup/2.0"
xmlns=
"http://www.opengis.net/citygml/2.0"
xmlns:luse=
"http://www.opengis.net/citygml/landuse/2.0"
xmlns:xAL=
"urn:oasis:names:tc:ciq:xsdschema:xAL:2.0"
xmlns:fwel=
"http://transfer.hft-stuttgart.de/pages/in-source/fwe-ade/FWELanduse/v2.1.1/XSD"
xsi:schemaLocation=
"http://transfer.hft-stuttgart.de/pages/in-source/fwe-ade/FWELanduse/v2.1.1/XSD http://transfer.hft-stuttgart.de/pages/in-source/fwe-ade/FWELanduse/v2.1.1/XSD/FWELanduse.xsd"
>
<gml:boundedBy>
<gml:Envelope
srsName=
"EPSG:25832"
srsDimension=
"3"
>
<gml:lowerCorner>
516309.7750000004 5416407.569 0
</gml:lowerCorner>
<gml:upperCorner>
527203.5820000004 5425829.982000001 0
</gml:upperCorner>
</gml:Envelope>
</gml:boundedBy>
<cityObjectMember>
<luse:LandUse
gml:id=
"DEBWB0010000FTzJ"
>
<luse:lod0MultiSurface>
<gml:MultiSurface
srsName=
"EPSG:25832"
srsDimension=
"3"
>
<gml:surfaceMember>
<gml:Polygon>
<gml:exterior>
<gml:LinearRing>
<gml:posList>
519571.82100000046 5419893.291999999 0 519545.77300000004 5419981.391000001 0 519522.2520000003 5419976.294 0 519419.324 5419954.6 0 519409.01400000043 5419950.467 0 519403.70299999975 5419947.0030000005 0 519397.23699999973 5419941.173 0 519398.66000000015 5419937.584000001 0 519399.9299999997 5419933.636 0 519399.61000000034 5419929.368000001 0 519398.66000000015 5419925.729 0 519395.9009999996 5419922.970000001 0 519405.49700000044 5419912.085000001 0 519415.26300000027 5419905.977 0 519431.65699999966 5419898.43 0 519447.31099999975 5419890.693 0 519458.9160000002 5419884.795 0 519468.67200000025 5419878.168 0 519478.20799999963 5419870.111 0 519571.82100000046 5419893.291999999 0
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
</gml:MultiSurface>
</luse:lod0MultiSurface>
<fwel:foodwaterenergy
gml:id=
"foodWaterEnergy_001"
>
<fwel:fweAreaName>
Test_Stuttgart_Ost
</fwel:fweAreaName>
<fwel:fweSystemName>
Test_Stuttgart_System
</fwel:fweSystemName>
<fwel:consistsOfFWESurvey
>
<fwel:landUseSurvey
gml:id=
"landUseSurvey_001"
>
<fwel:buildingFootprintArea
uom=
"m2"
>
5.0
</fwel:buildingFootprintArea>
<fwel:population>
15000
</fwel:population>
<fwel:surveyYear>
1975
</fwel:surveyYear>
<fwel:surveyYearVersion>
0.1
</fwel:surveyYearVersion>
<fwel:surveyDescription>
desc
</fwel:surveyDescription>
<fwel:surfaceArea
uom=
"m2"
>
12.5
</fwel:surfaceArea>
<fwel:foodSurvey
gml:id=
"foodSurvey_001"
>
<fwel:foodCategory
codeSpace=
"codeSpace_no_idea"
>
no_idea_6
</fwel:foodCategory>
<fwel:foodDemand
uom=
"no_idea_2"
>
122.0
</fwel:foodDemand>
<fwel:foodProduction
uom=
"no_idea_3"
>
123.0
</fwel:foodProduction>
<fwel:foodProductionWaterDemand
uom=
"no_idea_5"
>
125.0
</fwel:foodProductionWaterDemand>
<fwel:foodProductionEnergyDemand
uom=
"no_idea_4"
>
124.0
</fwel:foodProductionEnergyDemand>
<fwel:foodConsumption
uom=
"no_idea"
>
12.0
</fwel:foodConsumption>
</fwel:foodSurvey>
<fwel:waterSurvey
gml:id=
"waterSurvey_001"
>
<fwel:domesticHotWaterDemand
uom=
"l"
>
30.0
</fwel:domesticHotWaterDemand>
<fwel:domesticHotWaterEnergyDemand
uom=
"l"
>
31.0
</fwel:domesticHotWaterEnergyDemand>
<fwel:domesticSolidWaste
uom=
"l"
>
32.0
</fwel:domesticSolidWaste>
<fwel:domesticWaterDemand
uom=
"l"
>
33.0
</fwel:domesticWaterDemand>
<fwel:domesticWaterWaste
uom=
"l"
>
34.0
</fwel:domesticWaterWaste>
<fwel:totalDomesticWaste
uom=
"l"
>
35.0
</fwel:totalDomesticWaste>
</fwel:waterSurvey>
<fwel:energySurvey
gml:id=
"energySurvey_001"
>
<fwel:spaceHeatingDemand
uom=
"J"
>
301.0
</fwel:spaceHeatingDemand>
<fwel:spaceCoolingDemand
uom=
"J"
>
300.0
</fwel:spaceCoolingDemand>
<fwel:residentialElectricityDemand
uom=
"J"
>
302.0
</fwel:residentialElectricityDemand>
<fwel:electricityPotentialFromPVBuildings
uom=
"J"
>
303.0
</fwel:electricityPotentialFromPVBuildings>
<fwel:vegetationCoverCategory
codeSpace=
"Un_code"
>
ndlep
</fwel:vegetationCoverCategory>
<fwel:biomassPrimaryEnergyPotential
uom=
"J"
>
304.0
</fwel:biomassPrimaryEnergyPotential>
<fwel:biomassToEnergyWoods
uom=
"J"
>
308.0
</fwel:biomassToEnergyWoods>
<fwel:biomassToBiogas
uom=
"J"
>
306.0
</fwel:biomassToBiogas>
<fwel:biomassToPlantOil
uom=
"J"
>
309.0
</fwel:biomassToPlantOil>
<fwel:biomassToBioethanol
uom=
"J"
>
305.0
</fwel:biomassToBioethanol>
<fwel:biomassToResidualSolidFuel
uom=
"J"
>
310.0
</fwel:biomassToResidualSolidFuel>
<fwel:biomassToSolidFuel
uom=
"J"
>
311.0
</fwel:biomassToSolidFuel>
<fwel:biomassToElectricityPotential
uom=
"J"
>
307.0
</fwel:biomassToElectricityPotential>
<fwel:biomassToThermalPotential
uom=
"J"
>
312.0
</fwel:biomassToThermalPotential>
</fwel:energySurvey>
</fwel:landUseSurvey>
</fwel:consistsOfFWESurvey>
</fwel:foodwaterenergy>
</luse:LandUse>
</cityObjectMember>
</CityModel>
Prev
1
2
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment