Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Energy ADE
Energy ADE 3 3DCityDB
Commits
2ef0d8b9
Commit
2ef0d8b9
authored
Dec 10, 2025
by
Rushikesh Padsala
Browse files
changed to beta8 classes
parent
fa13f958
Changes
13
Hide whitespace changes
Inline
Side-by-side
resources/database/3dcitydb/postgreSQL/CREATE_ADE_DB.sql
View file @
2ef0d8b9
-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
--
-- CityGML Energy ADE 3.0 (beta
7
)
-- CityGML Energy ADE 3.0 (beta
8
)
--
-- Last update: 2025-1
0
-1
4
-- Last update: 2025-1
2
-1
5
--
-- This DDL script installs the 3DCityDB schema for the Energy ADE. It must be run
-- from within the ADE Manager plugin of the 3DCityDB Importer/Exporter.
...
...
@@ -32,343 +32,363 @@ CREATE SEQUENCE ng3_qualified_attribute_seq INCREMENT BY 1 MINVALUE 0 MAXVALUE 9
CREATE
SEQUENCE
ng3_suitability_seq
INCREMENT
BY
1
MINVALUE
0
MAXVALUE
9223372036854775807
START
WITH
1
CACHE
1
NO
CYCLE
OWNED
BY
NONE
;
-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-- *********************************** Create tables
************
**************************
-- *********************************** Create tables
and indices
**************************
-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-- --------------------------------------------------------------------
-- ng3_
address_to_building_unit
-- ng3_
cityobject (also for ade feature and feature with lifespan
-- --------------------------------------------------------------------
CREATE
TABLE
ng3_address_to_building_unit
(
address_id
BIGINT
NOT
NULL
,
building_unit_id
BIGINT
NOT
NULL
,
PRIMARY
KEY
(
address_id
,
building_unit_id
)
CREATE
TABLE
ng3_cityobject
(
id
BIGINT
PRIMARY
KEY
,
objectclass_id
INTEGER
,
perm_identifier
VARCHAR
,
perm_identifier_codespace
VARCHAR
,
valid_from
TIMESTAMP
WITH
TIME
ZONE
,
valid_to
TIMESTAMP
WITH
TIME
ZONE
,
layered_constr_id
BIGINT
,
lib_layered_constr_id
BIGINT
,
ref_point
geometry
(
POINTZ
)
);
CREATE
INDEX
ng3_cto_oc_fkx
ON
ng3_cityobject
USING
btree
(
objectclass_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_cto_lcns_fkx
ON
ng3_cityobject
USING
btree
(
layered_constr_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_cto_lib_lcns_fkx
ON
ng3_cityobject
USING
btree
(
lib_layered_constr_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_cto_ref_point_spx
ON
ng3_cityobject
USING
gist
(
ref_point
);
-- --------------------------------------------------------------------
-- ng3_building - extends building table
-- --------------------------------------------------------------------
CREATE
TABLE
ng3_building
(
id
BIGINT
PRIMARY
KEY
,
type
VARCHAR
,
type_codespace
VARCHAR
,
is_protected
NUMERIC
,
constr_weight
VARCHAR
,
constr_weight_codespace
VARCHAR
,
attic_thm_status
VARCHAR
,
basement_thm_status
VARCHAR
id
BIGINT
PRIMARY
KEY
,
type
VARCHAR
,
type_codespace
VARCHAR
,
owner_name
VARCHAR
,
ownership_type
VARCHAR
,
ownership_type_codespace
VARCHAR
,
is_protected
NUMERIC
,
constr_weight
VARCHAR
,
constr_weight_codespace
VARCHAR
,
attic_thm_status
VARCHAR
,
basement_thm_status
VARCHAR
);
-- no indices needed for FKs
-- --------------------------------------------------------------------
-- ng3_building_partition
-- --------------------------------------------------------------------
CREATE
TABLE
ng3_building_partition
(
id
BIGINT
PRIMARY
KEY
,
objectclass_id
INTEGER
,
-- Thermal Zone attributes
heat_capacity
NUMERIC
,
heat_capacity_uom
VARCHAR
,
infiltration_rate
NUMERIC
,
infiltration_rate_uom
VARCHAR
,
is_cooled
NUMERIC
,
is_heated
NUMERIC
,
coincides_with_lod2_hull
NUMERIC
,
coincides_with_lod3_hull
NUMERIC
,
-- Usage Zone and BuildingUnit attributes
type
VARCHAR
,
type_codespace
VARCHAR
,
-- Usage Zone attributes
is_primary
NUMERIC
,
num_of_building_units
INTEGER
,
int_heat_gains
NUMERIC
,
int_heat_gains_uom
VARCHAR
,
int_heat_gains_conv
NUMERIC
,
int_heat_gains_conv_uom
VARCHAR
,
int_heat_gains_lat
NUMERIC
,
int_heat_gains_lat_uom
VARCHAR
,
int_heat_gains_rad
NUMERIC
,
int_heat_gains_rad_uom
VARCHAR
,
-- BuildingUnit attributes
num_of_rooms
INTEGER
,
owner_name
VARCHAR
,
ownership_type
VARCHAR
,
ownership_type_codespace
VARCHAR
,
-- Used to store the FK to the schedule(s)
cooling_schedule_id
BIGINT
,
heating_schedule_id
BIGINT
,
ventilation_schedule_id
BIGINT
,
-- Used to store the association from UsageZone to BuildingUnit
usage_zone_id
BIGINT
,
-- Used to store the association from ThermalZone to UsageZone
thermal_zone_id
BIGINT
,
-- Parent id (Building(Part) of a ThermalZone, UsageZone or BuildintUnit
building_id
BIGINT
,
-- FK to the geometries in the surface_geometry table
lod1_solid_id
BIGINT
,
lod2_solid_id
BIGINT
,
lod3_solid_id
BIGINT
-- ng3_thematic_surface - extends (building) thematic_surface table
-- --------------------------------------------------------------------
CREATE
TABLE
ng3_thematic_surface
(
id
BIGINT
PRIMARY
KEY
,
is_shared
NUMERIC
,
total_surf_area
NUMERIC
,
total_surf_area_uom
VARCHAR
,
opaque_surf_area
NUMERIC
,
opaque_surf_area_uom
VARCHAR
,
open_to_surf_ratio
NUMERIC
,
open_to_surf_ratio_uom
VARCHAR
,
thickness
NUMERIC
,
thickness_uom
VARCHAR
,
azimuth
NUMERIC
,
azimuth_uom
VARCHAR
,
inclination
NUMERIC
,
inclination_uom
VARCHAR
,
ground_view_factor
NUMERIC
,
ground_view_factor_uom
VARCHAR
,
sky_view_factor
NUMERIC
,
sky_view_factor_uom
VARCHAR
,
heat_capacity
NUMERIC
,
heat_capacity_uom
VARCHAR
);
CREATE
INDEX
ng3_them_surf_is_shared_idx
ON
ng3_thematic_surface
USING
btree
(
is_shared
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
-- no indices needed for FKs
-- --------------------------------------------------------------------
-- ng3_
cityobject
- extends
cityobject
table
-- ng3_
opening
- extends
(building) opening
table
-- --------------------------------------------------------------------
CREATE
TABLE
ng3_cityobject
(
id
BIGINT
PRIMARY
KEY
,
layered_construction_id
BIGINT
,
ref_point
geometry
(
POINTZ
)
CREATE
TABLE
ng3_opening
(
id
BIGINT
PRIMARY
KEY
,
area
NUMERIC
,
area_uom
VARCHAR
,
azimuth
NUMERIC
,
azimuth_uom
VARCHAR
,
inclination
NUMERIC
,
inclination_uom
VARCHAR
,
ground_view_factor
NUMERIC
,
ground_view_factor_uom
VARCHAR
,
sky_view_factor
NUMERIC
,
sky_view_factor_uom
VARCHAR
);
-- no indices needed for FKs
-- --------------------------------------------------------------------
-- ng3_ctyobj_relation
-- --------------------------------------------------------------------
CREATE
TABLE
ng3_ctyobj_relation
(
id
BIGINT
PRIMARY
KEY
DEFAULT
nextval
(
'ng3_ctyobj_relation_seq'
::
regclass
),
-- this refers to ng3_cityobject (id), i.e. the source
--
FK:
this refers to ng3_cityobject (id), i.e. the source
ng3_cityobject_id
BIGINT
,
-- this refers to cityobject (id), i.e. the target
cityobject_id
BIGINT
,
-- Relation type
relation_type
VARCHAR
,
relation_type_codespace
VARCHAR
relation_type_codespace
VARCHAR
,
--FK: this refers to cityobject (id), i.e. the target
cityobject_id
BIGINT
);
CREATE
INDEX
ng3_cto_rel_fk1x
ON
ng3_ctyobj_relation
USING
btree
(
ng3_cityobject_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_cto_rel_fk2x
ON
ng3_ctyobj_relation
USING
btree
(
cityobject_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
-- --------------------------------------------------------------------
-- ng3_device
-- --------------------------------------------------------------------
CREATE
TABLE
ng3_device
(
id
BIGINT
PRIMARY
KEY
,
objectclass_id
INTEGER
,
-- AbstractDevice attributes (also for LightingDevice, GenericDevice, GenericElectricalDevice)
model
VARCHAR
,
num_of_devices
INTEGER
,
year_of_manufacture
INTEGER
,
installed_power
NUMERIC
,
installed_power_uom
VARCHAR
,
nominal_efficiency
NUMERIC
,
nominal_efficiency_uom
VARCHAR
,
efficiency_indicator
VARCHAR
,
heat_diss
NUMERIC
,
heat_diss_uom
VARCHAR
,
heat_diss_conv
NUMERIC
,
heat_diss_conv_uom
VARCHAR
,
heat_diss_lat
NUMERIC
,
heat_diss_lat_uom
VARCHAR
,
heat_diss_rad
NUMERIC
,
heat_diss_rad_uom
VARCHAR
,
-- HeatPump attributes
heat_source
VARCHAR
,
cop_source_temp
NUMERIC
,
cop_source_temp_uom
VARCHAR
,
cop_operation_temp
NUMERIC
,
cop_operation_temp_uom
VARCHAR
,
-- Boiler attributes
has_condensation
NUMERIC
,
-- MovableShadingDevice attributes
type
VARCHAR
,
type_codespace
VARCHAR
,
installation_side
VARCHAR
,
max_cover_ratio
NUMERIC
,
max_cover_ratio_uom
VARCHAR
,
-- FK to table optical_property
transmittance_id
BIGINT
,
cityobject_id
BIGINT
);
-- --------------------------------------------------------------------
-- ng3_
device_operation
-- ng3_
optical_property
-- --------------------------------------------------------------------
CREATE
TABLE
ng3_device_operation
(
id
BIGINT
PRIMARY
KEY
,
type
VARCHAR
,
type_codespace
VARCHAR
,
yearly_global_efficiency
NUMERIC
,
CREATE
TABLE
ng3_optical_property
(
id
BIGINT
PRIMARY
KEY
DEFAULT
nextval
(
'ng3_optical_property_seq'
::
regclass
),
objectclass_id
INTEGER
,
fraction
NUMERIC
,
fraction_uom
VARCHAR
,
surface
VARCHAR
,
wavelength_range
VARCHAR
,
-- FK
schedule_id
BIGINT
,
device_id
BIGINT
layered_constr_id
BIGINT
,
material_id
BIGINT
);
CREATE
INDEX
ng3_optpty_oc_fkx
ON
ng3_optical_property
USING
btree
(
objectclass_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_optpty_lcns_fkx
ON
ng3_optical_property
USING
btree
(
layered_constr_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_optpty_mat_fkx
ON
ng3_optical_property
USING
btree
(
material_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
-- --------------------------------------------------------------------
-- ng3_
energy_perf_cert
-- ng3_
qualified_attribute
-- --------------------------------------------------------------------
CREATE
TABLE
ng3_energy_perf_cert
(
id
BIGINT
PRIMARY
KEY
,
type
VARCHAR
,
type_codespace
VARCHAR
,
label
VARCHAR
,
value
NUMERIC
,
value_uom
VARCHAR
,
issue_date
DATE
,
expiration_date
DATE
,
cert_method
VARCHAR
,
cert_uri
VARCHAR
,
CREATE
TABLE
ng3_qualified_attribute
(
id
BIGINT
PRIMARY
KEY
DEFAULT
nextval
(
'ng3_qualified_attribute_seq'
::
regclass
),
objectclass_id
INTEGER
,
type
VARCHAR
,
type_codespace
VARCHAR
,
value
NUMERIC
,
value_uom
VARCHAR
,
description
VARCHAR
,
source
VARCHAR
,
-- FK
building_id
BIGINT
,
building_
partition_id
BIGINT
space_id
BIGINT
,
building_
id
BIGINT
);
CREATE
INDEX
ng3_qual_attr_oc_fkx
ON
ng3_qualified_attribute
USING
btree
(
objectclass_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_qual_attr_type_idx
ON
ng3_qualified_attribute
USING
btree
(
type
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_qual_attr_bdg_part_fkx
ON
ng3_qualified_attribute
USING
btree
(
space_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_qual_attr_bdg_fkx
ON
ng3_qualified_attribute
USING
btree
(
building_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
-- --------------------------------------------------------------------
-- ng3_
layer
-- ng3_
suitability
-- --------------------------------------------------------------------
CREATE
TABLE
ng3_layer
(
id
BIGINT
PRIMARY
KEY
,
thickness
NUMERIC
,
thickness_uom
VARCHAR
,
material_id
BIGINT
,
CREATE
TABLE
ng3_suitability
(
id
BIGINT
PRIMARY
KEY
DEFAULT
nextval
(
'ng3_suitability_seq'
::
regclass
),
reason
VARCHAR
,
reason_codespace
VARCHAR
,
value
NUMERIC
,
value_uom
VARCHAR
,
description
VARCHAR
,
-- FK
layered_construction_id
BIGINT
schedule_id
BIGINT
,
cityobject_id
BIGINT
);
CREATE
INDEX
ng3_suit_sched_fkx
ON
ng3_suitability
USING
btree
(
schedule_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_suit_cto_fkx
ON
ng3_suitability
USING
btree
(
cityobject_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
--CREATE INDEX ng3_suit_reas_fkx ON ng3_suitability USING btree (reason ASC NULLS LAST) WITH (FILLFACTOR = 90);
-- --------------------------------------------------------------------
-- ng3_layered_construction
-- --------------------------------------------------------------------
CREATE
TABLE
ng3_layered_construction
(
id
BIGINT
PRIMARY
KEY
,
objectclass_id
INTEGER
,
u_value
NUMERIC
,
u_value_uom
VARCHAR
,
g_value
NUMERIC
,
g_value_uom
VARCHAR
,
glazing_ratio
NUMERIC
,
glazing_ratio_uom
VARCHAR
,
library_code
VARCHAR
,
library_code_codespace
VARCHAR
,
-- FKs
layered_construction_id
BIGINT
,
library_id
BIGINT
);
-- --------------------------------------------------------------------
-- ng3_
library
-- ng3_
time_series
-- --------------------------------------------------------------------
CREATE
TABLE
ng3_library
(
id
BIGINT
PRIMARY
KEY
,
objectclass_id
INTEGER
,
type
VARCHAR
,
type_codespace
VARCHAR
,
author
VARCHAR
,
source
VARCHAR
CREATE
TABLE
ng3_time_series
(
id
BIGINT
PRIMARY
KEY
,
objectclass_id
INTEGER
,
-- AbstractTimeSeries attributes
acquisition_method
VARCHAR
,
acquisition_method_codespace
VARCHAR
,
interpolation_type
VARCHAR
,
source
VARCHAR
,
-- Other attributes
period_begin
TIMESTAMP
WITH
TIME
ZONE
,
period_end
TIMESTAMP
WITH
TIME
ZONE
,
start_time
TIME
WITHOUT
TIME
ZONE
,
start_day
INTEGER
,
start_month
INTEGER
,
temporal_extent
NUMERIC
,
temporal_extent_unit
VARCHAR
,
-- temporal_extent_factor INTEGER,
-- temporal_extent_radix INTEGER,
time_interval
NUMERIC
,
time_interval_unit
VARCHAR
,
-- time_interval_factor INTEGER,
-- time_interval_radix INTEGER,
values_list
TEXT
,
values_list_uom
VARCHAR
,
uom
VARCHAR
,
file_uri
VARCHAR
,
num_of_header_lines
INTEGER
,
field_separator
VARCHAR
,
record_separator
VARCHAR
,
value_column_number
INTEGER
,
decimal_symbol
VARCHAR
,
auth_type
VARCHAR
,
auth_type_codespace
VARCHAR
,
base_url
VARCHAR
,
connection_type
VARCHAR
,
connection_type_codespace
VARCHAR
,
datastream_id
VARCHAR
,
link_to_observation
VARCHAR
,
link_to_sensor_description
VARCHAR
,
mqtt_server
VARCHAR
,
mqtt_topic
VARCHAR
,
observation_id
VARCHAR
,
observation_property
VARCHAR
,
sensor_id
VARCHAR
,
sensor_name
VARCHAR
);
CREATE
INDEX
ng3_ts_oc_fkx
ON
ng3_time_series
USING
btree
(
objectclass_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
-- --------------------------------------------------------------------
-- ng3_
material
-- ng3_
schedule
-- --------------------------------------------------------------------
CREATE
TABLE
ng3_
material
(
CREATE
TABLE
ng3_
schedule
(
id
BIGINT
PRIMARY
KEY
,
objectclass_id
INTEGER
,
-- Abstract library attributes
library_code
VARCHAR
,
library_code
VARCHAR
,
library_code_codespace
VARCHAR
,
-- SolidMaterial attributes
thm_conductivity
NUMERIC
,
thm_conductivity_uom
VARCHAR
,
spec_heat_capacity
NUMERIC
,
spec_heat_capacity_uom
VARCHAR
,
density
NUMERIC
,
density_uom
VARCHAR
,
permeance
NUMERIC
,
permeance_uom
VARCHAR
,
porosity
NUMERIC
,
porosity_uom
VARCHAR
,
embodied_carbon
NUMERIC
,
embodied_carbon_uom
VARCHAR
,
embodied_energy
NUMERIC
,
embodied_energy_uom
VARCHAR
,
-- Gas attributes
is_ventilated
NUMERIC
,
r_value
NUMERIC
,
r_value_uom
VARCHAR
,
type
VARCHAR
,
type_codespace
VARCHAR
,
start_time
TIME
WITHOUT
TIME
ZONE
,
start_day
INTEGER
,
start_month
INTEGER
,
start_year
INTEGER
,
time_interval
NUMERIC
,
time_interval_unit
VARCHAR
,
-- time_interval_factor INTEGER, -- used for temporalExtent
-- time_interval_radix INTEGER, -- used for temporalExtent
-- DualValue Schedule
idle_value
NUMERIC
,
idle_value_uom
VARCHAR
,
usage_value
NUMERIC
,
usage_value_uom
VARCHAR
,
start_usage_time
TIME
WITHOUT
TIME
ZONE
,
end_usage_time
TIME
WITHOUT
TIME
ZONE
,
-- Atomic Schedule
constant_value
NUMERIC
,
constant_value_uom
VARCHAR
,
-- FK
time_series_id
BIGINT
,
library_id
BIGINT
);
CREATE
INDEX
ng3_sched_oc_fkx
ON
ng3_schedule
USING
btree
(
objectclass_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_sched_ts_fkx
ON
ng3_schedule
USING
btree
(
time_series_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_sched_lib_fkx
ON
ng3_schedule
USING
btree
(
library_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
-- --------------------------------------------------------------------
-- ng3_occupants
-- --------------------------------------------------------------------
CREATE
TABLE
ng3_occupants
(
id
BIGINT
PRIMARY
KEY
,
type
VARCHAR
,
type_codespace
VARCHAR
,
num_of_occupants
INTEGER
,
heat_diss
NUMERIC
,
heat_diss_uom
VARCHAR
,
heat_diss_conv
NUMERIC
,
heat_diss_conv_uom
VARCHAR
,
heat_diss_lat
NUMERIC
,
heat_diss_lat_uom
VARCHAR
,
heat_diss_rad
NUMERIC
,
heat_diss_rad_uom
VARCHAR
,
avg_diet_type
VARCHAR
,
avg_diet_type_codespace
VARCHAR
,
avg_income_level
VARCHAR
,
avg_income_level_codespace
VARCHAR
,
avg_instr_level
VARCHAR
,
avg_instr_level_codespace
VARCHAR
,
-- FK
schedule_id
BIGINT
,
building_partition_id
BIGINT
);
-- --------------------------------------------------------------------
-- ng3_
opening - extends (building) opening table
-- ng3_
schedule_component
-- --------------------------------------------------------------------
CREATE
TABLE
ng3_
opening
(
CREATE
TABLE
ng3_
schedule_component
(
id
BIGINT
PRIMARY
KEY
,
area
NUMERIC
,
area_uom
VARCHAR
,
azimuth
NUMERIC
,
a
zimuth_uom
VARCHAR
,
inclination
NUMERIC
,
inclination_uom
VARCHA
R
,
ground_view_factor
NUMERIC
,
ground_view_factor_uom
VARCHAR
,
sky_view_factor
NUMERIC
,
sky_view_factor_uom
VARCHAR
type
VARCHAR
,
type_codespace
VARCHAR
,
repetitions
INTEGER
NOT
NULL
DEFAULT
1
,
a
dditional_gap
NUMERIC
,
additional_gap_unit
VARCHAR
,
--
additional_gap_factor INTEGE
R,
--
additional_gap_radix INTEGER
,
-- FK
parent_schedule_id
BIGINT
,
schedule_id
BIGINT
);
CREATE
INDEX
ng3_sched_comp_sched_fk1x
ON
ng3_schedule_component
USING
btree
(
parent_schedule_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_sched_comp_sched_fk2x
ON
ng3_schedule_component
USING
btree
(
schedule_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
-- --------------------------------------------------------------------
-- ng3_
optical_property
-- ng3_
device_operation
-- --------------------------------------------------------------------
CREATE
TABLE
ng3_optical_property
(
id
BIGINT
PRIMARY
KEY
DEFAULT
nextval
(
'ng3_optical_property_seq'
::
regclass
),
objectclass_id
INTEGER
,
fraction
NUMERIC
,
fraction_uom
VARCHAR
,
surface
VARCHAR
,
wavelength_range
VARCHAR
,
CREATE
TABLE
ng3_device_operation
(
id
BIGINT
PRIMARY
KEY
,
type
VARCHAR
,
type_codespace
VARCHAR
,
yearly_global_efficiency
NUMERIC
,
-- FK
layered_construction_id
BIGINT
schedule_id
BIGINT
,
device_id
BIGINT
);
CREATE
INDEX
ng3_dev_opr_sched_fkx
ON
ng3_device_operation
USING
btree
(
schedule_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_dev_opr_dev_fkx
ON
ng3_device_operation
USING
btree
(
device_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
-- --------------------------------------------------------------------
-- ng3_
qualified_attribute
-- --------------------------------------------------------------------
CREATE
TABLE
ng3_
qualified_attribute
(
id
BIGINT
PRIMARY
KEY
DEFAULT
nextval
(
'ng3_qualified_attribute_seq'
::
regclass
)
,
objectclass_id
INTEGER
,
type
VARCHAR
,
type_codespace
VARCHAR
,
value
NUMERIC
,
value_
uom
VARCHAR
,
description
VARCHAR
,
source
VARCHAR
,
-- ng3_
sensor_data
-- --------------------------------------------------------------------
CREATE
TABLE
ng3_
sensor_data
(
id
BIGINT
PRIMARY
KEY
,
objectclass_id
INTEGER
,
type
VARCHAR
,
type_codespace
VARCHAR
,
value
_type
VARCHAR
,
value_
type_codespace
VARCHAR
,
yearly_value
NUMERIC
,
yearly_value_uom
VARCHAR
,
-- FK
building_id
BIGINT
,
building_partition_id
BIGINT
time_series_id
BIGINT
,
cityobject_id
BIGINT
,
--
position
geometry
(
POINTZ
)
);
CREATE
INDEX
ng3_sns_data_oc_fkx
ON
ng3_sensor_data
USING
btree
(
objectclass_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_sns_data_ts_fkx
ON
ng3_sensor_data
USING
btree
(
time_series_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_sns_data_cto_fkx
ON
ng3_sensor_data
USING
btree
(
cityobject_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
-- --------------------------------------------------------------------
-- ng3_
refurbishment_measure
-- ng3_
layered_construction
-- --------------------------------------------------------------------
CREATE
TABLE
ng3_
refurbishment_measure
(
CREATE
TABLE
ng3_
layered_construction
(
id
BIGINT
PRIMARY
KEY
,
objectclass_id
INTEGER
,
type
VARCHAR
,
type_codespace
VARCHAR
,
start_date
DATE
,
end_date
DATE
,
library_code
VARCHAR
,
library_code_codespace
VARCHAR
,
u_value
NUMERIC
,
u_value_uom
VARCHAR
,
g_value
NUMERIC
,
g_value_uom
VARCHAR
,
glazing_ratio
NUMERIC
,
glazing_ratio_uom
VARCHAR
,
inside_conv_coeff
NUMERIC
,
inside_conv_coeff_uom
VARCHAR
,
outside_conv_coeff
NUMERIC
,
outside_conv_coeff_uom
VARCHAR
,
-- FKs
layered_constr_id
BIGINT
,
library_id
BIGINT
);
CREATE
INDEX
ng3_lcns_oc_fkx
ON
ng3_layered_construction
USING
btree
(
objectclass_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_lcns_lcns_fkx
ON
ng3_layered_construction
USING
btree
(
layered_constr_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_lcns_lib_fkx
ON
ng3_layered_construction
USING
btree
(
library_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
-- --------------------------------------------------------------------
-- ng3_utl_ntw_connection
-- --------------------------------------------------------------------
CREATE
TABLE
ng3_utl_ntw_connection
(
id
BIGINT
PRIMARY
KEY
,
network_type
VARCHAR
,
network_type_codespace
VARCHAR
,
connection_status
VARCHAR
,
function_in_network
VARCHAR
,
function_in_network_codespace
VARCHAR
,
usage_in_network
VARCHAR
,
usage_in_network_codespace
VARCHAR
,
network_id
VARCHAR
,
network_node_id
VARCHAR
,
-- FK
building_id
BIGINT
,
building_partition_id
BIGINT
cityobject_id
BIGINT
);
CREATE
INDEX
ng3_utl_ntw_conn_cto_fkx
ON
ng3_utl_ntw_connection
USING
btree
(
cityobject_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
-- --------------------------------------------------------------------
-- ng3_resource
...
...
@@ -388,11 +408,12 @@ CREATE TABLE ng3_resource (
amount_type_codespace
VARCHAR
,
amount
NUMERIC
,
amount_uom
VARCHAR
,
time_series_id
BIGINT
,
is_amount_normalized
NUMERIC
,
normalization_param
VARCHAR
,
normalization_value
NUMERIC
,
normalization_value_uom
VARCHAR
,
ref_period
VARCHAR
,
ref_period_codespace
VARCHAR
,
co2_equivalent
NUMERIC
,
co2_equivalent_uom
VARCHAR
,
costs_money
NUMERIC
,
...
...
@@ -410,58 +431,63 @@ CREATE TABLE ng3_resource (
is_dangerous
NUMERIC
,
is_recyclable
NUMERIC
,
-- FK
amount_time_series_id
BIGINT
,
costs_time_series_id
BIGINT
,
yields_time_series_id
BIGINT
,
cityobject_id
BIGINT
);
CREATE
INDEX
ng3_res_oc_fkx
ON
ng3_resource
USING
btree
(
objectclass_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_res_ts1_fkx
ON
ng3_resource
USING
btree
(
amount_time_series_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_res_ts2_fkx
ON
ng3_resource
USING
btree
(
costs_time_series_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_res_ts3_fkx
ON
ng3_resource
USING
btree
(
yields_time_series_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_res_cto_fkx
ON
ng3_resource
USING
btree
(
cityobject_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
-- --------------------------------------------------------------------
-- ng3_
schedul
e
-- ng3_
devic
e
-- --------------------------------------------------------------------
CREATE
TABLE
ng3_
schedul
e
(
CREATE
TABLE
ng3_
devic
e
(
id
BIGINT
PRIMARY
KEY
,
objectclass_id
INTEGER
,
library_code
VARCHAR
,
library_code_codespace
VARCHAR
,
type
VARCHAR
,
type_codespace
VARCHAR
,
start_time
TIME
WITHOUT
TIME
ZONE
,
start_day
INTEGER
,
start_month
INTEGER
,
start_year
INTEGER
,
time_interval
NUMERIC
,
time_interval_unit
VARCHAR
,
-- time_interval_factor INTEGER, -- used for temporalExtent
-- time_interval_radix INTEGER, -- used for temporalExtent
-- DualValue Schedule
idle_value
NUMERIC
,
idle_value_uom
VARCHAR
,
usage_value
NUMERIC
,
usage_value_uom
VARCHAR
,
start_usage_time
TIME
WITHOUT
TIME
ZONE
,
end_usage_time
TIME
WITHOUT
TIME
ZONE
,
-- Atomic Schedule
constant_value
NUMERIC
,
constant_value_uom
VARCHAR
,
-- AbstractDevice attributes (also for LightingDevice, GenericDevice, GenericElectricalDevice)
model
VARCHAR
,
num_of_devices
INTEGER
,
year_of_manufacture
INTEGER
,
installed_power
NUMERIC
,
installed_power_uom
VARCHAR
,
nominal_efficiency
NUMERIC
,
nominal_efficiency_uom
VARCHAR
,
efficiency_indicator
VARCHAR
,
heat_diss
NUMERIC
,
heat_diss_uom
VARCHAR
,
heat_diss_conv
NUMERIC
,
heat_diss_conv_uom
VARCHAR
,
heat_diss_lat
NUMERIC
,
heat_diss_lat_uom
VARCHAR
,
heat_diss_rad
NUMERIC
,
heat_diss_rad_uom
VARCHAR
,
-- HeatPump attributes
heat_source
VARCHAR
,
cop_source_temp
NUMERIC
,
cop_source_temp_uom
VARCHAR
,
cop_operation_temp
NUMERIC
,
cop_operation_temp_uom
VARCHAR
,
-- Boiler attributes
has_condensation
NUMERIC
,
-- MovableShadingDevice attributes
type
VARCHAR
,
type_codespace
VARCHAR
,
installation_side
VARCHAR
,
max_cover_ratio
NUMERIC
,
max_cover_ratio_uom
VARCHAR
,
-- FK
time_series
_id
BIGINT
,
library_id
BIGINT
transmittance
_id
BIGINT
,
cityobject_id
BIGINT
);
CREATE
INDEX
ng3_dev_oc_fkx
ON
ng3_device
USING
btree
(
objectclass_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_dev_opt_fkx
ON
ng3_device
USING
btree
(
transmittance_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_dev_cto_fkx
ON
ng3_device
USING
btree
(
cityobject_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
-- --------------------------------------------------------------------
-- ng3_schedule_component
-- --------------------------------------------------------------------
CREATE
TABLE
ng3_schedule_component
(
id
BIGINT
PRIMARY
KEY
,
type
VARCHAR
,
type_codespace
VARCHAR
,
repetitions
INTEGER
NOT
NULL
DEFAULT
1
,
additional_gap
NUMERIC
,
additional_gap_unit
VARCHAR
,
-- additional_gap_factor INTEGER,
-- additional_gap_radix INTEGER,
-- FK
parent_schedule_id
BIGINT
,
schedule_id
BIGINT
);
-- --------------------------------------------------------------------
-- ng3_solar_collector
...
...
@@ -489,6 +515,10 @@ CREATE TABLE ng3_solar_collector (
lod2_multi_surface_id
BIGINT
,
lod3_multi_surface_id
BIGINT
);
CREATE
INDEX
ng3_sol_col_oc_fkx
ON
ng3_solar_collector
USING
btree
(
objectclass_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_sol_col_lod2_fkx
ON
ng3_solar_collector
USING
btree
(
lod2_multi_surface_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_sol_col_lod3_fkx
ON
ng3_solar_collector
USING
btree
(
lod3_multi_surface_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
-- --------------------------------------------------------------------
-- ng3_storage_device
...
...
@@ -509,106 +539,183 @@ CREATE TABLE ng3_storage_device (
power_capacity
NUMERIC
,
power_capacity_uom
VARCHAR
);
CREATE
INDEX
ng3_sto_dev_oc_fkx
ON
ng3_storage_device
USING
btree
(
objectclass_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
-- --------------------------------------------------------------------
-- ng3_
suitabilit
y
-- ng3_
librar
y
-- --------------------------------------------------------------------
CREATE
TABLE
ng3_suitability
(
id
BIGINT
PRIMARY
KEY
DEFAULT
nextval
(
'ng3_suitability_seq'
::
regclass
),
reason
VARCHAR
,
reason_codespace
VARCHAR
,
value
NUMERIC
,
value_uom
VARCHAR
,
description
VARCHAR
,
schedule_id
BIGINT
,
-- FK
cityobject_id
BIGINT
CREATE
TABLE
ng3_library
(
id
BIGINT
PRIMARY
KEY
,
objectclass_id
INTEGER
,
type
VARCHAR
,
type_codespace
VARCHAR
,
author
VARCHAR
,
source
VARCHAR
);
CREATE
INDEX
ng3_lib_oc_fkx
ON
ng3_library
USING
btree
(
objectclass_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
-- --------------------------------------------------------------------
-- ng3_
them_surf_to_thermal_zone
-- ng3_
energy_perf_cert
-- --------------------------------------------------------------------
CREATE
TABLE
ng3_them_surf_to_thermal_zone
(
thematic_surface_id
BIGINT
NOT
NULL
,
thermal_zone_id
BIGINT
NOT
NULL
,
PRIMARY
KEY
(
thematic_surface_id
,
thermal_zone_id
)
CREATE
TABLE
ng3_energy_perf_cert
(
id
BIGINT
PRIMARY
KEY
,
type
VARCHAR
,
type_codespace
VARCHAR
,
label
VARCHAR
,
value
NUMERIC
,
value_uom
VARCHAR
,
cert_method
VARCHAR
,
-- FK
space_id
BIGINT
,
building_id
BIGINT
);
CREATE
INDEX
ng3_epc_bdgsp_fkx
ON
ng3_energy_perf_cert
USING
btree
(
space_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_epc_bdg_fkx
ON
ng3_energy_perf_cert
USING
btree
(
building_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
-- --------------------------------------------------------------------
-- ng3_
thematic_surface - extends (building) thematic_surface table
-- ng3_
refurbishment_measure
-- --------------------------------------------------------------------
CREATE
TABLE
ng3_
thematic_surfac
e
(
CREATE
TABLE
ng3_
refurbishment_measur
e
(
id
BIGINT
PRIMARY
KEY
,
total_surf_area
NUMERIC
,
total_surf_area_uom
VARCHAR
,
opaque_surf_area
NUMERIC
,
opaque_surf_area_uom
VARCHAR
,
open_to_surf_ratio
NUMERIC
,
open_to_surf_ratio_uom
VARCHAR
,
thickness
NUMERIC
,
thickness_uom
VARCHAR
,
azimuth
NUMERIC
,
azimuth_uom
VARCHAR
,
inclination
NUMERIC
,
inclination_uom
VARCHAR
,
ground_view_factor
NUMERIC
,
ground_view_factor_uom
VARCHAR
,
sky_view_factor
NUMERIC
,
sky_view_factor_uom
VARCHAR
,
is_adiabatic
NUMERIC
,
heat_capacity
NUMERIC
,
heat_capacity_uom
VARCHAR
type
VARCHAR
,
type_codespace
VARCHAR
,
status
VARCHAR
,
status_codespace
VARCHAR
,
start_date
DATE
,
end_date
DATE
,
-- FK
space_id
BIGINT
,
building_id
BIGINT
);
CREATE
INDEX
ng3_ref_meas_bdgsp_fkx
ON
ng3_refurbishment_measure
USING
btree
(
space_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_ref_meas_bdg_fkx
ON
ng3_refurbishment_measure
USING
btree
(
building_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
-- --------------------------------------------------------------------
-- ng3_
time_series
-- ng3_
occupants
-- --------------------------------------------------------------------
CREATE
TABLE
ng3_time_series
(
id
BIGINT
PRIMARY
KEY
,
objectclass_id
INTEGER
,
-- AbstractTieSeries attributes
acquisition_method
VARCHAR
,
acquisition_method_codespace
VARCHAR
,
interpolation_type
VARCHAR
,
source
VARCHAR
,
-- Other attributes
period_begin
TIMESTAMP
WITH
TIME
ZONE
,
period_end
TIMESTAMP
WITH
TIME
ZONE
,
start_time
TIME
WITHOUT
TIME
ZONE
,
start_day
INTEGER
,
start_month
INTEGER
,
temporal_extent
NUMERIC
,
temporal_extent_unit
VARCHAR
,
-- temporal_extent_factor INTEGER,
-- temporal_extent_radix INTEGER,
time_interval
NUMERIC
,
time_interval_unit
VARCHAR
,
-- time_interval_factor INTEGER,
-- time_interval_radix INTEGER,
values_list
TEXT
,
values_list_uom
VARCHAR
,
uom
VARCHAR
,
file_uri
VARCHAR
,
num_of_header_lines
INTEGER
,
field_separator
VARCHAR
,
record_separator
VARCHAR
,
value_column_number
INTEGER
,
decimal_symbol
VARCHAR
,
auth_type
VARCHAR
,
auth_type_codespace
VARCHAR
,
base_url
VARCHAR
,
connection_type
VARCHAR
,
connection_type_codespace
VARCHAR
,
datastream_id
VARCHAR
,
link_to_observation
VARCHAR
,
link_to_sensor_description
VARCHAR
,
mqtt_server
VARCHAR
,
mqtt_topic
VARCHAR
,
observation_id
VARCHAR
,
observation_property
VARCHAR
,
sensor_id
VARCHAR
,
sensor_name
VARCHAR
CREATE
TABLE
ng3_occupants
(
id
BIGINT
PRIMARY
KEY
,
type
VARCHAR
,
type_codespace
VARCHAR
,
num_of_occupants
INTEGER
,
heat_diss
NUMERIC
,
heat_diss_uom
VARCHAR
,
heat_diss_conv
NUMERIC
,
heat_diss_conv_uom
VARCHAR
,
heat_diss_lat
NUMERIC
,
heat_diss_lat_uom
VARCHAR
,
heat_diss_rad
NUMERIC
,
heat_diss_rad_uom
VARCHAR
,
avg_diet_type
VARCHAR
,
avg_diet_type_codespace
VARCHAR
,
avg_income_level
VARCHAR
,
avg_income_level_codespace
VARCHAR
,
avg_instr_level
VARCHAR
,
avg_instr_level_codespace
VARCHAR
,
-- FK
schedule_id
BIGINT
,
space_id
BIGINT
,
building_id
BIGINT
);
CREATE
INDEX
ng3_occ_sched_fkx
ON
ng3_occupants
USING
btree
(
schedule_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_occ_spc_fkx
ON
ng3_occupants
USING
btree
(
space_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_occ_bdg_fkx
ON
ng3_occupants
USING
btree
(
building_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
-- --------------------------------------------------------------------
-- ng3_space
-- --------------------------------------------------------------------
CREATE
TABLE
ng3_space
(
id
BIGINT
PRIMARY
KEY
,
objectclass_id
INTEGER
,
type
VARCHAR
,
type_codespace
VARCHAR
,
-- Building unit atts
num_of_rooms
INTEGER
,
owner_name
VARCHAR
,
ownership_type
VARCHAR
,
ownership_type_codespace
VARCHAR
,
-- Zone atts
heat_capacity
NUMERIC
,
heat_capacity_uom
VARCHAR
,
infiltration_rate
NUMERIC
,
infiltration_rate_uom
VARCHAR
,
is_cooled
NUMERIC
,
is_heated
NUMERIC
,
is_mech_ventilated
NUMERIC
,
int_heat_gains
NUMERIC
,
int_heat_gains_uom
VARCHAR
,
int_heat_gains_conv
NUMERIC
,
int_heat_gains_conv_uom
VARCHAR
,
int_heat_gains_lat
NUMERIC
,
int_heat_gains_lat_uom
VARCHAR
,
int_heat_gains_rad
NUMERIC
,
int_heat_gains_rad_uom
VARCHAR
,
coincides_with_lod2_hull
NUMERIC
,
coincides_with_lod3_hull
NUMERIC
,
-- FK
cool_schedule_id
BIGINT
,
heat_schedule_id
BIGINT
,
mech_vent_schedule_id
BIGINT
,
building_unit_id
BIGINT
,
space_id
BIGINT
,
building_id
BIGINT
,
lod1_solid_id
BIGINT
,
lod2_solid_id
BIGINT
,
lod3_solid_id
BIGINT
);
CREATE
INDEX
ng3_spc_oc_fkx
ON
ng3_space
USING
btree
(
objectclass_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_spc_sched_fk1x
ON
ng3_space
USING
btree
(
cool_schedule_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_spc_sched_fk2x
ON
ng3_space
USING
btree
(
heat_schedule_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_spc_sched_fk3x
ON
ng3_space
USING
btree
(
mech_vent_schedule_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_spc_zn_fkx
ON
ng3_space
USING
btree
(
space_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_spc_bdgu_fkx
ON
ng3_space
USING
btree
(
building_unit_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_spc_bdg_fkx
ON
ng3_space
USING
btree
(
building_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_spc_solid1_fkx
ON
ng3_space
USING
btree
(
lod1_solid_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_spc_solid2_fkx
ON
ng3_space
USING
btree
(
lod2_solid_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_spc_solid3_fkx
ON
ng3_space
USING
btree
(
lod3_solid_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
-- --------------------------------------------------------------------
-- ng3_address_to_building_unit
-- --------------------------------------------------------------------
CREATE
TABLE
ng3_address_to_building_unit
(
address_id
BIGINT
NOT
NULL
,
space_id
BIGINT
NOT
NULL
,
PRIMARY
KEY
(
address_id
,
space_id
)
);
CREATE
INDEX
ng3_addr_to_bdgu_fk1x
ON
ng3_address_to_building_unit
USING
btree
(
address_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_addr_to_bdgu_fk2x
ON
ng3_address_to_building_unit
USING
btree
(
space_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
-- --------------------------------------------------------------------
-- ng3_zone_thematic_surface
-- --------------------------------------------------------------------
CREATE
TABLE
ng3_zone_thematic_surface
(
id
BIGINT
PRIMARY
KEY
,
objectclass_id
INTEGER
,
-- FK
space_id
BIGINT
);
CREATE
INDEX
ng3_zn_them_surf_oc_fkx
ON
ng3_zone_thematic_surface
USING
btree
(
objectclass_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_zn_them_surf_zn_fkx
ON
ng3_zone_thematic_surface
USING
btree
(
space_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
-- --------------------------------------------------------------------
-- ng3_zone_opening
-- --------------------------------------------------------------------
CREATE
TABLE
ng3_zone_opening
(
id
BIGINT
PRIMARY
KEY
,
objectclass_id
INTEGER
,
-- FK
zone_them_surf_id
BIGINT
);
CREATE
INDEX
ng3_zn_opn_oc_fkx
ON
ng3_zone_opening
USING
btree
(
objectclass_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_zn_opn_zn_surf_fkx
ON
ng3_zone_opening
USING
btree
(
zone_them_surf_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
-- --------------------------------------------------------------------
-- ng3_urban_function_area
...
...
@@ -618,192 +725,134 @@ CREATE TABLE ng3_urban_function_area (
type
VARCHAR
,
type_codespace
VARCHAR
,
code
VARCHAR
,
code_codespace
VARCHAR
code_codespace
VARCHAR
,
area
NUMERIC
,
area_uom
VARCHAR
);
-- no indices needed for FK
-- --------------------------------------------------------------------
-- ng3_
utl_ntw_connection
-- ng3_
layer
-- --------------------------------------------------------------------
CREATE
TABLE
ng3_utl_ntw_connection
(
id
BIGINT
PRIMARY
KEY
,
network_type
VARCHAR
,
network_type_codespace
VARCHAR
,
connection_status
VARCHAR
,
function_in_network
VARCHAR
,
function_in_network_codespace
VARCHAR
,
usage_in_network
VARCHAR
,
usage_in_network_codespace
VARCHAR
,
network_id
VARCHAR
,
network_node_id
VARCHAR
,
-- FK
cityobject_id
BIGINT
CREATE
TABLE
ng3_layer
(
id
BIGINT
PRIMARY
KEY
,
thickness
NUMERIC
,
thickness_uom
VARCHAR
,
-- FK
material_id
BIGINT
,
layered_constr_id
BIGINT
);
CREATE
INDEX
ng3_lyr_mat_fkx
ON
ng3_layer
USING
btree
(
material_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_lyr_lcns_fkx
ON
ng3_layer
USING
btree
(
layered_constr_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
-- --------------------------------------------------------------------
-- ng3_
we
at
h
er
_data
-- ng3_
m
ater
ial
-- --------------------------------------------------------------------
CREATE
TABLE
ng3_
we
at
h
er
_data
(
CREATE
TABLE
ng3_
m
ater
ial
(
id
BIGINT
PRIMARY
KEY
,
type
VARCHAR
,
objectclass_id
INTEGER
,
type
VARCHAR
,
type_codespace
VARCHAR
,
value_type
VARCHAR
,
value_type_codespace
VARCHAR
,
yearly_value
NUMERIC
,
yearly_value_uom
VARCHAR
,
library_code
VARCHAR
,
library_code_codespace
VARCHAR
,
-- SolidMaterial atts
is_transparent
NUMERIC
,
thm_conductivity
NUMERIC
,
thm_conductivity_uom
VARCHAR
,
spec_heat_capacity
NUMERIC
,
spec_heat_capacity_uom
VARCHAR
,
density
NUMERIC
,
density_uom
VARCHAR
,
permeance
NUMERIC
,
permeance_uom
VARCHAR
,
porosity
NUMERIC
,
porosity_uom
VARCHAR
,
embodied_carbon
NUMERIC
,
embodied_carbon_uom
VARCHAR
,
embodied_energy
NUMERIC
,
embodied_energy_uom
VARCHAR
,
-- Liquid atts
viscosity
NUMERIC
,
viscosity_uom
VARCHAR
,
-- Gas atts
is_ventilated
NUMERIC
,
r_value
NUMERIC
,
r_value_uom
VARCHAR
,
-- FK
time_series_id
BIGINT
,
cityobject_id
BIGINT
,
--
position
geometry
(
POINTZ
)
library_id
BIGINT
);
CREATE
INDEX
ng3_mat_oc_fkx
ON
ng3_material
USING
btree
(
objectclass_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_mat_lib_fkx
ON
ng3_material
USING
btree
(
library_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-- *********************************** Create
foreign key
s ********************************
-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-- *********************************** Create
Constraint
s ********************************
*
-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-- --------------------------------------------------------------------
-- ng3_
address_to_building_unit
-- ng3_
optical_property
-- --------------------------------------------------------------------
ALTER
TABLE
ng3_address_to_building_unit
ADD
CONSTRAINT
ng3_addr_to_bdgu_fk1
FOREIGN
KEY
(
address_id
)
REFERENCES
address
(
id
)
ON
DELETE
CASCADE
;
ALTER
TABLE
ng3_address_to_building_unit
ADD
CONSTRAINT
ng3_addr_to_bdgu_fk2
FOREIGN
KEY
(
building_unit_id
)
REFERENCES
ng3_building_partition
(
id
)
ON
DELETE
CASCADE
;
ALTER
TABLE
ng3_optical_property
ADD
CONSTRAINT
ng3_optpty_oc_fk
FOREIGN
KEY
(
objectclass_id
)
REFERENCES
objectclass
(
id
);
ALTER
TABLE
ng3_optical_property
ADD
CONSTRAINT
ng3_optpty_ng3_lcns_fk
FOREIGN
KEY
(
layered_constr_id
)
REFERENCES
ng3_layered_construction
(
id
);
ALTER
TABLE
ng3_optical_property
ADD
CONSTRAINT
ng3_optpty_ng3_mat_fk
FOREIGN
KEY
(
material_id
)
REFERENCES
ng3_material
(
id
);
-- --------------------------------------------------------------------
-- ng3_building
-- --------------------------------------------------------------------
ALTER
TABLE
ng3_building
ADD
CONSTRAINT
ng3_bdg_fk
FOREIGN
KEY
(
id
)
REFERENCES
building
(
id
);
-- --------------------------------------------------------------------
-- ng3_
building_partition
-- ng3_
qualified_attribute
-- --------------------------------------------------------------------
ALTER
TABLE
ng3_building_partition
ADD
CONSTRAINT
ng3_bdgp_fk
FOREIGN
KEY
(
id
)
REFERENCES
cityobject
(
id
);
ALTER
TABLE
ng3_building_partition
ADD
CONSTRAINT
ng3_bdgp_oc_fk
FOREIGN
KEY
(
objectclass_id
)
REFERENCES
objectclass
(
id
);
ALTER
TABLE
ng3_building_partition
ADD
CONSTRAINT
ng3_bdgp_lod1_fk
FOREIGN
KEY
(
lod1_solid_id
)
REFERENCES
surface_geometry
(
id
);
ALTER
TABLE
ng3_building_partition
ADD
CONSTRAINT
ng3_bdgp_lod2_fk
FOREIGN
KEY
(
lod2_solid_id
)
REFERENCES
surface_geometry
(
id
);
ALTER
TABLE
ng3_building_partition
ADD
CONSTRAINT
ng3_bdgp_lod3_fk
FOREIGN
KEY
(
lod3_solid_id
)
REFERENCES
surface_geometry
(
id
);
ALTER
TABLE
ng3_building_partition
ADD
CONSTRAINT
ng3_bdgp_uz_fk
FOREIGN
KEY
(
usage_zone_id
)
REFERENCES
ng3_building_partition
(
id
)
ON
DELETE
SET
NULL
;
ALTER
TABLE
ng3_building_partition
ADD
CONSTRAINT
ng3_bdgp_tz_fk
FOREIGN
KEY
(
thermal_zone_id
)
REFERENCES
ng3_building_partition
(
id
)
ON
DELETE
SET
NULL
;
ALTER
TABLE
ng3_building_partition
ADD
CONSTRAINT
ng3_bdgp_bdg_fk
FOREIGN
KEY
(
building_id
)
REFERENCES
ng3_building
(
id
);
ALTER
TABLE
ng3_building_partition
ADD
CONSTRAINT
ng3_bdgp_sched_fk1
FOREIGN
KEY
(
cooling_schedule_id
)
REFERENCES
ng3_schedule
(
id
)
ON
DELETE
SET
NULL
;
ALTER
TABLE
ng3_building_partition
ADD
CONSTRAINT
ng3_bdgp_sched_fk2
FOREIGN
KEY
(
heating_schedule_id
)
REFERENCES
ng3_schedule
(
id
)
ON
DELETE
SET
NULL
;
ALTER
TABLE
ng3_building_partition
ADD
CONSTRAINT
ng3_bdgp_sched_fk3
FOREIGN
KEY
(
ventilation_schedule_id
)
REFERENCES
ng3_schedule
(
id
)
ON
DELETE
SET
NULL
;
ALTER
TABLE
ng3_qualified_attribute
ADD
CONSTRAINT
ng3_qatt_oc_fk
FOREIGN
KEY
(
objectclass_id
)
REFERENCES
objectclass
(
id
);
ALTER
TABLE
ng3_qualified_attribute
ADD
CONSTRAINT
ng3_qatt_ng3_bdg_fk
FOREIGN
KEY
(
building_id
)
REFERENCES
ng3_building
(
id
);
ALTER
TABLE
ng3_qualified_attribute
ADD
CONSTRAINT
ng3_qatt_ng3_spc_fk
FOREIGN
KEY
(
space_id
)
REFERENCES
ng3_space
(
id
);
-- --------------------------------------------------------------------
-- ng3_cityobject
-- --------------------------------------------------------------------
ALTER
TABLE
ng3_cityobject
ADD
CONSTRAINT
ng3_cto_fk
FOREIGN
KEY
(
id
)
REFERENCES
cityobject
(
id
);
ALTER
TABLE
ng3_cityobject
ADD
CONSTRAINT
ng3_cto_lcns_fk
FOREIGN
KEY
(
layered_construction_id
)
REFERENCES
ng3_layered_construction
(
id
)
ON
DELETE
SET
NULL
;
-- --------------------------------------------------------------------
-- ng3_
ctyobj_relation
-- ng3_
suitability
-- --------------------------------------------------------------------
ALTER
TABLE
ng3_
ctyobj_relation
ADD
CONSTRAINT
ng3_
cto_rel
_fk
2
FOREIGN
KEY
(
cityobject_id
)
REFERENCES
cityobject
(
id
)
ON
DELETE
SET
NULL
;
ALTER
TABLE
ng3_
ctyobj_relation
ADD
CONSTRAINT
ng3_
cto_rel
_fk
1
FOREIGN
KEY
(
ng3_cityobject
_id
)
REFERENCES
ng3_
cityobject
(
id
)
;
ALTER
TABLE
ng3_
suitability
ADD
CONSTRAINT
ng3_
suit_ng3_cto
_fk
FOREIGN
KEY
(
cityobject_id
)
REFERENCES
ng3_
cityobject
(
id
);
ALTER
TABLE
ng3_
suitability
ADD
CONSTRAINT
ng3_
suit_ng3_sched
_fk
FOREIGN
KEY
(
schedule
_id
)
REFERENCES
ng3_
schedule
(
id
)
ON
DELETE
SET
NULL
;
-- --------------------------------------------------------------------
-- ng3_device
-- --------------------------------------------------------------------
ALTER
TABLE
ng3_device
ADD
CONSTRAINT
ng3_dev_fk
FOREIGN
KEY
(
id
)
REFERENCES
cityobject
(
id
);
ALTER
TABLE
ng3_device
ADD
CONSTRAINT
ng3_dev_oc_fk
FOREIGN
KEY
(
objectclass_id
)
REFERENCES
objectclass
(
id
);
ALTER
TABLE
ng3_device
ADD
CONSTRAINT
ng3_dev_opt_fk
FOREIGN
KEY
(
transmittance_id
)
REFERENCES
ng3_optical_property
(
id
)
ON
DELETE
SET
NULL
;
ALTER
TABLE
ng3_device
ADD
CONSTRAINT
ng3_dev_ng3_cto_fk
FOREIGN
KEY
(
cityobject_id
)
REFERENCES
ng3_cityobject
(
id
)
ON
DELETE
SET
NULL
;
-- --------------------------------------------------------------------
-- ng3_
device_operation
-- ng3_
cityobject
-- --------------------------------------------------------------------
ALTER
TABLE
ng3_device_operation
ADD
CONSTRAINT
ng3_dev_opr_fk
FOREIGN
KEY
(
id
)
REFERENCES
cityobject
(
id
);
ALTER
TABLE
ng3_device_operation
ADD
CONSTRAINT
ng3_dev_opr_sched_fk
FOREIGN
KEY
(
schedule_id
)
REFERENCES
ng3_schedule
(
id
)
ON
DELETE
SET
NULL
;
ALTER
TABLE
ng3_device_operation
ADD
CONSTRAINT
ng3_dev_opr_dev_fk
FOREIGN
KEY
(
device_id
)
REFERENCES
ng3_device
(
id
)
ON
DELETE
SET
NULL
;
ALTER
TABLE
ng3_cityobject
ADD
CONSTRAINT
ng3_cto_fk
FOREIGN
KEY
(
id
)
REFERENCES
cityobject
(
id
);
ALTER
TABLE
ng3_cityobject
ADD
CONSTRAINT
ng3_cto_oc_fk
FOREIGN
KEY
(
objectclass_id
)
REFERENCES
objectclass
(
id
);
ALTER
TABLE
ng3_cityobject
ADD
CONSTRAINT
ng3_cto_ng3_lcns_fk
FOREIGN
KEY
(
layered_constr_id
)
REFERENCES
ng3_layered_construction
(
id
)
ON
DELETE
SET
NULL
;
ALTER
TABLE
ng3_cityobject
ADD
CONSTRAINT
ng3_cto_ng3_llcns_fk
FOREIGN
KEY
(
lib_layered_constr_id
)
REFERENCES
ng3_layered_construction
(
id
)
ON
DELETE
SET
NULL
;
-- --------------------------------------------------------------------
-- ng3_energy_perf_cert
-- --------------------------------------------------------------------
ALTER
TABLE
ng3_energy_perf_cert
ADD
CONSTRAINT
ng3_epc_fk
FOREIGN
KEY
(
id
)
REFERENCES
cityobject
(
id
);
ALTER
TABLE
ng3_energy_perf_cert
ADD
CONSTRAINT
ng3_epc_bdg_fk
FOREIGN
KEY
(
building_id
)
REFERENCES
ng3_building
(
id
)
ON
DELETE
SET
NULL
;
ALTER
TABLE
ng3_energy_perf_cert
ADD
CONSTRAINT
ng3_epc_bdg_part_fk
FOREIGN
KEY
(
building_partition_id
)
REFERENCES
ng3_building_partition
(
id
)
ON
DELETE
SET
NULL
;
-- --------------------------------------------------------------------
-- ng3_
layer
-- ng3_
ctyobj_relation
-- --------------------------------------------------------------------
ALTER
TABLE
ng3_layer
ADD
CONSTRAINT
ng3_lyr_fk
FOREIGN
KEY
(
id
)
REFERENCES
cityobject
(
id
);
ALTER
TABLE
ng3_layer
ADD
CONSTRAINT
ng3_lyr_mat_fk
FOREIGN
KEY
(
material_id
)
REFERENCES
ng3_material
(
id
)
ON
DELETE
SET
NULL
;
ALTER
TABLE
ng3_layer
ADD
CONSTRAINT
ng3_lyr_lcns_fk
FOREIGN
KEY
(
layered_construction_id
)
REFERENCES
ng3_layered_construction
(
id
)
ON
DELETE
SET
NULL
;
ALTER
TABLE
ng3_ctyobj_relation
ADD
CONSTRAINT
ng3_cto_rel_fk2
FOREIGN
KEY
(
ng3_cityobject_id
)
REFERENCES
ng3_cityobject
(
id
);
ALTER
TABLE
ng3_ctyobj_relation
ADD
CONSTRAINT
ng3_cto_rel_fk1
FOREIGN
KEY
(
cityobject_id
)
REFERENCES
cityobject
(
id
)
ON
DELETE
CASCADE
;
-- --------------------------------------------------------------------
-- ng3_layered_construction
-- --------------------------------------------------------------------
ALTER
TABLE
ng3_layered_construction
ADD
CONSTRAINT
ng3_lcns_fk
FOREIGN
KEY
(
id
)
REFERENCES
cityobject
(
id
);
ALTER
TABLE
ng3_layered_construction
ADD
CONSTRAINT
ng3_lcns_oc_fk
FOREIGN
KEY
(
objectclass_id
)
REFERENCES
objectclass
(
id
);
ALTER
TABLE
ng3_layered_construction
ADD
CONSTRAINT
ng3_lcns_lcns_fk
FOREIGN
KEY
(
layered_construction_id
)
REFERENCES
ng3_layered_construction
(
id
)
ON
DELETE
SET
NULL
;
ALTER
TABLE
ng3_layered_construction
ADD
CONSTRAINT
ng3_lcns_lib_fk
FOREIGN
KEY
(
library_id
)
REFERENCES
ng3_library
(
id
)
ON
DELETE
SET
NULL
;
-- --------------------------------------------------------------------
-- ng3_
library
-- ng3_
building
-- --------------------------------------------------------------------
ALTER
TABLE
ng3_library
ADD
CONSTRAINT
ng3_lib_fk
FOREIGN
KEY
(
id
)
REFERENCES
cityobject
(
id
);
ALTER
TABLE
ng3_library
ADD
CONSTRAINT
ng3_lib_oc_fk
FOREIGN
KEY
(
objectclass_id
)
REFERENCES
objectclass
(
id
);
ALTER
TABLE
ng3_building
ADD
CONSTRAINT
ng3_bdg_fk
FOREIGN
KEY
(
id
)
REFERENCES
building
(
id
);
-- --------------------------------------------------------------------
-- ng3_material
-- --------------------------------------------------------------------
ALTER
TABLE
ng3_material
ADD
CONSTRAINT
ng3_mat_fk
FOREIGN
KEY
(
id
)
REFERENCES
cityobject
(
id
);
ALTER
TABLE
ng3_material
ADD
CONSTRAINT
ng3_mat_lib_fk
FOREIGN
KEY
(
library_id
)
REFERENCES
ng3_library
(
id
)
ON
DELETE
SET
NULL
;
-- --------------------------------------------------------------------
-- ng3_
occupants
-- ng3_
thematic_surface
-- --------------------------------------------------------------------
ALTER
TABLE
ng3_occupants
ADD
CONSTRAINT
ng3_occ_fk
FOREIGN
KEY
(
id
)
REFERENCES
cityobject
(
id
);
ALTER
TABLE
ng3_occupants
ADD
CONSTRAINT
ng3_occ_sched_fk
FOREIGN
KEY
(
schedule_id
)
REFERENCES
ng3_schedule
(
id
)
ON
DELETE
SET
NULL
;
ALTER
TABLE
ng3_occupants
ADD
CONSTRAINT
ng3_occ_ng3_bdgp_fk
FOREIGN
KEY
(
building_partition_id
)
REFERENCES
ng3_building_partition
(
id
)
ON
DELETE
SET
NULL
;
ALTER
TABLE
ng3_thematic_surface
ADD
CONSTRAINT
ng3_them_surf_fk
FOREIGN
KEY
(
id
)
REFERENCES
thematic_surface
(
id
);
-- --------------------------------------------------------------------
-- ng3_opening
-- --------------------------------------------------------------------
ALTER
TABLE
ng3_opening
ADD
CONSTRAINT
ng3_opn_fk
FOREIGN
KEY
(
id
)
REFERENCES
opening
(
id
);
-- --------------------------------------------------------------------
-- ng3_optical_property
-- --------------------------------------------------------------------
ALTER
TABLE
ng3_optical_property
ADD
CONSTRAINT
ng3_optpty_oc_fk
FOREIGN
KEY
(
objectclass_id
)
REFERENCES
objectclass
(
id
);
ALTER
TABLE
ng3_optical_property
ADD
CONSTRAINT
ng3_optpty_lcns_fk
FOREIGN
KEY
(
layered_construction_id
)
REFERENCES
ng3_layered_construction
(
id
);
-- --------------------------------------------------------------------
-- ng3_qualified_attribute
-- --------------------------------------------------------------------
ALTER
TABLE
ng3_qualified_attribute
ADD
CONSTRAINT
ng3_qatt_oc_fk
FOREIGN
KEY
(
objectclass_id
)
REFERENCES
objectclass
(
id
);
ALTER
TABLE
ng3_qualified_attribute
ADD
CONSTRAINT
ng3_qatt_bdg_fk
FOREIGN
KEY
(
building_id
)
REFERENCES
ng3_building
(
id
);
ALTER
TABLE
ng3_qualified_attribute
ADD
CONSTRAINT
ng3_qatt_bdg_part_fk
FOREIGN
KEY
(
building_partition_id
)
REFERENCES
ng3_building_partition
(
id
);
-- --------------------------------------------------------------------
-- ng3_refurbishment_measure
-- --------------------------------------------------------------------
ALTER
TABLE
ng3_refurbishment_measure
ADD
CONSTRAINT
ng3_refurb_fk
FOREIGN
KEY
(
id
)
REFERENCES
cityobject
(
id
);
ALTER
TABLE
ng3_refurbishment_measure
ADD
CONSTRAINT
ng3_refurb_bdg_fk
FOREIGN
KEY
(
building_id
)
REFERENCES
ng3_building
(
id
)
ON
DELETE
SET
NULL
;
ALTER
TABLE
ng3_refurbishment_measure
ADD
CONSTRAINT
ng3_refurb_bdg_part_fk
FOREIGN
KEY
(
building_partition_id
)
REFERENCES
ng3_building_partition
(
id
)
ON
DELETE
SET
NULL
;
-- --------------------------------------------------------------------
-- ng3_resource
-- --------------------------------------------------------------------
ALTER
TABLE
ng3_resource
ADD
CONSTRAINT
ng3_res_fk
FOREIGN
KEY
(
id
)
REFERENCES
cityobject
(
id
);
ALTER
TABLE
ng3_resource
ADD
CONSTRAINT
ng3_res_oc_fk
FOREIGN
KEY
(
objectclass_id
)
REFERENCES
objectclass
(
id
);
ALTER
TABLE
ng3_resource
ADD
CONSTRAINT
ng3_res_ts_fk
FOREIGN
KEY
(
time_series_id
)
REFERENCES
ng3_time_series
(
id
)
ON
DELETE
SET
NULL
;
ALTER
TABLE
ng3_resource
ADD
CONSTRAINT
ng3_res_cto_fk
FOREIGN
KEY
(
cityobject_id
)
REFERENCES
ng3_cityobject
(
id
)
ON
DELETE
SET
NULL
;
-- --------------------------------------------------------------------
-- ng3_
schedule
-- ng3_
device_operation
-- --------------------------------------------------------------------
ALTER
TABLE
ng3_schedule
ADD
CONSTRAINT
ng3_sched_fk
FOREIGN
KEY
(
id
)
REFERENCES
cityobject
(
id
);
ALTER
TABLE
ng3_schedule
ADD
CONSTRAINT
ng3_sched_oc_fk
FOREIGN
KEY
(
objectclass_id
)
REFERENCES
objectclass
(
id
);
ALTER
TABLE
ng3_schedule
ADD
CONSTRAINT
ng3_sched_ts_fk
FOREIGN
KEY
(
time_series_id
)
REFERENCES
ng3_time_series
(
id
)
ON
DELETE
SET
NULL
;
ALTER
TABLE
ng3_schedule
ADD
CONSTRAINT
ng3_sched_lib_fk
FOREIGN
KEY
(
library_id
)
REFERENCES
ng3_library
(
id
)
ON
DELETE
SET
NULL
;
ALTER
TABLE
ng3_device_operation
ADD
CONSTRAINT
ng3_dev_opr_fk
FOREIGN
KEY
(
id
)
REFERENCES
cityobject
(
id
);
ALTER
TABLE
ng3_device_operation
ADD
CONSTRAINT
ng3_dev_opr_ng3_sched_fk
FOREIGN
KEY
(
schedule_id
)
REFERENCES
ng3_schedule
(
id
)
ON
DELETE
SET
NULL
;
ALTER
TABLE
ng3_device_operation
ADD
CONSTRAINT
ng3_dev_opr_ng3_dev_fk
FOREIGN
KEY
(
device_id
)
REFERENCES
ng3_device
(
id
)
ON
DELETE
SET
NULL
;
-- --------------------------------------------------------------------
-- ng3_schedule_component
-- --------------------------------------------------------------------
ALTER
TABLE
ng3_schedule_component
ADD
CONSTRAINT
ng3_sched_comp_fk
FOREIGN
KEY
(
id
)
REFERENCES
cityobject
(
id
);
ALTER
TABLE
ng3_schedule_component
ADD
CONSTRAINT
ng3_sched_comp_sched_fk1
FOREIGN
KEY
(
parent_schedule_id
)
REFERENCES
ng3_schedule
(
id
);
ALTER
TABLE
ng3_schedule_component
ADD
CONSTRAINT
ng3_sched_comp_sched_fk2
FOREIGN
KEY
(
schedule_id
)
REFERENCES
ng3_schedule
(
id
)
ON
DELETE
SET
NULL
;
-- --------------------------------------------------------------------
-- ng3_solar_collector
...
...
@@ -819,22 +868,15 @@ ALTER TABLE ng3_solar_collector ADD CONSTRAINT ng3_sol_coll_lod3_fk FOREIGN KEY
ALTER
TABLE
ng3_storage_device
ADD
CONSTRAINT
ng3_sto_dev_fk
FOREIGN
KEY
(
id
)
REFERENCES
ng3_device
(
id
);
ALTER
TABLE
ng3_storage_device
ADD
CONSTRAINT
ng3_sto_dev_oc_fk
FOREIGN
KEY
(
objectclass_id
)
REFERENCES
objectclass
(
id
);
-- --------------------------------------------------------------------
-- ng3_suitability
-- --------------------------------------------------------------------
ALTER
TABLE
ng3_suitability
ADD
CONSTRAINT
ng3_suit_cto_fk
FOREIGN
KEY
(
cityobject_id
)
REFERENCES
ng3_cityobject
(
id
);
ALTER
TABLE
ng3_suitability
ADD
CONSTRAINT
ng3_suit_sched_fk
FOREIGN
KEY
(
schedule_id
)
REFERENCES
ng3_schedule
(
id
)
ON
DELETE
SET
NULL
;
-- --------------------------------------------------------------------
-- ng3_
them_surf_to_thermal_z
on
e
-- ng3_
layered_constructi
on
-- --------------------------------------------------------------------
ALTER
TABLE
ng3_them_surf_to_thermal_zone
ADD
CONSTRAINT
ng3_thm_surf_to_tz_fk2
FOREIGN
KEY
(
thermal_zone_id
)
REFERENCES
ng3_building_partition
(
id
);
ALTER
TABLE
ng3_them_surf_to_thermal_zone
ADD
CONSTRAINT
ng3_thm_surf_to_tz_fk1
FOREIGN
KEY
(
thematic_surface_id
)
REFERENCES
thematic_surface
(
id
)
ON
DELETE
CASCADE
;
ALTER
TABLE
ng3_layered_construction
ADD
CONSTRAINT
ng3_lcns_fk
FOREIGN
KEY
(
id
)
REFERENCES
cityobject
(
id
);
ALTER
TABLE
ng3_layered_construction
ADD
CONSTRAINT
ng3_lcns_oc_fk
FOREIGN
KEY
(
objectclass_id
)
REFERENCES
objectclass
(
id
);
ALTER
TABLE
ng3_layered_construction
ADD
CONSTRAINT
ng3_lcns_ng3_lcns_fk
FOREIGN
KEY
(
layered_constr_id
)
REFERENCES
ng3_layered_construction
(
id
)
ON
DELETE
SET
NULL
;
ALTER
TABLE
ng3_layered_construction
ADD
CONSTRAINT
ng3_lcns_ng3_lib_fk
FOREIGN
KEY
(
library_id
)
REFERENCES
ng3_library
(
id
);
-- --------------------------------------------------------------------
-- ng3_thematic_surface
-- --------------------------------------------------------------------
ALTER
TABLE
ng3_thematic_surface
ADD
CONSTRAINT
ng3_them_surf_fk
FOREIGN
KEY
(
id
)
REFERENCES
thematic_surface
(
id
);
-- --------------------------------------------------------------------
-- ng3_time_series
...
...
@@ -842,207 +884,123 @@ ALTER TABLE ng3_thematic_surface ADD CONSTRAINT ng3_them_surf_fk FOREIGN KEY (id
ALTER
TABLE
ng3_time_series
ADD
CONSTRAINT
ng3_ts_fk
FOREIGN
KEY
(
id
)
REFERENCES
cityobject
(
id
);
ALTER
TABLE
ng3_time_series
ADD
CONSTRAINT
ng3_ts_oc_fk
FOREIGN
KEY
(
objectclass_id
)
REFERENCES
objectclass
(
id
);
-- --------------------------------------------------------------------
-- ng3_urban_function_area
-- --------------------------------------------------------------------
ALTER
TABLE
ng3_urban_function_area
ADD
CONSTRAINT
ng3_ufa_fk
FOREIGN
KEY
(
id
)
REFERENCES
cityobjectgroup
(
id
);
-- --------------------------------------------------------------------
-- ng3_utl_ntw_connection
-- --------------------------------------------------------------------
ALTER
TABLE
ng3_utl_ntw_connection
ADD
CONSTRAINT
ng3_utl_ntw_con_fk
FOREIGN
KEY
(
id
)
REFERENCES
cityobject
(
id
);
ALTER
TABLE
ng3_utl_ntw_connection
ADD
CONSTRAINT
ng3_utl_ntw_con_cto_fk
FOREIGN
KEY
(
cityobject_id
)
REFERENCES
ng3_cityobject
(
id
)
ON
DELETE
SET
NULL
;
-- --------------------------------------------------------------------
-- ng3_weather_data
-- --------------------------------------------------------------------
ALTER
TABLE
ng3_weather_data
ADD
CONSTRAINT
ng3_wth_data_fk
FOREIGN
KEY
(
id
)
REFERENCES
cityobject
(
id
);
ALTER
TABLE
ng3_weather_data
ADD
CONSTRAINT
ng3_wth_data_ts_fk
FOREIGN
KEY
(
time_series_id
)
REFERENCES
ng3_time_series
(
id
)
ON
DELETE
SET
NULL
;
ALTER
TABLE
ng3_weather_data
ADD
CONSTRAINT
ng3_wth_data_ng3_cto_fk
FOREIGN
KEY
(
cityobject_id
)
REFERENCES
ng3_cityobject
(
id
)
ON
DELETE
SET
NULL
;
-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-- *********************************** Create Indexes *************************************
-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-- --------------------------------------------------------------------
-- ng3_
address_to_building_unit
-- ng3_
schedule
-- --------------------------------------------------------------------
CREATE
INDEX
ng3_address_to_bdgu_fk1x
ON
ng3_address_to_building_unit
USING
btree
(
address_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_address_to_bdgu_fk2x
ON
ng3_address_to_building_unit
USING
btree
(
building_unit_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
ALTER
TABLE
ng3_schedule
ADD
CONSTRAINT
ng3_sched_fk
FOREIGN
KEY
(
id
)
REFERENCES
cityobject
(
id
);
ALTER
TABLE
ng3_schedule
ADD
CONSTRAINT
ng3_sched_oc_fk
FOREIGN
KEY
(
objectclass_id
)
REFERENCES
objectclass
(
id
);
ALTER
TABLE
ng3_schedule
ADD
CONSTRAINT
ng3_sched_ng3_ts_fk
FOREIGN
KEY
(
time_series_id
)
REFERENCES
ng3_time_series
(
id
)
ON
DELETE
SET
NULL
;
ALTER
TABLE
ng3_schedule
ADD
CONSTRAINT
ng3_sched_ng3_lib_fk
FOREIGN
KEY
(
library_id
)
REFERENCES
ng3_library
(
id
);
-- --------------------------------------------------------------------
-- ng3_building
-- --------------------------------------------------------------------
-- no indices needed
-- --------------------------------------------------------------------
-- ng3_
building_partition
-- ng3_
schedule_component
-- --------------------------------------------------------------------
CREATE
INDEX
ng3_bdgp_oc_fkx
ON
ng3_building_partition
USING
btree
(
objectclass_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_bdgp_sched_fk1x
ON
ng3_building_partition
USING
btree
(
cooling_schedule_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_bdgp_sched_fk2x
ON
ng3_building_partition
USING
btree
(
heating_schedule_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_bdgp_sched_fk3x
ON
ng3_building_partition
USING
btree
(
ventilation_schedule_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_bdgp_uz_fkx
ON
ng3_building_partition
USING
btree
(
usage_zone_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_bdgp_tz_fkx
ON
ng3_building_partition
USING
btree
(
thermal_zone_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_bdgp_bdg_fkx
ON
ng3_building_partition
USING
btree
(
building_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_bdgp_solid1_fkx
ON
ng3_building_partition
USING
btree
(
lod1_solid_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_bdgp_solid2_fkx
ON
ng3_building_partition
USING
btree
(
lod2_solid_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_bdgp_solid3_fkx
ON
ng3_building_partition
USING
btree
(
lod3_solid_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
ALTER
TABLE
ng3_schedule_component
ADD
CONSTRAINT
ng3_sched_comp_fk
FOREIGN
KEY
(
id
)
REFERENCES
cityobject
(
id
);
ALTER
TABLE
ng3_schedule_component
ADD
CONSTRAINT
ng3_sched_comp_ng3_sched_fk1
FOREIGN
KEY
(
parent_schedule_id
)
REFERENCES
ng3_schedule
(
id
);
ALTER
TABLE
ng3_schedule_component
ADD
CONSTRAINT
ng3_sched_comp_ng3_sched_fk2
FOREIGN
KEY
(
schedule_id
)
REFERENCES
ng3_schedule
(
id
)
ON
DELETE
SET
NULL
;
-- --------------------------------------------------------------------
-- ng3_cityobject
-- --------------------------------------------------------------------
CREATE
INDEX
ng3_cto_ref_point_spx
ON
ng3_cityobject
USING
gist
(
ref_point
);
CREATE
INDEX
ng3_cto_lcns_fkx
ON
ng3_cityobject
USING
btree
(
layered_construction_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
-- --------------------------------------------------------------------
-- ng3_
ctyobj_relation
-- ng3_
sensor_data
-- --------------------------------------------------------------------
CREATE
INDEX
ng3_cto_rel_fk1x
ON
ng3_ctyobj_relation
USING
btree
(
ng3_cityobject_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_cto_rel_fk2x
ON
ng3_ctyobj_relation
USING
btree
(
cityobject_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
ALTER
TABLE
ng3_sensor_data
ADD
CONSTRAINT
ng3_sns_data_fk
FOREIGN
KEY
(
id
)
REFERENCES
cityobject
(
id
);
ALTER
TABLE
ng3_sensor_data
ADD
CONSTRAINT
ng3_sns_data_oc_fk
FOREIGN
KEY
(
objectclass_id
)
REFERENCES
objectclass
(
id
);
ALTER
TABLE
ng3_sensor_data
ADD
CONSTRAINT
ng3_sns_data_ng3_ts_fk
FOREIGN
KEY
(
time_series_id
)
REFERENCES
ng3_time_series
(
id
)
ON
DELETE
SET
NULL
;
ALTER
TABLE
ng3_sensor_data
ADD
CONSTRAINT
ng3_sns_data_ng3_cto_fk
FOREIGN
KEY
(
cityobject_id
)
REFERENCES
ng3_cityobject
(
id
);
-- --------------------------------------------------------------------
-- ng3_device
-- --------------------------------------------------------------------
CREATE
INDEX
ng3_dev_oc_fkx
ON
ng3_device
USING
btree
(
objectclass_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_dev_opt_fkx
ON
ng3_device
USING
btree
(
transmittance_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_dev_cto_fkx
ON
ng3_device
USING
btree
(
cityobject_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
-- --------------------------------------------------------------------
-- ng3_
device_operation
-- ng3_
resource
-- --------------------------------------------------------------------
CREATE
INDEX
ng3_dev_opr_sched_fkx
ON
ng3_device_operation
USING
btree
(
schedule_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_dev_opr_dev_fkx
ON
ng3_device_operation
USING
btree
(
device_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
ALTER
TABLE
ng3_resource
ADD
CONSTRAINT
ng3_res_fk
FOREIGN
KEY
(
id
)
REFERENCES
ng3_cityobject
(
id
);
ALTER
TABLE
ng3_resource
ADD
CONSTRAINT
ng3_res_oc_fk
FOREIGN
KEY
(
objectclass_id
)
REFERENCES
objectclass
(
id
);
ALTER
TABLE
ng3_resource
ADD
CONSTRAINT
ng3_res_ng3_ts_fk1
FOREIGN
KEY
(
amount_time_series_id
)
REFERENCES
ng3_time_series
(
id
)
ON
DELETE
SET
NULL
;
ALTER
TABLE
ng3_resource
ADD
CONSTRAINT
ng3_res_ng3_ts_fk2
FOREIGN
KEY
(
costs_time_series_id
)
REFERENCES
ng3_time_series
(
id
)
ON
DELETE
SET
NULL
;
ALTER
TABLE
ng3_resource
ADD
CONSTRAINT
ng3_res_ng3_ts_fk3
FOREIGN
KEY
(
yields_time_series_id
)
REFERENCES
ng3_time_series
(
id
)
ON
DELETE
SET
NULL
;
ALTER
TABLE
ng3_resource
ADD
CONSTRAINT
ng3_res_ng3_cto_fk
FOREIGN
KEY
(
cityobject_id
)
REFERENCES
ng3_cityobject
(
id
);
-- --------------------------------------------------------------------
-- ng3_energy_perf_cert
-- --------------------------------------------------------------------
CREATE
INDEX
ng3_epc_bdg_fkx
ON
ng3_energy_perf_cert
USING
btree
(
building_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_epc_bdg_part_fkx
ON
ng3_energy_perf_cert
USING
btree
(
building_partition_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
-- --------------------------------------------------------------------
-- ng3_
layer
-- ng3_
utl_ntw_connection
-- --------------------------------------------------------------------
CREATE
INDEX
ng3_lyr_mat_fkx
ON
ng3_layer
USING
btree
(
material_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_lyr_lcns_fkx
ON
ng3_layer
USING
btree
(
layered_construction_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
ALTER
TABLE
ng3_utl_ntw_connection
ADD
CONSTRAINT
ng3_utl_ntw_con_fk
FOREIGN
KEY
(
id
)
REFERENCES
ng3_cityobject
(
id
);
ALTER
TABLE
ng3_utl_ntw_connection
ADD
CONSTRAINT
ng3_utl_ntw_con_ng3_cto_fk
FOREIGN
KEY
(
cityobject_id
)
REFERENCES
ng3_cityobject
(
id
);
-- --------------------------------------------------------------------
-- ng3_layered_constr
-- --------------------------------------------------------------------
CREATE
INDEX
ng3_lcns_oc_fkx
ON
ng3_layered_construction
USING
btree
(
objectclass_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_lcns_lcns_fkx
ON
ng3_layered_construction
USING
btree
(
layered_construction_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_lcns_lib_fkx
ON
ng3_layered_construction
USING
btree
(
library_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
-- --------------------------------------------------------------------
-- ng3_library
-- ng3_library
-- --------------------------------------------------------------------
CREATE
INDEX
ng3_lib_oc_fkx
ON
ng3_library
USING
btree
(
objectclass_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
ALTER
TABLE
ng3_library
ADD
CONSTRAINT
ng3_lib_fk
FOREIGN
KEY
(
id
)
REFERENCES
cityobject
(
id
);
ALTER
TABLE
ng3_library
ADD
CONSTRAINT
ng3_lib_oc_fk
FOREIGN
KEY
(
objectclass_id
)
REFERENCES
objectclass
(
id
);
-- --------------------------------------------------------------------
-- ng3_material
-- --------------------------------------------------------------------
CREATE
INDEX
ng3_mat_oc_fkx
ON
ng3_material
USING
btree
(
objectclass_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_mat_lib_fkx
ON
ng3_material
USING
btree
(
library_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
-- --------------------------------------------------------------------
-- ng3_occupants
-- --------------------------------------------------------------------
CREATE
INDEX
ng3_occ_sched_fkx
ON
ng3_occupants
USING
btree
(
schedule_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_occ_ng3_bdgp_fkx
ON
ng3_occupants
USING
btree
(
building_partition_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
-- ng3_address_to_building_unit
-- --------------------------------------------------------------------
-- ng3_opening
-- --------------------------------------------------------------------
-- no indices needed
ALTER
TABLE
ng3_address_to_building_unit
ADD
CONSTRAINT
ng3_addr_to_bdgu_fk1
FOREIGN
KEY
(
address_id
)
REFERENCES
address
(
id
)
ON
DELETE
CASCADE
;
ALTER
TABLE
ng3_address_to_building_unit
ADD
CONSTRAINT
ng3_addr_to_bdgu_fk2
FOREIGN
KEY
(
space_id
)
REFERENCES
ng3_space
(
id
)
ON
DELETE
CASCADE
;
-- --------------------------------------------------------------------
-- ng3_optical_property
-- --------------------------------------------------------------------
CREATE
INDEX
ng3_optpty_oc_fkx
ON
ng3_optical_property
USING
btree
(
objectclass_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_optpty_lcns_fkx
ON
ng3_optical_property
USING
btree
(
layered_construction_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
-- --------------------------------------------------------------------
-- ng3_
qualified_attribute
-- ng3_
urban_function_area
-- --------------------------------------------------------------------
CREATE
INDEX
ng3_qual_attr_oc_fkx
ON
ng3_qualified_attribute
USING
btree
(
objectclass_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_qual_attr_bdg_fkx
ON
ng3_qualified_attribute
USING
btree
(
building_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_qual_attr_bdg_part_fkx
ON
ng3_qualified_attribute
USING
btree
(
building_partition_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_qual_attr_type_idx
ON
ng3_qualified_attribute
USING
btree
(
type
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
ALTER
TABLE
ng3_urban_function_area
ADD
CONSTRAINT
ng3_ufa_fk
FOREIGN
KEY
(
id
)
REFERENCES
cityobjectgroup
(
id
);
-- --------------------------------------------------------------------
-- ng3_refurbishment_measure
-- --------------------------------------------------------------------
CREATE
INDEX
ng3_ref_meas_bdg_fkx
ON
ng3_refurbishment_measure
USING
btree
(
building_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_ref_meas_bdg_part_fkx
ON
ng3_refurbishment_measure
USING
btree
(
building_partition_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
-- --------------------------------------------------------------------
-- ng3_
resource
-- ng3_
energy_perf_cert
-- --------------------------------------------------------------------
CREATE
INDEX
ng3_res_oc_fkx
ON
ng3_resource
USING
btree
(
objectclass_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_res_ts_fkx
ON
ng3_resource
USING
btree
(
time_series_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_res_cto_fkx
ON
ng3_resource
USING
btree
(
cityobject_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
ALTER
TABLE
ng3_energy_perf_cert
ADD
CONSTRAINT
ng3_epc_fk
FOREIGN
KEY
(
id
)
REFERENCES
ng3_cityobject
(
id
);
ALTER
TABLE
ng3_energy_perf_cert
ADD
CONSTRAINT
ng3_epc_ng3_bdg_fk
FOREIGN
KEY
(
building_id
)
REFERENCES
ng3_building
(
id
);
ALTER
TABLE
ng3_energy_perf_cert
ADD
CONSTRAINT
ng3_epc_ng3_spc_fk
FOREIGN
KEY
(
space_id
)
REFERENCES
ng3_space
(
id
);
-- --------------------------------------------------------------------
-- ng3_schedule
-- --------------------------------------------------------------------
CREATE
INDEX
ng3_sched_oc_fkx
ON
ng3_schedule
USING
btree
(
objectclass_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_sched_ts_fkx
ON
ng3_schedule
USING
btree
(
time_series_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_sched_lib_fkx
ON
ng3_schedule
USING
btree
(
library_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
-- --------------------------------------------------------------------
-- ng3_
schedule_component
-- ng3_
refurbishment_measure
-- --------------------------------------------------------------------
CREATE
INDEX
ng3_sched_comp_sched_fk1x
ON
ng3_schedule_component
USING
btree
(
parent_schedule_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_sched_comp_sched_fk2x
ON
ng3_schedule_component
USING
btree
(
schedule_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
ALTER
TABLE
ng3_refurbishment_measure
ADD
CONSTRAINT
ng3_refurb_fk
FOREIGN
KEY
(
id
)
REFERENCES
ng3_cityobject
(
id
);
ALTER
TABLE
ng3_refurbishment_measure
ADD
CONSTRAINT
ng3_refurb_ng3_bdg_fk
FOREIGN
KEY
(
building_id
)
REFERENCES
ng3_building
(
id
);
ALTER
TABLE
ng3_refurbishment_measure
ADD
CONSTRAINT
ng3_refurb_ng3_spc_fk
FOREIGN
KEY
(
space_id
)
REFERENCES
ng3_space
(
id
);
-- --------------------------------------------------------------------
-- ng3_solar_collector
-- --------------------------------------------------------------------
CREATE
INDEX
ng3_sol_col_oc_fkx
ON
ng3_solar_collector
USING
btree
(
objectclass_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_sol_col_lod2_fkx
ON
ng3_solar_collector
USING
btree
(
lod2_multi_surface_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_sol_col_lod3_fkx
ON
ng3_solar_collector
USING
btree
(
lod2_multi_surface_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
-- --------------------------------------------------------------------
-- ng3_
storage_device
-- ng3_
occupants
-- --------------------------------------------------------------------
CREATE
INDEX
ng3_sto_dev_oc_fkx
ON
ng3_storage_device
USING
btree
(
objectclass_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
ALTER
TABLE
ng3_occupants
ADD
CONSTRAINT
ng3_occ_fk
FOREIGN
KEY
(
id
)
REFERENCES
ng3_cityobject
(
id
);
ALTER
TABLE
ng3_occupants
ADD
CONSTRAINT
ng3_occ_ng3_sched_fk
FOREIGN
KEY
(
schedule_id
)
REFERENCES
ng3_schedule
(
id
)
ON
DELETE
SET
NULL
;
ALTER
TABLE
ng3_occupants
ADD
CONSTRAINT
ng3_occ_ng3_spc_fk
FOREIGN
KEY
(
space_id
)
REFERENCES
ng3_space
(
id
);
ALTER
TABLE
ng3_occupants
ADD
CONSTRAINT
ng3_occ_ng3_bdg_fk
FOREIGN
KEY
(
building_id
)
REFERENCES
ng3_building
(
id
);
-- --------------------------------------------------------------------
-- ng3_suitability
-- --------------------------------------------------------------------
CREATE
INDEX
ng3_suit_cto_fkx
ON
ng3_suitability
USING
btree
(
cityobject_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_suit_sched_fkx
ON
ng3_suitability
USING
btree
(
schedule_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_suit_reas_fkx
ON
ng3_suitability
USING
btree
(
reason
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
-- --------------------------------------------------------------------
-- ng3_
them_surf_to_thermal_zon
e
-- ng3_
spac
e
-- --------------------------------------------------------------------
CREATE
INDEX
ng3_thm_surf_to_tz_fk1x
ON
ng3_them_surf_to_thermal_zone
USING
btree
(
thematic_surface_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_thm_surf_to_tz_fk2x
ON
ng3_them_surf_to_thermal_zone
USING
btree
(
thermal_zone_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
ALTER
TABLE
ng3_space
ADD
CONSTRAINT
ng3_spc_fk
FOREIGN
KEY
(
id
)
REFERENCES
cityobject
(
id
);
ALTER
TABLE
ng3_space
ADD
CONSTRAINT
ng3_spc_oc_fk
FOREIGN
KEY
(
objectclass_id
)
REFERENCES
objectclass
(
id
);
ALTER
TABLE
ng3_space
ADD
CONSTRAINT
ng3_spc_ng3_bdg_fk
FOREIGN
KEY
(
building_id
)
REFERENCES
ng3_building
(
id
);
ALTER
TABLE
ng3_space
ADD
CONSTRAINT
ng3_spc_ng3_zn_fk
FOREIGN
KEY
(
space_id
)
REFERENCES
ng3_space
(
id
);
ALTER
TABLE
ng3_space
ADD
CONSTRAINT
ng3_spc_ng3_bdgu_fk
FOREIGN
KEY
(
building_unit_id
)
REFERENCES
ng3_space
(
id
)
ON
DELETE
SET
NULL
;
ALTER
TABLE
ng3_space
ADD
CONSTRAINT
ng3_spc_ng3_sched_fk1
FOREIGN
KEY
(
cool_schedule_id
)
REFERENCES
ng3_schedule
(
id
)
ON
DELETE
SET
NULL
;
ALTER
TABLE
ng3_space
ADD
CONSTRAINT
ng3_spc_ng3_sched_fk2
FOREIGN
KEY
(
heat_schedule_id
)
REFERENCES
ng3_schedule
(
id
)
ON
DELETE
SET
NULL
;
ALTER
TABLE
ng3_space
ADD
CONSTRAINT
ng3_spc_ng3_sched_fk3
FOREIGN
KEY
(
mech_vent_schedule_id
)
REFERENCES
ng3_schedule
(
id
)
ON
DELETE
SET
NULL
;
ALTER
TABLE
ng3_space
ADD
CONSTRAINT
ng3_spc_lod1_fk
FOREIGN
KEY
(
lod1_solid_id
)
REFERENCES
surface_geometry
(
id
);
ALTER
TABLE
ng3_space
ADD
CONSTRAINT
ng3_spc_lod2_fk
FOREIGN
KEY
(
lod2_solid_id
)
REFERENCES
surface_geometry
(
id
);
ALTER
TABLE
ng3_space
ADD
CONSTRAINT
ng3_spc_lod3_fk
FOREIGN
KEY
(
lod3_solid_id
)
REFERENCES
surface_geometry
(
id
);
-- --------------------------------------------------------------------
-- ng3_thematic_surface
-- --------------------------------------------------------------------
-- no indices needed
-- --------------------------------------------------------------------
-- ng3_
time_series
-- ng3_
zone_thematic_surface
-- --------------------------------------------------------------------
CREATE
INDEX
ng3_ts_oc_fkx
ON
ng3_time_series
USING
btree
(
objectclass_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
ALTER
TABLE
ng3_zone_thematic_surface
ADD
CONSTRAINT
ng3_zn_thm_surf_fk
FOREIGN
KEY
(
id
)
REFERENCES
cityobject
(
id
);
ALTER
TABLE
ng3_zone_thematic_surface
ADD
CONSTRAINT
ng3_zn_thm_surf_oc_fk
FOREIGN
KEY
(
objectclass_id
)
REFERENCES
objectclass
(
id
);
ALTER
TABLE
ng3_zone_thematic_surface
ADD
CONSTRAINT
ng3_zn_thm_surf_n3g_zn_fk
FOREIGN
KEY
(
space_id
)
REFERENCES
ng3_space
(
id
);
-- --------------------------------------------------------------------
-- ng3_urban_function_area
-- --------------------------------------------------------------------
-- no indices needed
-- --------------------------------------------------------------------
-- ng3_utl_ntw_connection
-- --------------------------------------------------------------------
CREATE
INDEX
ng3_utl_ntw_conn_cto_fkx
ON
ng3_utl_ntw_connection
USING
btree
(
cityobject_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
-- ng3_zone_opening
-- --------------------------------------------------------------------
-- ng3_weather_data
-- --------------------------------------------------------------------
CREATE
INDEX
ng3_wht_data_ts_fkx
ON
ng3_weather_data
USING
btree
(
time_series_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
ng3_wht_data_cto_fkx
ON
ng3_weather_data
USING
btree
(
cityobject_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
ALTER
TABLE
ng3_zone_opening
ADD
CONSTRAINT
ng3_zn_opn_fk
FOREIGN
KEY
(
id
)
REFERENCES
cityobject
(
id
);
ALTER
TABLE
ng3_zone_opening
ADD
CONSTRAINT
ng3_zn_opn_oc_fk
FOREIGN
KEY
(
objectclass_id
)
REFERENCES
objectclass
(
id
);
ALTER
TABLE
ng3_zone_opening
ADD
CONSTRAINT
ng3_zn_opn_ng3_zn_thm_surf_fk
FOREIGN
KEY
(
zone_them_surf_id
)
REFERENCES
ng3_zone_thematic_surface
(
id
);
resources/database/3dcitydb/postgreSQL/DROP_ADE_DB.sql
View file @
2ef0d8b9
-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
--
-- CityGML Energy ADE 3.0 (beta
7
)
-- CityGML Energy ADE 3.0 (beta
8
)
--
-- Last update: 2025-1
0
-1
4
-- Last update: 2025-1
2
-1
5
--
-- This DDL script uninstalls the 3DCityDB schema for the Energy ADE. It must be run
-- from within the ADE Manager plugin of the 3DCityDB Importer/Exporter.
...
...
@@ -25,94 +25,94 @@
-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-- *********************************** Drop foreign keys **********************************
-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
ALTER
TABLE
ng3_address_to_building_unit
DROP
CONSTRAINT
ng3_addr_to_bdgu_fk1
;
ALTER
TABLE
ng3_address_to_building_unit
DROP
CONSTRAINT
ng3_addr_to_bdgu_fk2
;
ALTER
TABLE
ng3_building
DROP
CONSTRAINT
ng3_bdg_fk
;
ALTER
TABLE
ng3_building_partition
DROP
CONSTRAINT
ng3_bdgp_bdg_fk
;
ALTER
TABLE
ng3_building_partition
DROP
CONSTRAINT
ng3_bdgp_fk
;
ALTER
TABLE
ng3_building_partition
DROP
CONSTRAINT
ng3_bdgp_lod1_fk
;
ALTER
TABLE
ng3_building_partition
DROP
CONSTRAINT
ng3_bdgp_lod2_fk
;
ALTER
TABLE
ng3_building_partition
DROP
CONSTRAINT
ng3_bdgp_lod3_fk
;
ALTER
TABLE
ng3_building_partition
DROP
CONSTRAINT
ng3_bdgp_oc_fk
;
ALTER
TABLE
ng3_building_partition
DROP
CONSTRAINT
ng3_bdgp_sched_fk1
;
ALTER
TABLE
ng3_building_partition
DROP
CONSTRAINT
ng3_bdgp_sched_fk2
;
ALTER
TABLE
ng3_building_partition
DROP
CONSTRAINT
ng3_bdgp_sched_fk3
;
ALTER
TABLE
ng3_building_partition
DROP
CONSTRAINT
ng3_bdgp_tz_fk
;
ALTER
TABLE
ng3_building_partition
DROP
CONSTRAINT
ng3_bdgp_uz_fk
;
ALTER
TABLE
ng3_cityobject
DROP
CONSTRAINT
ng3_cto_fk
;
ALTER
TABLE
ng3_cityobject
DROP
CONSTRAINT
ng3_cto_lcns_fk
;
ALTER
TABLE
ng3_ctyobj_relation
DROP
CONSTRAINT
ng3_cto_rel_fk1
;
ALTER
TABLE
ng3_ctyobj_relation
DROP
CONSTRAINT
ng3_cto_rel_fk2
;
ALTER
TABLE
ng3_device
DROP
CONSTRAINT
ng3_dev_fk
;
ALTER
TABLE
ng3_device
DROP
CONSTRAINT
ng3_dev_ng3_cto_fk
;
ALTER
TABLE
ng3_device
DROP
CONSTRAINT
ng3_dev_oc_fk
;
ALTER
TABLE
ng3_device
DROP
CONSTRAINT
ng3_dev_opt_fk
;
ALTER
TABLE
ng3_device_operation
DROP
CONSTRAINT
ng3_dev_opr_fk
;
ALTER
TABLE
ng3_device_operation
DROP
CONSTRAINT
ng3_dev_opr_dev_fk
;
ALTER
TABLE
ng3_device_operation
DROP
CONSTRAINT
ng3_dev_opr_sched_fk
;
ALTER
TABLE
ng3_energy_perf_cert
DROP
CONSTRAINT
ng3_epc_fk
;
ALTER
TABLE
ng3_energy_perf_cert
DROP
CONSTRAINT
ng3_epc_bdg_fk
;
ALTER
TABLE
ng3_energy_perf_cert
DROP
CONSTRAINT
ng3_epc_bdg_part_fk
;
ALTER
TABLE
ng3_layer
DROP
CONSTRAINT
ng3_lyr_fk
;
ALTER
TABLE
ng3_layer
DROP
CONSTRAINT
ng3_lyr_lcns_fk
;
ALTER
TABLE
ng3_layer
DROP
CONSTRAINT
ng3_lyr_mat_fk
;
ALTER
TABLE
ng3_layered_construction
DROP
CONSTRAINT
ng3_lcns_fk
;
ALTER
TABLE
ng3_layered_construction
DROP
CONSTRAINT
ng3_lcns_lcns_fk
;
ALTER
TABLE
ng3_layered_construction
DROP
CONSTRAINT
ng3_lcns_oc_fk
;
ALTER
TABLE
ng3_layered_construction
DROP
CONSTRAINT
ng3_lcns_lib_fk
;
ALTER
TABLE
ng3_library
DROP
CONSTRAINT
ng3_lib_fk
;
ALTER
TABLE
ng3_library
DROP
CONSTRAINT
ng3_lib_oc_fk
;
ALTER
TABLE
ng3_material
DROP
CONSTRAINT
ng3_mat_fk
;
ALTER
TABLE
ng3_material
DROP
CONSTRAINT
ng3_mat_lib_fk
;
ALTER
TABLE
ng3_occupants
DROP
CONSTRAINT
ng3_occ_fk
;
ALTER
TABLE
ng3_occupants
DROP
CONSTRAINT
ng3_occ_ng3_bdgp_fk
;
ALTER
TABLE
ng3_occupants
DROP
CONSTRAINT
ng3_occ_sched_fk
;
ALTER
TABLE
ng3_opening
DROP
CONSTRAINT
ng3_opn_fk
;
ALTER
TABLE
ng3_optical_property
DROP
CONSTRAINT
ng3_optpty_lcns_fk
;
ALTER
TABLE
ng3_optical_property
DROP
CONSTRAINT
ng3_optpty_oc_fk
;
ALTER
TABLE
ng3_qualified_attribute
DROP
CONSTRAINT
ng3_qatt_oc_fk
;
ALTER
TABLE
ng3_qualified_attribute
DROP
CONSTRAINT
ng3_qatt_bdg_fk
;
ALTER
TABLE
ng3_qualified_attribute
DROP
CONSTRAINT
ng3_qatt_bdg_part_fk
;
ALTER
TABLE
ng3_refurbishment_measure
DROP
CONSTRAINT
ng3_refurb_fk
;
ALTER
TABLE
ng3_refurbishment_measure
DROP
CONSTRAINT
ng3_refurb_bdg_fk
;
ALTER
TABLE
ng3_refurbishment_measure
DROP
CONSTRAINT
ng3_refurb_bdg_part_fk
;
ALTER
TABLE
ng3_resource
DROP
CONSTRAINT
ng3_res_fk
;
ALTER
TABLE
ng3_resource
DROP
CONSTRAINT
ng3_res_oc_fk
;
ALTER
TABLE
ng3_resource
DROP
CONSTRAINT
ng3_res_ts_fk
;
ALTER
TABLE
ng3_resource
DROP
CONSTRAINT
ng3_res_cto_fk
;
ALTER
TABLE
ng3_schedule
DROP
CONSTRAINT
ng3_sched_fk
;
ALTER
TABLE
ng3_schedule
DROP
CONSTRAINT
ng3_sched_oc_fk
;
ALTER
TABLE
ng3_schedule
DROP
CONSTRAINT
ng3_sched_ts_fk
;
ALTER
TABLE
ng3_schedule
DROP
CONSTRAINT
ng3_sched_lib_fk
;
ALTER
TABLE
ng3_schedule_component
DROP
CONSTRAINT
ng3_sched_comp_fk
;
ALTER
TABLE
ng3_schedule_component
DROP
CONSTRAINT
ng3_sched_comp_sched_fk1
;
ALTER
TABLE
ng3_schedule_component
DROP
CONSTRAINT
ng3_sched_comp_sched_fk2
;
ALTER
TABLE
ng3_solar_collector
DROP
CONSTRAINT
ng3_sol_coll_fk
;
ALTER
TABLE
ng3_solar_collector
DROP
CONSTRAINT
ng3_sol_coll_oc_fk
;
ALTER
TABLE
ng3_solar_collector
DROP
CONSTRAINT
ng3_sol_coll_lod2_fk
;
ALTER
TABLE
ng3_solar_collector
DROP
CONSTRAINT
ng3_sol_coll_lod3_fk
;
ALTER
TABLE
ng3_storage_device
DROP
CONSTRAINT
ng3_sto_dev_fk
;
ALTER
TABLE
ng3_storage_device
DROP
CONSTRAINT
ng3_sto_dev_oc_fk
;
ALTER
TABLE
ng3_suitability
DROP
CONSTRAINT
ng3_suit_cto_fk
;
ALTER
TABLE
ng3_suitability
DROP
CONSTRAINT
ng3_suit_sched_fk
;
ALTER
TABLE
ng3_them_surf_to_thermal_zone
DROP
CONSTRAINT
ng3_thm_surf_to_tz_fk1
;
ALTER
TABLE
ng3_them_surf_to_thermal_zone
DROP
CONSTRAINT
ng3_thm_surf_to_tz_fk2
;
ALTER
TABLE
ng3_thematic_surface
DROP
CONSTRAINT
ng3_them_surf_fk
;
ALTER
TABLE
ng3_time_series
DROP
CONSTRAINT
ng3_ts_fk
;
ALTER
TABLE
ng3_time_series
DROP
CONSTRAINT
ng3_ts_oc_fk
;
ALTER
TABLE
ng3_urban_function_area
DROP
CONSTRAINT
ng3_ufa_fk
;
ALTER
TABLE
ng3_utl_ntw_connection
DROP
CONSTRAINT
ng3_utl_ntw_con_cto_fk
;
ALTER
TABLE
ng3_utl_ntw_connection
DROP
CONSTRAINT
ng3_utl_ntw_con_fk
;
ALTER
TABLE
ng3_weather_data
DROP
CONSTRAINT
ng3_wth_data_fk
;
ALTER
TABLE
ng3_weather_data
DROP
CONSTRAINT
ng3_wth_data_ng3_cto_fk
;
ALTER
TABLE
ng3_weather_data
DROP
CONSTRAINT
ng3_wth_data_ts_fk
;
--
ALTER TABLE ng3_address_to_building_unit DROP CONSTRAINT ng3_addr_to_bdgu_fk1;
--
ALTER TABLE ng3_address_to_building_unit DROP CONSTRAINT ng3_addr_to_bdgu_fk2;
--
ALTER TABLE ng3_building DROP CONSTRAINT ng3_bdg_fk;
--
ALTER TABLE ng3_building_partition DROP CONSTRAINT ng3_bdgp_bdg_fk;
--
ALTER TABLE ng3_building_partition DROP CONSTRAINT ng3_bdgp_fk;
--
ALTER TABLE ng3_building_partition DROP CONSTRAINT ng3_bdgp_lod1_fk;
--
ALTER TABLE ng3_building_partition DROP CONSTRAINT ng3_bdgp_lod2_fk;
--
ALTER TABLE ng3_building_partition DROP CONSTRAINT ng3_bdgp_lod3_fk;
--
ALTER TABLE ng3_building_partition DROP CONSTRAINT ng3_bdgp_oc_fk;
--
ALTER TABLE ng3_building_partition DROP CONSTRAINT ng3_bdgp_sched_fk1;
--
ALTER TABLE ng3_building_partition DROP CONSTRAINT ng3_bdgp_sched_fk2;
--
ALTER TABLE ng3_building_partition DROP CONSTRAINT ng3_bdgp_sched_fk3;
--
ALTER TABLE ng3_building_partition DROP CONSTRAINT ng3_bdgp_tz_fk;
--
ALTER TABLE ng3_building_partition DROP CONSTRAINT ng3_bdgp_uz_fk;
--
ALTER TABLE ng3_cityobject DROP CONSTRAINT ng3_cto_fk;
--
ALTER TABLE ng3_cityobject DROP CONSTRAINT ng3_cto_lcns_fk;
--
ALTER TABLE ng3_ctyobj_relation DROP CONSTRAINT ng3_cto_rel_fk1;
--
ALTER TABLE ng3_ctyobj_relation DROP CONSTRAINT ng3_cto_rel_fk2;
--
ALTER TABLE ng3_device DROP CONSTRAINT ng3_dev_fk;
--
ALTER TABLE ng3_device DROP CONSTRAINT ng3_dev_ng3_cto_fk;
--
ALTER TABLE ng3_device DROP CONSTRAINT ng3_dev_oc_fk;
--
ALTER TABLE ng3_device DROP CONSTRAINT ng3_dev_opt_fk;
--
ALTER TABLE ng3_device_operation DROP CONSTRAINT ng3_dev_opr_fk;
--
ALTER TABLE ng3_device_operation DROP CONSTRAINT ng3_dev_opr_dev_fk;
--
ALTER TABLE ng3_device_operation DROP CONSTRAINT ng3_dev_opr_sched_fk;
--
ALTER TABLE ng3_energy_perf_cert DROP CONSTRAINT ng3_epc_fk;
--
ALTER TABLE ng3_energy_perf_cert DROP CONSTRAINT ng3_epc_bdg_fk;
--
ALTER TABLE ng3_energy_perf_cert DROP CONSTRAINT ng3_epc_bdg_part_fk;
--
ALTER TABLE ng3_layer DROP CONSTRAINT ng3_lyr_fk;
--
ALTER TABLE ng3_layer DROP CONSTRAINT ng3_lyr_lcns_fk;
--
ALTER TABLE ng3_layer DROP CONSTRAINT ng3_lyr_mat_fk;
--
ALTER TABLE ng3_layered_construction DROP CONSTRAINT ng3_lcns_fk;
--
ALTER TABLE ng3_layered_construction DROP CONSTRAINT ng3_lcns_lcns_fk;
--
ALTER TABLE ng3_layered_construction DROP CONSTRAINT ng3_lcns_oc_fk;
--
ALTER TABLE ng3_layered_construction DROP CONSTRAINT ng3_lcns_lib_fk;
--
ALTER TABLE ng3_library DROP CONSTRAINT ng3_lib_fk;
--
ALTER TABLE ng3_library DROP CONSTRAINT ng3_lib_oc_fk;
--
ALTER TABLE ng3_material DROP CONSTRAINT ng3_mat_fk;
--
ALTER TABLE ng3_material DROP CONSTRAINT ng3_mat_lib_fk;
--
ALTER TABLE ng3_occupants DROP CONSTRAINT ng3_occ_fk;
--
ALTER TABLE ng3_occupants DROP CONSTRAINT ng3_occ_ng3_bdgp_fk;
--
ALTER TABLE ng3_occupants DROP CONSTRAINT ng3_occ_sched_fk;
--
ALTER TABLE ng3_opening DROP CONSTRAINT ng3_opn_fk;
--
ALTER TABLE ng3_optical_property DROP CONSTRAINT ng3_optpty_lcns_fk;
--
ALTER TABLE ng3_optical_property DROP CONSTRAINT ng3_optpty_oc_fk;
--
ALTER TABLE ng3_qualified_attribute DROP CONSTRAINT ng3_qatt_oc_fk;
--
ALTER TABLE ng3_qualified_attribute DROP CONSTRAINT ng3_qatt_bdg_fk;
--
ALTER TABLE ng3_qualified_attribute DROP CONSTRAINT ng3_qatt_bdg_part_fk;
--
ALTER TABLE ng3_refurbishment_measure DROP CONSTRAINT ng3_refurb_fk;
--
ALTER TABLE ng3_refurbishment_measure DROP CONSTRAINT ng3_refurb_bdg_fk;
--
ALTER TABLE ng3_refurbishment_measure DROP CONSTRAINT ng3_refurb_bdg_part_fk;
--
ALTER TABLE ng3_resource DROP CONSTRAINT ng3_res_fk;
--
ALTER TABLE ng3_resource DROP CONSTRAINT ng3_res_oc_fk;
--
ALTER TABLE ng3_resource DROP CONSTRAINT ng3_res_ts_fk;
--
ALTER TABLE ng3_resource DROP CONSTRAINT ng3_res_cto_fk;
--
ALTER TABLE ng3_schedule DROP CONSTRAINT ng3_sched_fk;
--
ALTER TABLE ng3_schedule DROP CONSTRAINT ng3_sched_oc_fk;
--
ALTER TABLE ng3_schedule DROP CONSTRAINT ng3_sched_ts_fk;
--
ALTER TABLE ng3_schedule DROP CONSTRAINT ng3_sched_lib_fk;
--
ALTER TABLE ng3_schedule_component DROP CONSTRAINT ng3_sched_comp_fk;
--
ALTER TABLE ng3_schedule_component DROP CONSTRAINT ng3_sched_comp_sched_fk1;
--
ALTER TABLE ng3_schedule_component DROP CONSTRAINT ng3_sched_comp_sched_fk2;
--
ALTER TABLE ng3_solar_collector DROP CONSTRAINT ng3_sol_coll_fk;
--
ALTER TABLE ng3_solar_collector DROP CONSTRAINT ng3_sol_coll_oc_fk;
--
ALTER TABLE ng3_solar_collector DROP CONSTRAINT ng3_sol_coll_lod2_fk;
--
ALTER TABLE ng3_solar_collector DROP CONSTRAINT ng3_sol_coll_lod3_fk;
--
ALTER TABLE ng3_storage_device DROP CONSTRAINT ng3_sto_dev_fk;
--
ALTER TABLE ng3_storage_device DROP CONSTRAINT ng3_sto_dev_oc_fk;
--
ALTER TABLE ng3_suitability DROP CONSTRAINT ng3_suit_cto_fk;
--
ALTER TABLE ng3_suitability DROP CONSTRAINT ng3_suit_sched_fk;
--
ALTER TABLE ng3_them_surf_to_thermal_zone DROP CONSTRAINT ng3_thm_surf_to_tz_fk1;
--
ALTER TABLE ng3_them_surf_to_thermal_zone DROP CONSTRAINT ng3_thm_surf_to_tz_fk2;
--
ALTER TABLE ng3_thematic_surface DROP CONSTRAINT ng3_them_surf_fk;
--
ALTER TABLE ng3_time_series DROP CONSTRAINT ng3_ts_fk;
--
ALTER TABLE ng3_time_series DROP CONSTRAINT ng3_ts_oc_fk;
--
ALTER TABLE ng3_urban_function_area DROP CONSTRAINT ng3_ufa_fk;
--
ALTER TABLE ng3_utl_ntw_connection DROP CONSTRAINT ng3_utl_ntw_con_cto_fk;
--
ALTER TABLE ng3_utl_ntw_connection DROP CONSTRAINT ng3_utl_ntw_con_fk;
--
ALTER TABLE ng3_weather_data DROP CONSTRAINT ng3_wth_data_fk;
--
ALTER TABLE ng3_weather_data DROP CONSTRAINT ng3_wth_data_ng3_cto_fk;
--
ALTER TABLE ng3_weather_data DROP CONSTRAINT ng3_wth_data_ts_fk;
-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-- *********************************** Drop tables ***************************************
-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
DROP
TABLE
ng3_address_to_building_unit
CASCADE
;
DROP
TABLE
ng3_building
CASCADE
;
DROP
TABLE
ng3_
building_partition
CASCADE
;
DROP
TABLE
ng3_
space
CASCADE
;
DROP
TABLE
ng3_cityobject
CASCADE
;
DROP
TABLE
ng3_ctyobj_relation
CASCADE
;
DROP
TABLE
ng3_device
CASCADE
;
...
...
@@ -133,13 +133,13 @@ DROP TABLE ng3_schedule_component CASCADE;
DROP
TABLE
ng3_solar_collector
CASCADE
;
DROP
TABLE
ng3_storage_device
CASCADE
;
DROP
TABLE
ng3_suitability
CASCADE
;
DROP
TABLE
ng3_them_surf_to_thermal_zone
CASCADE
;
DROP
TABLE
ng3_thematic_surface
CASCADE
;
DROP
TABLE
ng3_time_series
CASCADE
;
DROP
TABLE
ng3_urban_function_area
CASCADE
;
DROP
TABLE
ng3_utl_ntw_connection
CASCADE
;
DROP
TABLE
ng3_weather_data
CASCADE
;
DROP
TABLE
ng3_sensor_data
CASCADE
;
DROP
TABLE
ng3_zone_opening
CASCADE
;
DROP
TABLE
ng3_zone_thematic_surface
CASCADE
;
-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-- *********************************** Drop Sequences *************************************
-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
...
...
resources/database/schema-mapping/schema-mapping.xml
View file @
2ef0d8b9
...
...
@@ -3,9 +3,9 @@
****************************************************************************************
****************************************************************************************
CityGML Energy ADE 3.0 (beta
7
)
CityGML Energy ADE 3.0 (beta
8
)
Last update: 2025-1
0
-1
4
Last update: 2025-1
2
-1
5
This schema mapping file was first automatically generated using the ADE Manager
of the 3DCityDB Importer/Exporter and successively manually edited and restructured.
...
...
@@ -27,7 +27,7 @@ https://3d.bk.tudelft.nl/gagugiaro/
<schemaMapping
xmlns=
"http://www.3dcitydb.org/database/schema/1.0"
>
<metadata>
<name>
Energy ADE
</name>
<version>
3.0 beta
7
(2025-1
0
-1
4
)
</version>
<version>
3.0 beta
8
(2025-1
2
-1
5
)
</version>
<description>
Database schema for the 3DCityDB 4.x
</description>
<dbPrefix>
ng3
</dbPrefix>
</metadata>
...
...
@@ -37,44 +37,56 @@ https://3d.bk.tudelft.nl/gagugiaro/
</schema>
</applicationSchemas>
<!-- Mapping of
the
complex types -->
<!-- Mapping of complex types -->
<complexTypes>
<!-- Abstract Optical Property -->
<complexType
abstract=
"true"
id=
"ng3_AbstractOpticalProperty_Type"
table=
"ng3_optical_property"
objectClassId=
"11001"
path=
"AbstractOpticalProperty"
schema=
"ng3"
>
<complexAttribute
minOccurs=
"1"
maxOccurs=
"1"
path=
"fraction"
schema=
"ng3"
>
<attribute
column=
"fraction"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"fraction_uom"
type=
"string"
path=
"@uom"
schema=
"gml"
/>
<attribute
column=
"fraction_uom"
type=
"string"
path=
"@uom"
schema=
"gml"
/>
</complexAttribute>
</complexType>
<!-- Absorptance-->
<complexType
id=
"ng3_AbsorptanceType"
table=
"ng3_optical_property"
objectClassId=
"11002"
path=
"Emissivity"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractOpticalProperty_Type"
/>
<attribute
minOccurs=
"1"
maxOccurs=
"1"
column=
"wavelength_range"
type=
"string"
path=
"wavelengthRange"
schema=
"ng3"
/>
</complexType>
<!-- Emissivity-->
<complexType
id=
"ng3_EmissivityType"
table=
"ng3_optical_property"
objectClassId=
"1100
2
"
path=
"Emissivity"
schema=
"ng3"
>
<complexType
id=
"ng3_EmissivityType"
table=
"ng3_optical_property"
objectClassId=
"1100
3
"
path=
"Emissivity"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractOpticalProperty_Type"
/>
<attribute
minOccurs=
"1"
maxOccurs=
"1"
column=
"surface"
type=
"string"
path=
"surface"
schema=
"ng3"
/>
</complexType>
<!-- Reflectance -->
<complexType
id=
"ng3_ReflectanceType"
table=
"ng3_optical_property"
objectClassId=
"1100
3
"
path=
"Reflectance"
schema=
"ng3"
>
<complexType
id=
"ng3_ReflectanceType"
table=
"ng3_optical_property"
objectClassId=
"1100
4
"
path=
"Reflectance"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractOpticalProperty_Type"
/>
<attribute
minOccurs=
"1"
maxOccurs=
"1"
column=
"surface"
type=
"string"
path=
"surface"
schema=
"ng3"
/>
<attribute
minOccurs=
"1"
maxOccurs=
"1"
column=
"wavelength_range"
type=
"string"
path=
"wavelengthRange"
schema=
"ng3"
/>
</complexType>
<!-- Transmittance -->
<complexType
id=
"ng3_TransmittanceType"
table=
"ng3_optical_property"
objectClassId=
"1100
4
"
path=
"Transmittance"
schema=
"ng3"
>
<complexType
id=
"ng3_TransmittanceType"
table=
"ng3_optical_property"
objectClassId=
"1100
5
"
path=
"Transmittance"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractOpticalProperty_Type"
/>
<attribute
minOccurs=
"1"
maxOccurs=
"1"
column=
"wavelength_range"
type=
"string"
path=
"wavelengthRange"
schema=
"ng3"
/>
</complexType>
<!-- Abstract Qualified Attribute (height, area, volume) -->
<complexType
abstract=
"true"
id=
"ng3_AbstractQualifiedAttributeType"
table=
"ng3_qualified_attribute"
objectClassId=
"110
05
"
path=
"AbstractQualifiedAttribute"
schema=
"ng3"
>
<complexType
abstract=
"true"
id=
"ng3_AbstractQualifiedAttributeType"
table=
"ng3_qualified_attribute"
objectClassId=
"110
11
"
path=
"AbstractQualifiedAttribute"
schema=
"ng3"
>
<attribute
maxOccurs=
"1"
column=
"description"
type=
"string"
path=
"description"
schema=
"ng3"
/>
<attribute
maxOccurs=
"1"
column=
"source"
type=
"string"
path=
"description"
schema=
"ng3"
/>
</complexType>
<!-- Qualified Area -->
<complexType
id=
"ng3_QualifiedAreaType"
table=
"ng3_qualified_attribute"
objectClassId=
"110
06
"
path=
"QualifiedArea"
schema=
"ng3"
>
<complexType
id=
"ng3_QualifiedAreaType"
table=
"ng3_qualified_attribute"
objectClassId=
"110
12
"
path=
"QualifiedArea"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractQualifiedAttributeType"
/>
<complexAttribute
minOccurs=
"1"
maxOccurs=
"1"
path=
"type"
schema=
"ng3"
>
<attribute
column=
"type"
type=
"string"
path=
"."
schema=
"ng3"
/>
...
...
@@ -86,8 +98,9 @@ https://3d.bk.tudelft.nl/gagugiaro/
</complexAttribute>
</complexType>
<!-- Qualified Height -->
<complexType
id=
"ng3_QualifiedHeightType"
table=
"ng3_qualified_attribute"
objectClassId=
"110
07
"
path=
"QualifiedHeight"
schema=
"ng3"
>
<complexType
id=
"ng3_QualifiedHeightType"
table=
"ng3_qualified_attribute"
objectClassId=
"110
13
"
path=
"QualifiedHeight"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractQualifiedAttributeType"
/>
<complexAttribute
minOccurs=
"1"
maxOccurs=
"1"
path=
"type"
schema=
"ng3"
>
<attribute
column=
"type"
type=
"string"
path=
"."
schema=
"ng3"
/>
...
...
@@ -99,8 +112,9 @@ https://3d.bk.tudelft.nl/gagugiaro/
</complexAttribute>
</complexType>
<!-- Qualified Volume -->
<complexType
id=
"ng3_QualifiedVolumeType"
table=
"ng3_qualified_attribute"
objectClassId=
"110
08
"
path=
"QualifiedVolume"
schema=
"ng3"
>
<complexType
id=
"ng3_QualifiedVolumeType"
table=
"ng3_qualified_attribute"
objectClassId=
"110
14
"
path=
"QualifiedVolume"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractQualifiedAttributeType"
/>
<complexAttribute
minOccurs=
"1"
maxOccurs=
"1"
path=
"type"
schema=
"ng3"
>
<attribute
column=
"type"
type=
"string"
path=
"."
schema=
"ng3"
/>
...
...
@@ -112,8 +126,9 @@ https://3d.bk.tudelft.nl/gagugiaro/
</complexAttribute>
</complexType>
<!-- CityObjectRelation -->
<complexType
id=
"ng3_CityObjectRelationType"
table=
"ng3_ctyobj_relation"
objectClassId=
"1100
9
"
path=
"CityObjectRelation"
schema=
"ng3"
>
<complexType
id=
"ng3_CityObjectRelationType"
table=
"ng3_ctyobj_relation"
objectClassId=
"110
2
0"
path=
"CityObjectRelation"
schema=
"ng3"
>
<complexAttribute
minOccurs=
"1"
maxOccurs=
"1"
path=
"relationType"
schema=
"ng3"
>
<attribute
column=
"relation_type"
type=
"string"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"relation_type_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
...
...
@@ -125,8 +140,9 @@ https://3d.bk.tudelft.nl/gagugiaro/
</featureProperty>
</complexType>
<!-- Suitability -->
<complexType
id=
"ng3_SuitabilityType"
table=
"ng3_suitability"
objectClassId=
"110
1
0"
path=
"Suitability"
schema=
"ng3"
>
<complexType
id=
"ng3_SuitabilityType"
table=
"ng3_suitability"
objectClassId=
"110
3
0"
path=
"Suitability"
schema=
"ng3"
>
<complexAttribute
minOccurs=
"1"
maxOccurs=
"1"
path=
"reason"
schema=
"ng3"
>
<attribute
column=
"reason_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
<attribute
column=
"reason"
type=
"string"
path=
"."
schema=
"ng3"
/>
...
...
@@ -143,14 +159,41 @@ https://3d.bk.tudelft.nl/gagugiaro/
</featureProperty>
</complexType>
<!-- Atomic Schedule Value (union) -->
<complexType
id=
"ng3_AtomicScheduleValueType"
table=
"ng3_schedule"
objectClassId=
"11040"
path=
"AtomicScheduleValue"
schema=
"ng3"
>
<complexAttribute
minOccurs=
"1"
maxOccurs=
"1"
path=
"constantValue"
schema=
"ng3"
>
<attribute
column=
"constant_value"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"constant_value_uom"
type=
"string"
path=
"@uom"
schema=
"gml"
/>
</complexAttribute>
<featureProperty
target=
"ng3_AbstractTimeSeriesType"
minOccurs=
"1"
maxOccurs=
"1"
path=
"timeDependentValues"
schema=
"ng3"
relationType=
"composition"
>
<join
table=
"ng3_time_series"
fromColumn=
"time_series_id"
toColumn=
"id"
toRole=
"parent"
>
<condition
column=
"objectclass_id"
value=
"${target.objectclass_id}"
type=
"integer"
/>
</join>
</featureProperty>
</complexType>
</complexTypes>
<!-- Features and new CityObjects -->
<featureTypes>
<!-- ***************************** -->
<!-- Core Module: Feature -->
<!-- ***************************** -->
<!-- Abstract ADE Feature -->
<featureType
abstract=
"true"
id=
"ng3_AbstractADEFeatureType"
table=
"cityobject"
objectClassId=
"11051"
path=
"AbstractADEFeature"
schema=
"ng3"
>
<extension
base=
"AbstractCityObjectType"
/>
<attribute
column=
"creationdate"
type=
"timestamp"
maxOccurs=
"1"
path=
"creationDate"
schema=
"ng3"
/>
<attribute
column=
"terminationdate"
type=
"timestamp"
maxOccurs=
"1"
path=
"terminationDate"
schema=
"ng3"
/>
<complexAttribute
type=
"ExternalReferenceType"
path=
"externalReference"
schema=
"ng3"
/>
</featureType>
<!-- Abstract Time Series -->
<featureType
abstract=
"true"
id=
"ng3_AbstractTimeSeriesType"
table=
"ng3_time_series"
objectClassId=
"1102
0
"
path=
"AbstractTimeSeries"
schema=
"ng3"
>
<extension
base=
"AbstractFeatureType"
>
<featureType
abstract=
"true"
id=
"ng3_AbstractTimeSeriesType"
table=
"ng3_time_series"
objectClassId=
"110
5
2"
path=
"AbstractTimeSeries"
schema=
"ng3"
>
<extension
base=
"
ng3_
Abstract
ADE
FeatureType"
>
<join
table=
"cityobject"
fromColumn=
"id"
toColumn=
"id"
toRole=
"parent"
/>
</extension>
<complexAttribute
maxOccurs=
"1"
path=
"acquisitionMethod"
schema=
"ng3"
>
...
...
@@ -161,8 +204,262 @@ https://3d.bk.tudelft.nl/gagugiaro/
<attribute
maxOccurs=
"1"
column=
"source"
type=
"string"
path=
"source"
schema=
"ng3"
/>
</featureType>
<!-- Abstract Schedule -->
<featureType
abstract=
"true"
id=
"ng3_AbstractScheduleType"
table=
"ng3_schedule"
objectClassId=
"11053"
path=
"AbstractSchedule"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractADEFeatureType"
>
<join
table=
"cityobject"
fromColumn=
"id"
toColumn=
"id"
toRole=
"parent"
/>
</extension>
<complexAttribute
minOccurs=
"1"
maxOccurs=
"1"
path=
"type"
schema=
"ng3"
>
<attribute
column=
"type"
type=
"string"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"type_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
</complexAttribute>
<attribute
maxOccurs=
"1"
column=
"start_time"
type=
"timestamp"
path=
"startTime"
schema=
"ng3"
/>
<attribute
maxOccurs=
"1"
column=
"start_day"
type=
"integer"
path=
"startDay"
schema=
"ng3"
/>
<attribute
maxOccurs=
"1"
column=
"start_month"
type=
"integer"
path=
"startMonth"
schema=
"ng3"
/>
<attribute
maxOccurs=
"1"
column=
"start_year"
type=
"integer"
path=
"startYear"
schema=
"ng3"
/>
<complexAttribute
maxOccurs=
"1"
path=
"temporalExtent"
schema=
"ng3"
>
<attribute
column=
"time_interval"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"time_interval_unit"
type=
"string"
path=
"@unit"
schema=
"gml"
/>
<!-- <attribute column="time_interval_radix" type="integer" path="@radix" schema="gml"/> -->
<!-- <attribute column="time_interval_factor" type="integer" path="@factor" schema="gml"/> -->
</complexAttribute>
</featureType>
<!-- Sensor Data -->
<featureType
id=
"ng3_SensorDataType"
table=
"ng3_sensor_data"
objectClassId=
"11054"
path=
"SensorData"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractADEFeatureType"
>
<join
table=
"cityobject"
fromColumn=
"id"
toColumn=
"id"
toRole=
"parent"
/>
</extension>
<complexAttribute
minOccurs=
"1"
maxOccurs=
"1"
path=
"type"
schema=
"ng3"
>
<attribute
column=
"type"
type=
"string"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"type_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
</complexAttribute>
<complexAttribute
minOccurs=
"1"
maxOccurs=
"1"
path=
"valueType"
schema=
"ng3"
>
<attribute
column=
"value_type"
type=
"string"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"value_type_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
</complexAttribute>
<complexAttribute
maxOccurs=
"1"
path=
"yearlyValue"
schema=
"ng3"
>
<attribute
column=
"yearly_value"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"yearly_value_uom"
type=
"string"
path=
"@uom"
schema=
"gml"
/>
</complexAttribute>
<featureProperty
maxOccurs=
"1"
target=
"ng3_AbstractTimeSeriesType"
path=
"timeDependentValues"
schema=
"ng3"
relationType=
"composition"
>
<join
table=
"ng3_time_series"
fromColumn=
"time_series_id"
toColumn=
"id"
toRole=
"parent"
>
<condition
column=
"objectclass_id"
value=
"${target.objectclass_id}"
type=
"integer"
/>
</join>
</featureProperty>
<geometryProperty
maxOccurs=
"1"
inlineColumn=
"position"
type=
"Point"
path=
"position"
schema=
"ng3"
/>
</featureType>
<!-- Device Operation -->
<featureType
id=
"ng3_DeviceOperationType"
table=
"ng3_device_operation"
objectClassId=
"11055"
path=
"DeviceOperation"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractADEFeatureType"
>
<join
table=
"cityobject"
fromColumn=
"id"
toColumn=
"id"
toRole=
"parent"
/>
</extension>
<complexAttribute
minOccurs=
"1"
maxOccurs=
"1"
path=
"type"
schema=
"ng3"
>
<attribute
column=
"type"
type=
"string"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"type_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
</complexAttribute>
<attribute
maxOccurs=
"1"
column=
"yearly_global_efficiency"
type=
"double"
path=
"yearlyGlobalEfficiency"
schema=
"ng3"
/>
<featureProperty
maxOccurs=
"1"
target=
"ng3_AbstractScheduleType"
path=
"schedule"
schema=
"ng3"
relationType=
"aggregation"
>
<join
table=
"ng3_schedule"
fromColumn=
"schedule_id"
toColumn=
"id"
toRole=
"parent"
>
<condition
column=
"objectclass_id"
value=
"${target.objectclass_id}"
type=
"integer"
/>
</join>
</featureProperty>
</featureType>
<!-- Abstract Layered Construction -->
<featureType
abstract=
"true"
id=
"ng3_AbstractLayeredConstructionType"
table=
"ng3_layered_construction"
objectClassId=
"11056"
path=
"AbstractLayeredConstruction"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractADEFeatureType"
>
<join
table=
"cityobject"
fromColumn=
"id"
toColumn=
"id"
toRole=
"parent"
/>
</extension>
</featureType>
<!-- Abstract Feature With Life Span -->
<featureType
abstract=
"true"
id=
"ng3_AbstractFeatureWithLifeSpanType"
table=
"ng3_cityobject"
objectClassId=
"11061"
path=
"AbstractFeatureWithLifeSpan"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractADEFeatureType"
>
<join
table=
"cityobject"
fromColumn=
"id"
toColumn=
"id"
toRole=
"parent"
/>
</extension>
<complexAttribute
maxOccurs=
"1"
path=
"permanentIdentifier"
schema=
"ng3"
>
<attribute
column=
"perm_identifier"
type=
"string"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"perm_identifier_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
</complexAttribute>
<attribute
column=
"valid_from"
type=
"timestamp"
maxOccurs=
"1"
path=
"validFrom"
schema=
"ng3"
/>
<attribute
column=
"valid_to"
type=
"timestamp"
maxOccurs=
"1"
path=
"validTo"
schema=
"ng3"
/>
</featureType>
<!-- Utility Network Connection -->
<featureType
id=
"ng3_UtilityNetworkConnectionType"
table=
"ng3_utl_ntw_connection"
objectClassId=
"11062"
path=
"UtilityNetworkConnection"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractFeatureWithLifeSpanType"
>
<join
table=
"ng3_cityobject"
fromColumn=
"id"
toColumn=
"id"
toRole=
"parent"
/>
</extension>
<complexAttribute
minOccurs=
"1"
maxOccurs=
"1"
path=
"networkType"
schema=
"ng3"
>
<attribute
column=
"network_type"
type=
"string"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"network_type_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
</complexAttribute>
<attribute
minOccurs=
"1"
maxOccurs=
"1"
column=
"connection_status"
type=
"string"
path=
"connectionStatus"
schema=
"ng3"
/>
<complexAttribute
maxOccurs=
"1"
path=
"functionInNetwork"
schema=
"ng3"
>
<attribute
column=
"function_in_network"
type=
"string"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"function_in_network_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
</complexAttribute>
<complexAttribute
maxOccurs=
"1"
path=
"usageInNetwork"
schema=
"ng3"
>
<attribute
column=
"usage_in_network"
type=
"string"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"usage_in_network_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
</complexAttribute>
<attribute
maxOccurs=
"1"
column=
"network_id"
type=
"string"
path=
"networkID"
schema=
"ng3"
/>
<attribute
maxOccurs=
"1"
column=
"network_node_id"
type=
"string"
path=
"networkNodeID"
schema=
"ng3"
/>
</featureType>
<!-- Abstract Resource -->
<featureType
abstract=
"true"
id=
"ng3_AbstractResourceType"
table=
"ng3_resource"
objectClassId=
"11063"
path=
"AbstractResource"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractFeatureWithLifeSpanType"
>
<join
table=
"ng3_cityobject"
fromColumn=
"id"
toColumn=
"id"
toRole=
"parent"
/>
</extension>
<attribute
minOccurs=
"1"
maxOccurs=
"1"
column=
"status"
type=
"string"
path=
"status"
schema=
"ng3"
/>
<complexAttribute
minOccurs=
"1"
maxOccurs=
"1"
path=
"operationType"
schema=
"ng3"
>
<attribute
column=
"operation_type"
type=
"string"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"operation_type_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
</complexAttribute>
<complexAttribute
minOccurs=
"1"
maxOccurs=
"1"
path=
"amountType"
schema=
"ng3"
>
<attribute
column=
"amount_type"
type=
"string"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"amount_type_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
</complexAttribute>
<complexAttribute
maxOccurs=
"1"
path=
"amount"
schema=
"ng3"
>
<attribute
column=
"amount"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"amount_uom"
type=
"string"
path=
"@uom"
schema=
"gml"
/>
</complexAttribute>
<attribute
minOccurs=
"1"
maxOccurs=
"1"
column=
"is_amount_normalized"
type=
"boolean"
path=
"isAmountNormalized"
schema=
"ng3"
/>
<complexAttribute
maxOccurs=
"1"
path=
"normalizationValue"
schema=
"ng3"
>
<attribute
column=
"normalization_value"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"normalization_value_uom"
type=
"string"
path=
"@uom"
schema=
"gml"
/>
</complexAttribute>
<attribute
column=
"normalization_param"
type=
"string"
maxOccurs=
"1"
path=
"normalizationParameter"
schema=
"ng3"
/>
<complexAttribute
maxOccurs=
"1"
path=
"referencePeriod"
schema=
"ng3"
>
<attribute
column=
"ref_period"
type=
"string"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"ref_period_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
</complexAttribute>
<complexAttribute
maxOccurs=
"1"
path=
"co2Equivalent"
schema=
"ng3"
>
<attribute
column=
"co2_equivalent"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"co2_equivalent_uom"
type=
"string"
path=
"@uom"
schema=
"gml"
/>
</complexAttribute>
<attribute
maxOccurs=
"1"
column=
"year"
type=
"integer"
path=
"year"
schema=
"ng3"
/>
<complexAttribute
maxOccurs=
"1"
path=
"costsMoney"
schema=
"ng3"
>
<attribute
column=
"costs_money"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"co2_equivalent_uom"
type=
"string"
path=
"@uom"
schema=
"gml"
/>
</complexAttribute>
<complexAttribute
maxOccurs=
"1"
path=
"yieldsMoney"
schema=
"ng3"
>
<attribute
column=
"yields_money"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"yields_money_uom"
type=
"string"
path=
"@uom"
schema=
"gml"
/>
</complexAttribute>
<featureProperty
target=
"ng3_AbstractTimeSeriesType"
maxOccurs=
"1"
path=
"timeDependentAmount"
schema=
"ng3"
relationType=
"composition"
>
<join
table=
"ng3_time_series"
fromColumn=
"amount_time_series_id"
toColumn=
"id"
toRole=
"parent"
>
<condition
column=
"objectclass_id"
value=
"${target.objectclass_id}"
type=
"integer"
/>
</join>
</featureProperty>
<featureProperty
target=
"ng3_AbstractTimeSeriesType"
maxOccurs=
"1"
path=
"timeDependentCosts"
schema=
"ng3"
relationType=
"composition"
>
<join
table=
"ng3_time_series"
fromColumn=
"costs_time_series_id"
toColumn=
"id"
toRole=
"parent"
>
<condition
column=
"objectclass_id"
value=
"${target.objectclass_id}"
type=
"integer"
/>
</join>
</featureProperty>
<featureProperty
target=
"ng3_AbstractTimeSeriesType"
maxOccurs=
"1"
path=
"timeDependentYields"
schema=
"ng3"
relationType=
"composition"
>
<join
table=
"ng3_time_series"
fromColumn=
"yields_time_series_id"
toColumn=
"id"
toRole=
"parent"
>
<condition
column=
"objectclass_id"
value=
"${target.objectclass_id}"
type=
"integer"
/>
</join>
</featureProperty>
</featureType>
<!-- ***************************** -->
<!-- Core Module: CityObjects -->
<!-- ***************************** -->
<!-- Abstract CityObject Space -->
<featureType
abstract=
"true"
id=
"ng3_AbstractCityObjectSpaceType"
table=
"ng3_space"
objectClassId=
"11071"
path=
"AbstractCityObjectSpace"
schema=
"ng3"
>
<extension
base=
"AbstractCityObjectType"
>
<join
table=
"cityobject"
fromColumn=
"id"
toColumn=
"id"
toRole=
"parent"
/>
</extension>
<complexProperty
refType=
"ng3_QualifiedAreaType"
path=
"area"
schema=
"ng3"
>
<join
table=
"ng3_qualified_attribute"
fromColumn=
"id"
toColumn=
"space_id"
toRole=
"child"
>
<condition
column=
"objectclass_id"
value=
"${target.objectclass_id}"
type=
"integer"
/>
</join>
</complexProperty>
<complexProperty
refType=
"ng3_QualifiedVolumeType"
path=
"volume"
schema=
"ng3"
>
<join
table=
"ng3_qualified_attribute"
fromColumn=
"id"
toColumn=
"space_id"
toRole=
"child"
>
<condition
column=
"objectclass_id"
value=
"${target.objectclass_id}"
type=
"integer"
/>
</join>
</complexProperty>
<geometryProperty
maxOccurs=
"1"
lod=
"1"
refColumn=
"lod1_solid_id"
type=
"AbstractSolid"
path=
"lod1Solid"
schema=
"ng3"
/>
<geometryProperty
maxOccurs=
"1"
lod=
"2"
refColumn=
"lod2_solid_id"
type=
"AbstractSolid"
path=
"lod2Solid"
schema=
"ng3"
/>
<geometryProperty
maxOccurs=
"1"
lod=
"3"
refColumn=
"lod3_solid_id"
type=
"AbstractSolid"
path=
"lod3Solid"
schema=
"ng3"
/>
</featureType>
<!-- Abstract Device -->
<featureType
abstract=
"true"
id=
"ng3_AbstractDeviceType"
table=
"ng3_device"
objectClassId=
"11072"
path=
"AbstractDevice"
schema=
"ng3"
>
<extension
base=
"AbstractCityObjectType"
>
<join
table=
"cityobject"
fromColumn=
"id"
toColumn=
"id"
toRole=
"parent"
/>
</extension>
<attribute
maxOccurs=
"1"
column=
"model"
type=
"string"
path=
"model"
schema=
"ng3"
/>
<attribute
maxOccurs=
"1"
column=
"year_of_manufacture"
type=
"integer"
path=
"yearOfManufacture"
schema=
"ng3"
/>
<attribute
maxOccurs=
"1"
column=
"num_of_devices"
type=
"integer"
path=
"numberOfDevices"
schema=
"ng3"
/>
<complexAttribute
maxOccurs=
"1"
path=
"installedPower"
schema=
"ng3"
>
<attribute
column=
"installed_power"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"installed_power_uom"
type=
"string"
path=
"@uom"
schema=
"gml"
/>
</complexAttribute>
<complexAttribute
maxOccurs=
"1"
path=
"nominalEfficiency"
schema=
"ng3"
>
<attribute
column=
"nominal_efficiency"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"nominal_efficiency_uom"
type=
"string"
path=
"@uom"
schema=
"gml"
/>
</complexAttribute>
<attribute
maxOccurs=
"1"
column=
"efficiency_indicator"
type=
"string"
path=
"efficiencyIndicator"
schema=
"ng3"
/>
<complexAttribute
maxOccurs=
"1"
path=
"heatDissipation"
schema=
"ng3"
>
<attribute
column=
"heat_diss"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"heat_diss_uom"
type=
"string"
path=
"@uom"
schema=
"gml"
/>
</complexAttribute>
<complexAttribute
maxOccurs=
"1"
path=
"heatDissipationConvectiveFraction"
schema=
"ng3"
>
<attribute
column=
"heat_diss_conv"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"heat_diss_conv_uom"
type=
"string"
path=
"@uom"
schema=
"gml"
/>
</complexAttribute>
<complexAttribute
maxOccurs=
"1"
path=
"heatDissipationLatentFraction"
schema=
"ng3"
>
<attribute
column=
"heat_diss_lat"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"heat_diss_lat_uom"
type=
"string"
path=
"@uom"
schema=
"gml"
/>
</complexAttribute>
<complexAttribute
maxOccurs=
"1"
path=
"heatDissipationRadiantFraction"
schema=
"ng3"
>
<attribute
column=
"heat_diss_rad"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"heat_diss_rad_uom"
type=
"string"
path=
"@uom"
schema=
"gml"
/>
</complexAttribute>
<featureProperty
target=
"ng3_DeviceOperationType"
path=
"deviceOperation"
schema=
"ng3"
relationType=
"aggregation"
>
<join
table=
"ng3_device_operation"
fromColumn=
"id"
toColumn=
"device_id"
toRole=
"child"
/>
</featureProperty>
</featureType>
<!-- Abstract Library -->
<featureType
abstract=
"true"
id=
"ng3_AbstractLibraryType"
table=
"ng3_library"
objectClassId=
"11073"
path=
"AbstractLibrary"
schema=
"ng3"
>
<extension
base=
"AbstractCityObjectType"
>
<join
table=
"cityobject"
fromColumn=
"id"
toColumn=
"id"
toRole=
"parent"
/>
</extension>
<complexAttribute
maxOccurs=
"1"
path=
"type"
schema=
"ng3"
>
<attribute
column=
"type_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
<attribute
column=
"type"
type=
"string"
path=
"."
schema=
"ng3"
/>
</complexAttribute>
<attribute
maxOccurs=
"1"
column=
"source"
type=
"string"
path=
"source"
schema=
"ng3"
/>
<attribute
maxOccurs=
"1"
column=
"author"
type=
"string"
path=
"author"
schema=
"ng3"
/>
</featureType>
<!-- ***************************** -->
<!-- Time Series Module -->
<!-- ***************************** -->
<!-- Regular Time Series -->
<featureType
id=
"ng3_RegularTimeSeriesType"
table=
"ng3_time_series"
objectClassId=
"110
2
1"
path=
"RegularTimeSeries"
schema=
"ng3"
>
<featureType
id=
"ng3_RegularTimeSeriesType"
table=
"ng3_time_series"
objectClassId=
"110
8
1"
path=
"RegularTimeSeries"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractTimeSeriesType"
/>
<complexAttribute
minOccurs=
"1"
maxOccurs=
"1"
path=
"timeInterval"
schema=
"ng3"
>
<attribute
column=
"time_interval"
type=
"double"
path=
"."
schema=
"ng3"
/>
...
...
@@ -182,8 +479,9 @@ https://3d.bk.tudelft.nl/gagugiaro/
</complexAttribute>
</featureType>
<!-- Regular Time Series File -->
<featureType
id=
"ng3_RegularTimeSeriesFileType"
table=
"ng3_time_series"
objectClassId=
"110
2
2"
path=
"RegularTimeSeriesFile"
schema=
"ng3"
>
<featureType
id=
"ng3_RegularTimeSeriesFileType"
table=
"ng3_time_series"
objectClassId=
"110
8
2"
path=
"RegularTimeSeriesFile"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractTimeSeriesType"
/>
<attribute
minOccurs=
"1"
maxOccurs=
"1"
column=
"uom"
type=
"string"
path=
"uom"
schema=
"ng3"
/>
<attribute
minOccurs=
"1"
maxOccurs=
"1"
column=
"file_uri"
type=
"string"
path=
"file"
schema=
"ng3"
/>
...
...
@@ -206,8 +504,9 @@ https://3d.bk.tudelft.nl/gagugiaro/
</complexProperty>
</featureType>
<!-- Typical Values Time Series -->
<featureType
id=
"ng3_TypicalValuesTimeSeriesType"
table=
"ng3_time_series"
objectClassId=
"110
2
3"
path=
"TypicalValuesTimeSeries"
schema=
"ng3"
>
<featureType
id=
"ng3_TypicalValuesTimeSeriesType"
table=
"ng3_time_series"
objectClassId=
"110
8
3"
path=
"TypicalValuesTimeSeries"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractTimeSeriesType"
/>
<attribute
maxOccurs=
"1"
column=
"start_time"
type=
"timestamp"
path=
"startTime"
schema=
"ng3"
/>
<attribute
maxOccurs=
"1"
column=
"start_day"
type=
"integer"
path=
"startDay"
schema=
"ng3"
/>
...
...
@@ -230,8 +529,9 @@ https://3d.bk.tudelft.nl/gagugiaro/
</complexAttribute>
</featureType>
<!-- Typical Values Time Series File -->
<featureType
id=
"ng3_TypicalValuesTimeSeriesFileType"
table=
"ng3_time_series"
objectClassId=
"110
2
4"
path=
"TypicalValuesTimeSeriesFile"
schema=
"ng3"
>
<featureType
id=
"ng3_TypicalValuesTimeSeriesFileType"
table=
"ng3_time_series"
objectClassId=
"110
8
4"
path=
"TypicalValuesTimeSeriesFile"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractTimeSeriesType"
/>
<attribute
maxOccurs=
"1"
column=
"start_time"
type=
"timestamp"
path=
"startTime"
schema=
"ng3"
/>
<attribute
maxOccurs=
"1"
column=
"start_day"
type=
"integer"
path=
"startDay"
schema=
"ng3"
/>
...
...
@@ -257,14 +557,87 @@ https://3d.bk.tudelft.nl/gagugiaro/
<attribute
maxOccurs=
"1"
column=
"value_column_number"
type=
"integer"
path=
"valueColumnNumber"
schema=
"ng3"
/>
</featureType>
<!-- Sensor Connection -->
<featureType
id=
"ng3_SensorConnectionType"
table=
"ng3_time_series"
objectClassId=
"11025"
path=
"SensorConnection"
schema=
"ng3"
>
<!-- Monthly Time Series -->
<featureType
id=
"ng3_MonthlyTimeSeriesType"
table=
"ng3_time_series"
objectClassId=
"11085"
path=
"MonthlyTimeSeries"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractTimeSeriesType"
/>
<complexAttribute
minOccurs=
"1"
maxOccurs=
"1"
path=
"temporalExtent"
schema=
"ng3"
>
<attribute
column=
"temporal_extent"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"temporal_extent_unit"
type=
"string"
path=
"@unit"
schema=
"gml"
/>
<!-- <attribute column="temporal_extent_radix" type="integer" path="@radix" schema="gml"/> -->
<!-- <attribute column="temporal_extent_factor" type="integer" path="@factor" schema="gml"/> -->
<complexProperty
minOccurs=
"1"
maxOccurs=
"1"
path=
"temporalExtent"
schema=
"ng3"
>
<type
path=
"TimePeriod"
schema=
"ng3"
>
<attribute
minOccurs=
"1"
maxOccurs=
"1"
column=
"period_begin"
type=
"timestamp"
path=
"beginPosition"
schema=
"ng3"
/>
<attribute
minOccurs=
"1"
maxOccurs=
"1"
column=
"period_end"
type=
"timestamp"
path=
"endPosition"
schema=
"ng3"
/>
</type>
</complexProperty>
<complexAttribute
minOccurs=
"1"
maxOccurs=
"1"
path=
"values"
schema=
"ng3"
>
<attribute
column=
"values_list"
type=
"clob"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"values_list_uom"
type=
"string"
path=
"@uom"
schema=
"ng3"
/>
</complexAttribute>
</featureType>
<!-- Monthly Time Series File -->
<featureType
id=
"ng3_MonthlyTimeSeriesFileType"
table=
"ng3_time_series"
objectClassId=
"11086"
path=
"MonthlyTimeSeriesFile"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractTimeSeriesType"
/>
<attribute
minOccurs=
"1"
maxOccurs=
"1"
column=
"uom"
type=
"string"
path=
"uom"
schema=
"ng3"
/>
<attribute
minOccurs=
"1"
maxOccurs=
"1"
column=
"file_uri"
type=
"string"
path=
"file"
schema=
"ng3"
/>
<attribute
maxOccurs=
"1"
column=
"num_of_header_lines"
type=
"integer"
path=
"numberOfHeaderLines"
schema=
"ng3"
/>
<attribute
maxOccurs=
"1"
column=
"field_separator"
type=
"string"
path=
"fieldSeparator"
schema=
"ng3"
/>
<attribute
maxOccurs=
"1"
column=
"record_separator"
type=
"string"
path=
"recordSeparator"
schema=
"ng3"
/>
<attribute
maxOccurs=
"1"
column=
"decimal_symbol"
type=
"string"
path=
"decimalSymbol"
schema=
"ng3"
/>
<attribute
maxOccurs=
"1"
column=
"value_column_number"
type=
"integer"
path=
"valueColumnNumber"
schema=
"ng3"
/>
<complexProperty
minOccurs=
"1"
maxOccurs=
"1"
path=
"temporalExtent"
schema=
"ng3"
>
<type
path=
"TimePeriod"
schema=
"ng3"
>
<attribute
minOccurs=
"1"
maxOccurs=
"1"
column=
"period_begin"
type=
"timestamp"
path=
"beginPosition"
schema=
"ng3"
/>
<attribute
minOccurs=
"1"
maxOccurs=
"1"
column=
"period_end"
type=
"timestamp"
path=
"endPosition"
schema=
"ng3"
/>
</type>
</complexProperty>
</featureType>
<!-- Typical Values Time Series -->
<featureType
id=
"ng3_TypicalValuesMonthlyTimeSeriesType"
table=
"ng3_time_series"
objectClassId=
"11087"
path=
"TypicalValuesMonthlyTimeSeries"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractTimeSeriesType"
/>
<attribute
maxOccurs=
"1"
column=
"start_month"
type=
"integer"
path=
"startMonth"
schema=
"ng3"
/>
<complexAttribute
minOccurs=
"1"
maxOccurs=
"1"
path=
"temporalExtent"
schema=
"ng3"
>
<attribute
column=
"temporal_extent"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"temporal_extent_unit"
type=
"string"
path=
"@unit"
schema=
"gml"
/>
<!-- <attribute column="temporal_extent_radix" type="integer" path="@radix" schema="gml"/> -->
<!-- <attribute column="temporal_extent_factor" type="integer" path="@factor" schema="gml"/> -->
</complexAttribute>
<complexAttribute
minOccurs=
"1"
maxOccurs=
"1"
path=
"values"
schema=
"ng3"
>
<attribute
column=
"values_list"
type=
"clob"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"values_list_uom"
type=
"string"
path=
"@uom"
schema=
"ng3"
/>
</complexAttribute>
</featureType>
<!-- Typical Values Time Series File -->
<featureType
id=
"ng3_TypicalValuesMonthlyTimeSeriesFileType"
table=
"ng3_time_series"
objectClassId=
"11088"
path=
"TypicalValuesMonthlyTimeSeriesFile"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractTimeSeriesType"
/>
<attribute
maxOccurs=
"1"
column=
"start_month"
type=
"integer"
path=
"startMonth"
schema=
"ng3"
/>
<attribute
minOccurs=
"1"
maxOccurs=
"1"
column=
"uom"
type=
"string"
path=
"uom"
schema=
"ng3"
/>
<attribute
minOccurs=
"1"
maxOccurs=
"1"
column=
"file_uri"
type=
"string"
path=
"file"
schema=
"ng3"
/>
<complexAttribute
minOccurs=
"1"
maxOccurs=
"1"
path=
"temporalExtent"
schema=
"ng3"
>
<attribute
column=
"temporal_extent"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"temporal_extent_unit"
type=
"string"
path=
"@unit"
schema=
"gml"
/>
<!-- <attribute column="temporal_extent_radix" type="integer" path="@radix" schema="gml"/> -->
<!-- <attribute column="temporal_extent_factor" type="integer" path="@factor" schema="gml"/> -->
</complexAttribute>
<attribute
maxOccurs=
"1"
column=
"num_of_header_lines"
type=
"integer"
path=
"numberOfHeaderLines"
schema=
"ng3"
/>
<attribute
minOccurs=
"1"
maxOccurs=
"1"
column=
"field_separator"
type=
"string"
path=
"fieldSeparator"
schema=
"ng3"
/>
<attribute
maxOccurs=
"1"
column=
"record_separator"
type=
"string"
path=
"recordSeparator"
schema=
"ng3"
/>
<attribute
maxOccurs=
"1"
column=
"decimal_symbol"
type=
"string"
path=
"decimalSymbol"
schema=
"ng3"
/>
<attribute
maxOccurs=
"1"
column=
"value_column_number"
type=
"integer"
path=
"valueColumnNumber"
schema=
"ng3"
/>
</featureType>
<!-- Sensor Connection -->
<featureType
id=
"ng3_SensorConnectionType"
table=
"ng3_time_series"
objectClassId=
"11089"
path=
"SensorConnection"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractTimeSeriesType"
/>
<complexAttribute
minOccurs=
"1"
maxOccurs=
"1"
path=
"temporalExtent"
schema=
"ng3"
>
<attribute
column=
"temporal_extent"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"temporal_extent_unit"
type=
"string"
path=
"@unit"
schema=
"gml"
/>
<!-- <attribute column="temporal_extent_radix" type="integer" path="@radix" schema="gml"/> -->
<!-- <attribute column="temporal_extent_factor" type="integer" path="@factor" schema="gml"/> -->
</complexAttribute>
<complexAttribute
minOccurs=
"1"
maxOccurs=
"1"
path=
"connectionType"
schema=
"ng3"
>
<attribute
column=
"connection_type"
type=
"string"
path=
"."
schema=
"ng3"
/>
...
...
@@ -287,47 +660,19 @@ https://3d.bk.tudelft.nl/gagugiaro/
<attribute
maxOccurs=
"1"
column=
"link_to_sensor_description"
type=
"string"
path=
"linkToSensorDescription"
schema=
"ng3"
/>
</featureType>
<!-- Abstract Schedule -->
<featureType
abstract=
"true"
id=
"ng3_AbstractScheduleType"
table=
"ng3_schedule"
objectClassId=
"11030"
path=
"AbstractSchedule"
schema=
"ng3"
>
<extension
base=
"AbstractFeatureType"
>
<join
table=
"cityobject"
fromColumn=
"id"
toColumn=
"id"
toRole=
"parent"
/>
</extension>
<complexAttribute
maxOccurs=
"1"
path=
"libraryCode"
schema=
"ng3"
>
<attribute
column=
"library_code"
type=
"string"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"library_code_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
</complexAttribute>
<complexAttribute
minOccurs=
"1"
maxOccurs=
"1"
path=
"type"
schema=
"ng3"
>
<attribute
column=
"type"
type=
"string"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"type_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
</complexAttribute>
<attribute
maxOccurs=
"1"
column=
"start_time"
type=
"timestamp"
path=
"startTime"
schema=
"ng3"
/>
<attribute
maxOccurs=
"1"
column=
"start_day"
type=
"integer"
path=
"startDay"
schema=
"ng3"
/>
<attribute
maxOccurs=
"1"
column=
"start_month"
type=
"integer"
path=
"startMonth"
schema=
"ng3"
/>
<attribute
maxOccurs=
"1"
column=
"start_year"
type=
"integer"
path=
"startYear"
schema=
"ng3"
/>
<complexAttribute
maxOccurs=
"1"
path=
"temporalExtent"
schema=
"ng3"
>
<attribute
column=
"time_interval"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"time_interval_unit"
type=
"string"
path=
"@unit"
schema=
"gml"
/>
<!-- <attribute column="time_interval_radix" type="integer" path="@radix" schema="gml"/> -->
<!-- <attribute column="time_interval_factor" type="integer" path="@factor" schema="gml"/> -->
</complexAttribute>
</featureType>
<!-- ***************************** -->
<!-- Schedule Module -->
<!-- ***************************** -->
<!-- Atomic Schedule -->
<featureType
id=
"ng3_AtomicScheduleType"
table=
"ng3_schedule"
objectClassId=
"110
3
1"
path=
"AtomicSchedule"
schema=
"ng3"
>
<featureType
id=
"ng3_AtomicScheduleType"
table=
"ng3_schedule"
objectClassId=
"110
9
1"
path=
"AtomicSchedule"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractScheduleType"
/>
<complexAttribute
minOccurs=
"0"
maxOccurs=
"1"
path=
"constantValue"
schema=
"ng3"
>
<attribute
column=
"constant_value"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"constant_value_uom"
type=
"string"
path=
"@uom"
schema=
"gml"
/>
</complexAttribute>
<featureProperty
minOccurs=
"0"
maxOccurs=
"1"
target=
"ng3_AbstractTimeSeriesType"
path=
"timeSeries"
schema=
"ng3"
relationType=
"composition"
>
<join
table=
"ng3_time_series"
fromColumn=
"time_series_id"
toColumn=
"id"
toRole=
"parent"
>
<condition
column=
"objectclass_id"
value=
"${target.objectclass_id}"
type=
"integer"
/>
</join>
</featureProperty>
<complexProperty
minOccurs=
"1"
maxOccurs=
"1"
refType=
"ng3_AtomicScheduleValueType"
path=
"value"
schema=
"ng3"
/>
</featureType>
<!-- Dual Value Schedule -->
<featureType
id=
"ng3_DualValueScheduleType"
table=
"ng3_schedule"
objectClassId=
"110
3
2"
path=
"DualValueSchedule"
schema=
"ng3"
>
<featureType
id=
"ng3_DualValueScheduleType"
table=
"ng3_schedule"
objectClassId=
"110
9
2"
path=
"DualValueSchedule"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractScheduleType"
/>
<complexAttribute
minOccurs=
"1"
maxOccurs=
"1"
path=
"idleValue"
schema=
"ng3"
>
<attribute
column=
"idle_value"
type=
"double"
path=
"."
schema=
"ng3"
/>
...
...
@@ -341,19 +686,10 @@ https://3d.bk.tudelft.nl/gagugiaro/
<attribute
minOccurs=
"1"
maxOccurs=
"1"
column=
"end_usage_time"
type=
"timestamp"
path=
"endUsageTime"
schema=
"ng3"
/>
</featureType>
<!-- Composite Schedule -->
<featureType
id=
"ng3_CompositeScheduleType"
table=
"ng3_schedule"
objectClassId=
"11033"
path=
"CompositeSchedule"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractScheduleType"
/>
<featureProperty
minOccurs=
"1"
target=
"ng3_ScheduleComponentType"
path=
"scheduleComponent"
schema=
"ng3"
relationType=
"composition"
>
<join
table=
"ng3_schedule_component"
fromColumn=
"id"
toColumn=
"parent_schedule_id"
toRole=
"child"
>
<condition
column=
"objectclass_id"
value=
"${target.objectclass_id}"
type=
"integer"
/>
</join>
</featureProperty>
</featureType>
<!-- Schedule Component -->
<featureType
id=
"ng3_ScheduleComponentType"
table=
"ng3_schedule_component"
objectClassId=
"110
3
4"
path=
"ScheduleComponent"
schema=
"ng3"
>
<extension
base=
"AbstractFeatureType"
>
<featureType
id=
"ng3_ScheduleComponentType"
table=
"ng3_schedule_component"
objectClassId=
"110
9
4"
path=
"ScheduleComponent"
schema=
"ng3"
>
<extension
base=
"
ng3_
Abstract
ADE
FeatureType"
>
<join
table=
"cityobject"
fromColumn=
"id"
toColumn=
"id"
toRole=
"parent"
/>
</extension>
<complexAttribute
minOccurs=
"1"
maxOccurs=
"1"
path=
"type"
schema=
"ng3"
>
...
...
@@ -374,180 +710,224 @@ https://3d.bk.tudelft.nl/gagugiaro/
</featureProperty>
</featureType>
<!-- Energy Performance Certificate -->
<featureType
id=
"ng3_EnergyPerformanceCertificateType"
table=
"ng3_energy_perf_cert"
objectClassId=
"11040"
path=
"EnergyPerformanceCertificate"
schema=
"ng3"
>
<extension
base=
"AbstractFeatureType"
>
<join
table=
"cityobject"
fromColumn=
"id"
toColumn=
"id"
toRole=
"parent"
/>
</extension>
<!-- Composite Schedule -->
<featureType
id=
"ng3_CompositeScheduleType"
table=
"ng3_schedule"
objectClassId=
"11093"
path=
"CompositeSchedule"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractScheduleType"
/>
<featureProperty
minOccurs=
"1"
target=
"ng3_ScheduleComponentType"
path=
"scheduleComponent"
schema=
"ng3"
relationType=
"composition"
>
<join
table=
"ng3_schedule_component"
fromColumn=
"id"
toColumn=
"parent_schedule_id"
toRole=
"child"
>
<condition
column=
"objectclass_id"
value=
"${target.objectclass_id}"
type=
"integer"
/>
</join>
</featureProperty>
</featureType>
<!-- Schedule Library -->
<featureType
topLevel=
"true"
id=
"ng3_ScheduleLibraryType"
table=
"ng3_library"
objectClassId=
"11095"
path=
"ScheduleLibrary"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractLibraryType"
/>
<featureProperty
target=
"ng3_AbstractScheduleType"
path=
"libraryMember"
schema=
"ng3"
relationType=
"composition"
>
<join
table=
"ng3_schedule"
fromColumn=
"id"
toColumn=
"library_id"
toRole=
"child"
>
<condition
column=
"objectclass_id"
value=
"${target.objectclass_id}"
type=
"integer"
/>
</join>
</featureProperty>
</featureType>
<!-- ***************************** -->
<!-- Resources Module -->
<!-- ***************************** -->
<!-- Construction Material -->
<featureType
id=
"ng3_ConstructionMaterialType"
table=
"ng3_resource"
objectClassId=
"11101"
path=
"ConstructionMaterial"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractResourceType"
/>
<complexAttribute
minOccurs=
"1"
maxOccurs=
"1"
path=
"type"
schema=
"ng3"
>
<attribute
column=
"type"
type=
"string"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"type_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
</complexAttribute>
<complexAttribute
maxOccurs=
"1"
path=
"
valu
e"
schema=
"ng3"
>
<attribute
column=
"
valu
e"
type=
"
double
"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"
value_uom
"
type=
"string"
path=
"@
uom
"
schema=
"gml"
/>
<complexAttribute
minOccurs=
"1"
maxOccurs=
"1"
path=
"
endUs
e"
schema=
"ng3"
>
<attribute
column=
"
endus
e"
type=
"
string
"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"
enduse_codespace
"
type=
"string"
path=
"@
codespace
"
schema=
"gml"
/>
</complexAttribute>
<attribute
minOccurs=
"1"
maxOccurs=
"1"
column=
"label"
type=
"string"
path=
"label"
schema=
"ng3"
/>
<attribute
maxOccurs=
"1"
column=
"issue_date"
type=
"date"
path=
"issueDate"
schema=
"ng3"
/>
<attribute
maxOccurs=
"1"
column=
"expiration_date"
type=
"date"
path=
"expirationDate"
schema=
"ng3"
/>
<attribute
maxOccurs=
"1"
column=
"cert_method"
type=
"string"
path=
"certificationMethod"
schema=
"ng3"
/>
<attribute
maxOccurs=
"1"
column=
"cert_uri"
type=
"string"
path=
"certificationURI"
schema=
"ng3"
/>
</featureType>
<!-- Refurbishment Measure -->
<featureType
id=
"ng3_RefurbishmentMeasureType"
table=
"ng3_refurbishment_measure"
objectClassId=
"11041"
path=
"RefurbishmentMeasure"
schema=
"ng3"
>
<extension
base=
"AbstractFeatureType"
>
<join
table=
"cityobject"
fromColumn=
"id"
toColumn=
"id"
toRole=
"parent"
/>
</extension>
<!-- Energy -->
<featureType
id=
"ng3_EnergyType"
table=
"ng3_resource"
objectClassId=
"11102"
path=
"Energy"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractResourceType"
/>
<complexAttribute
minOccurs=
"1"
maxOccurs=
"1"
path=
"type"
schema=
"ng3"
>
<attribute
column=
"type"
type=
"string"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"type_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
</complexAttribute>
<attribute
minOccurs=
"0"
maxOccurs=
"1"
column=
"start_date"
type=
"date"
path=
"startDate"
schema=
"ng3"
/>
<attribute
minOccurs=
"1"
maxOccurs=
"1"
column=
"end_date"
type=
"date"
path=
"endDate"
schema=
"ng3"
/>
<complexAttribute
maxOccurs=
"1"
path=
"libraryCode"
schema=
"ng3"
>
<attribute
column=
"library_code"
type=
"string"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"library_code_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
<complexAttribute
minOccurs=
"1"
maxOccurs=
"1"
path=
"endUse"
schema=
"ng3"
>
<attribute
column=
"enduse"
type=
"string"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"enduse_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
</complexAttribute>
<complexAttribute
maxOccurs=
"1"
path=
"energyCarrier"
schema=
"ng3"
>
<attribute
column=
"energy_carrier"
type=
"string"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"energy_carrier_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
</complexAttribute>
<complexAttribute
maxOccurs=
"1"
path=
"maximumLoad"
schema=
"ng3"
>
<attribute
column=
"maximum_load"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"maximum_load_uom"
type=
"string"
path=
"@uom"
schema=
"gml"
/>
</complexAttribute>
<complexAttribute
maxOccurs=
"1"
path=
"source"
schema=
"ng3"
>
<attribute
column=
"source"
type=
"string"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"source_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
</complexAttribute>
</featureType>
<!-- Utility Network Connection -->
<featureType
id=
"ng3_UtilityNetworkConnectionType"
table=
"ng3_utl_ntw_connection"
objectClassId=
"11042"
path=
"UtilityNetworkConnection"
schema=
"ng3"
>
<extension
base=
"AbstractFeatureType"
>
<join
table=
"cityobject"
fromColumn=
"id"
toColumn=
"id"
toRole=
"parent"
/>
</extension>
<complexAttribute
minOccurs=
"1"
maxOccurs=
"1"
path=
"networkType"
schema=
"ng3"
>
<attribute
column=
"network_type"
type=
"string"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"network_type_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
<!-- Food -->
<featureType
id=
"ng3_FoodType"
table=
"ng3_resource"
objectClassId=
"11103"
path=
"Food"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractResourceType"
/>
<complexAttribute
minOccurs=
"1"
maxOccurs=
"1"
path=
"type"
schema=
"ng3"
>
<attribute
column=
"type"
type=
"string"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"type_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
</complexAttribute>
<attribute
minOccurs=
"1"
maxOccurs=
"1"
column=
"connection_status"
type=
"string"
path=
"connectionStatus"
schema=
"ng3"
/>
<complexAttribute
maxOccurs=
"1"
path=
"functionInNetwork"
schema=
"ng3"
>
<attribute
column=
"function_in_network"
type=
"string"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"function_in_network_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
<complexAttribute
minOccurs=
"1"
maxOccurs=
"1"
path=
"endUse"
schema=
"ng3"
>
<attribute
column=
"enduse"
type=
"string"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"enduse_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
</complexAttribute>
<complexAttribute
maxOccurs=
"1"
path=
"usageInNetwork"
schema=
"ng3"
>
<attribute
column=
"usage_in_network"
type=
"string"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"usage_in_network_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
</featureType>
<!-- Other Resource -->
<featureType
id=
"ng3_OtherResourceType"
table=
"ng3_resource"
objectClassId=
"11104"
path=
"OtherResource"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractResourceType"
/>
<complexAttribute
minOccurs=
"1"
maxOccurs=
"1"
path=
"type"
schema=
"ng3"
>
<attribute
column=
"type"
type=
"string"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"type_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
</complexAttribute>
<complexAttribute
minOccurs=
"1"
maxOccurs=
"1"
path=
"endUse"
schema=
"ng3"
>
<attribute
column=
"enduse"
type=
"string"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"enduse_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
</complexAttribute>
<attribute
maxOccurs=
"1"
column=
"network_id"
type=
"string"
path=
"networkID"
schema=
"ng3"
/>
<attribute
maxOccurs=
"1"
column=
"network_node_id"
type=
"string"
path=
"networkNodeID"
schema=
"ng3"
/>
</featureType>
<!-- Weather Data -->
<featureType
id=
"ng3_WeatherDataType"
table=
"ng3_weather_data"
objectClassId=
"11043"
path=
"WeatherData"
schema=
"ng3"
>
<extension
base=
"AbstractFeatureType"
>
<join
table=
"cityobject"
fromColumn=
"id"
toColumn=
"id"
toRole=
"parent"
/>
</extension>
<complexAttribute
maxOccurs=
"1"
path=
"libraryCode"
schema=
"ng3"
>
<attribute
column=
"library_code"
type=
"string"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"library_code_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
<!-- Urban Space -->
<featureType
id=
"ng3_UrbanSpaceType"
table=
"ng3_resource"
objectClassId=
"11105"
path=
"UrbanSpace"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractResourceType"
/>
<complexAttribute
minOccurs=
"1"
maxOccurs=
"1"
path=
"type"
schema=
"ng3"
>
<attribute
column=
"type"
type=
"string"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"type_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
</complexAttribute>
<complexAttribute
minOccurs=
"1"
maxOccurs=
"1"
path=
"endUse"
schema=
"ng3"
>
<attribute
column=
"enduse"
type=
"string"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"enduse_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
</complexAttribute>
</featureType>
<!-- Waste -->
<featureType
id=
"ng3_WasteType"
table=
"ng3_resource"
objectClassId=
"11106"
path=
"Waste"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractResourceType"
/>
<complexAttribute
minOccurs=
"1"
maxOccurs=
"1"
path=
"type"
schema=
"ng3"
>
<attribute
column=
"type"
type=
"string"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"type_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
</complexAttribute>
<complexAttribute
minOccurs=
"1"
maxOccurs=
"1"
path=
"
valueTyp
e"
schema=
"ng3"
>
<attribute
column=
"
value_typ
e"
type=
"string"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"
value_typ
e_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
<complexAttribute
minOccurs=
"1"
maxOccurs=
"1"
path=
"
endUs
e"
schema=
"ng3"
>
<attribute
column=
"
endus
e"
type=
"string"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"
endus
e_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
</complexAttribute>
<complexAttribute
maxOccurs=
"1"
path=
"yearlyValue"
schema=
"ng3"
>
<attribute
column=
"yearly_value"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"yearly_value_uom"
type=
"string"
path=
"@uom"
schema=
"gml"
/>
<attribute
maxOccurs=
"1"
column=
"is_dangerous"
type=
"boolean"
path=
"isDangerous"
schema=
"ng3"
/>
<attribute
maxOccurs=
"1"
column=
"is_recyclable"
type=
"boolean"
path=
"isRecyclable"
schema=
"ng3"
/>
</featureType>
<!-- Water -->
<featureType
id=
"ng3_WaterType"
table=
"ng3_resource"
objectClassId=
"11107"
path=
"Water"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractResourceType"
/>
<complexAttribute
minOccurs=
"1"
maxOccurs=
"1"
path=
"type"
schema=
"ng3"
>
<attribute
column=
"type"
type=
"string"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"type_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
</complexAttribute>
<complexAttribute
minOccurs=
"1"
maxOccurs=
"1"
path=
"endUse"
schema=
"ng3"
>
<attribute
column=
"enduse"
type=
"string"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"enduse_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
</complexAttribute>
<featureProperty
maxOccurs=
"1"
target=
"ng3_AbstractTimeSeriesType"
path=
"timeSeries"
schema=
"ng3"
relationType=
"composition"
>
<join
table=
"ng3_time_series"
fromColumn=
"time_series_id"
toColumn=
"id"
toRole=
"parent"
>
<condition
column=
"objectclass_id"
value=
"${target.objectclass_id}"
type=
"integer"
/>
</join>
</featureProperty>
<geometryProperty
maxOccurs=
"1"
inlineColumn=
"position"
type=
"Point"
path=
"position"
schema=
"ng3"
/>
</featureType>
<!-- Abstract Layered Construction -->
<featureType
abstract=
"true"
id=
"ng3_AbstractLayeredConstructionType"
table=
"ng3_layered_construction"
objectClassId=
"11050"
path=
"AbstractLayeredConstruction"
schema=
"ng3"
>
<extension
base=
"AbstractFeatureType"
>
<!-- ******************************** -->
<!-- Material and Construction Module -->
<!-- ******************************** -->
<!-- Abstract Material -->
<featureType
abstract=
"true"
id=
"ng3_AbstractMaterialType"
table=
"ng3_material"
objectClassId=
"11111"
path=
"AbstractMaterial"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractADEFeatureType"
>
<join
table=
"cityobject"
fromColumn=
"id"
toColumn=
"id"
toRole=
"parent"
/>
</extension>
</featureType>
<!-- Layered Construction -->
<featureType
id=
"ng3_LayeredConstructionType"
table=
"ng3_layered_construction"
objectClassId=
"11051"
path=
"LayeredConstruction"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractLayeredConstructionType"
/>
<complexAttribute
maxOccurs=
"1"
path=
"libraryCode"
schema=
"ng3"
>
<attribute
column=
"library_code"
type=
"string"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"library_code_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
<!-- Gas -->
<featureType
id=
"ng3_GasType"
table=
"ng3_material"
objectClassId=
"11112"
path=
"Gas"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractMaterialType"
/>
<complexAttribute
minOccurs=
"1"
maxOccurs=
"1"
path=
"type"
schema=
"ng3"
>
<attribute
column=
"type"
type=
"string"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"type_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
</complexAttribute>
<complexAttribute
maxOccurs=
"1"
path=
"uValue"
schema=
"ng3"
>
<attribute
column=
"u_value"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"u_value_uom"
type=
"string"
path=
"@uom"
schema=
"gml"
/>
<attribute
maxOccurs=
"1"
column=
"is_ventilated"
type=
"boolean"
path=
"isVentilated"
schema=
"ng3"
/>
<complexAttribute
maxOccurs=
"1"
path=
"rValue"
schema=
"ng3"
>
<attribute
column=
"r_value"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"r_value_uom"
type=
"string"
path=
"@uom"
schema=
"gml"
/>
</complexAttribute>
<complexAttribute
maxOccurs=
"1"
path=
"gValue"
schema=
"ng3"
>
<attribute
column=
"g_value"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"g_value_uom"
type=
"string"
path=
"@uom"
schema=
"gml"
/>
</featureType>
<!-- Liquid -->
<featureType
id=
"ng3_LiquidType"
table=
"ng3_material"
objectClassId=
"11113"
path=
"Liquid"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractMaterialType"
/>
<complexAttribute
minOccurs=
"1"
maxOccurs=
"1"
path=
"type"
schema=
"ng3"
>
<attribute
column=
"type_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
<attribute
column=
"type"
type=
"string"
path=
"."
schema=
"ng3"
/>
</complexAttribute>
<complexAttribute
maxOccurs=
"1"
path=
"glazingRatio"
schema=
"ng3"
>
<attribute
column=
"glazing_ratio"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"glazing_ratio_uom"
type=
"string"
path=
"@uom"
schema=
"gml"
/>
<complexAttribute
maxOccurs=
"1"
path=
"thermalConductivity"
schema=
"ng3"
>
<attribute
column=
"thm_conductivity"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"thm_conductivity_uom"
type=
"string"
path=
"@uom"
schema=
"gml"
/>
</complexAttribute>
<complexAttribute
maxOccurs=
"1"
path=
"density"
schema=
"ng3"
>
<attribute
column=
"density"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"density_uom"
type=
"string"
path=
"@uom"
schema=
"gml"
/>
</complexAttribute>
<complexAttribute
maxOccurs=
"1"
path=
"specificHeatCapacity"
schema=
"ng3"
>
<attribute
column=
"spec_heat_capacity"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"spec_heat_capacity_uom"
type=
"string"
path=
"@uom"
schema=
"gml"
/>
</complexAttribute>
<complexAttribute
maxOccurs=
"1"
path=
"viscosity"
schema=
"ng3"
>
<attribute
column=
"viscosity"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"viscosity_uom"
type=
"string"
path=
"@uom"
schema=
"gml"
/>
</complexAttribute>
</featureType>
<!-- Solid Material -->
<featureType
id=
"ng3_SolidMaterialType"
table=
"ng3_material"
objectClassId=
"11114"
path=
"SolidMaterial"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractMaterialType"
/>
<complexAttribute
minOccurs=
"1"
maxOccurs=
"1"
path=
"type"
schema=
"ng3"
>
<attribute
column=
"type"
type=
"string"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"type_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
</complexAttribute>
<attribute
minOccurs=
"1"
maxOccurs=
"1"
column=
"is_transparent"
type=
"boolean"
path=
"isTransparent"
schema=
"ng3"
/>
<complexProperty
refType=
"ng3_AbsorptanceType"
path=
"absorptance"
schema=
"ng3"
>
<join
table=
"ng3_optical_property"
fromColumn=
"id"
toColumn=
"material_id"
toRole=
"child"
>
<condition
column=
"objectclass_id"
value=
"${target.objectclass_id}"
type=
"integer"
/>
</join>
</complexProperty>
<complexProperty
refType=
"ng3_EmissivityType"
path=
"emissivity"
schema=
"ng3"
>
<join
table=
"ng3_optical_property"
fromColumn=
"id"
toColumn=
"
layered_construction
_id"
toRole=
"child"
>
<join
table=
"ng3_optical_property"
fromColumn=
"id"
toColumn=
"
material
_id"
toRole=
"child"
>
<condition
column=
"objectclass_id"
value=
"${target.objectclass_id}"
type=
"integer"
/>
</join>
</complexProperty>
<complexProperty
refType=
"ng3_ReflectanceType"
path=
"reflectance"
schema=
"ng3"
>
<join
table=
"ng3_optical_property"
fromColumn=
"id"
toColumn=
"
layered_construction
_id"
toRole=
"child"
>
<join
table=
"ng3_optical_property"
fromColumn=
"id"
toColumn=
"
material
_id"
toRole=
"child"
>
<condition
column=
"objectclass_id"
value=
"${target.objectclass_id}"
type=
"integer"
/>
</join>
</complexProperty>
<complexProperty
refType=
"ng3_TransmittanceType"
path=
"transmittance"
schema=
"ng3"
>
<join
table=
"ng3_optical_property"
fromColumn=
"id"
toColumn=
"
layered_construction
_id"
toRole=
"child"
>
<join
table=
"ng3_optical_property"
fromColumn=
"id"
toColumn=
"
material
_id"
toRole=
"child"
>
<condition
column=
"objectclass_id"
value=
"${target.objectclass_id}"
type=
"integer"
/>
</join>
</complexProperty>
<featureProperty
target=
"ng3_LayerType"
path=
"layer"
schema=
"ng3"
relationType=
"composition"
>
<join
table=
"ng3_layer"
fromColumn=
"id"
toColumn=
"layered_construction_id"
toRole=
"child"
/>
</featureProperty>
</featureType>
<!-- Reverse Layered Construction -->
<featureType
id=
"ng3_ReverseLayeredConstructionType"
table=
"ng3_layered_construction"
objectClassId=
"11052"
path=
"ReverseLayeredConstruction"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractLayeredConstructionType"
/>
<featureProperty
minOccurs=
"1"
maxOccurs=
"1"
target=
"ng3_LayeredConstructionType"
path=
"baseLayeredConstruction"
schema=
"ng3"
relationType=
"association"
>
<join
table=
"ng3_layered_construction"
fromColumn=
"layered_construction_id"
toColumn=
"id"
toRole=
"parent"
>
<condition
column=
"objectclass_id"
value=
"${target.objectclass_id}"
type=
"integer"
/>
</join>
</featureProperty>
</featureType>
<!-- Layer -->
<featureType
id=
"ng3_LayerType"
table=
"ng3_layer"
objectClassId=
"11053"
path=
"Layer"
schema=
"ng3"
>
<extension
base=
"AbstractFeatureType"
>
<join
table=
"cityobject"
fromColumn=
"id"
toColumn=
"id"
toRole=
"parent"
/>
</extension>
<complexAttribute
minOccurs=
"1"
maxOccurs=
"1"
path=
"thickness"
schema=
"ng3"
>
<attribute
column=
"thickness"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"thickness_uom"
type=
"string"
path=
"@uom"
schema=
"gml"
/>
</complexAttribute>
<featureProperty
minOccurs=
"1"
maxOccurs=
"1"
target=
"ng3_AbstractMaterialType"
path=
"material"
schema=
"ng3"
relationType=
"aggregation"
>
<join
table=
"ng3_material"
fromColumn=
"material_id"
toColumn=
"id"
toRole=
"parent"
>
<condition
column=
"objectclass_id"
value=
"${target.objectclass_id}"
type=
"integer"
/>
</join>
</featureProperty>
</featureType>
<!-- Abstract Material -->
<featureType
abstract=
"true"
id=
"ng3_AbstractMaterialType"
table=
"ng3_material"
objectClassId=
"11054"
path=
"AbstractMaterial"
schema=
"ng3"
>
<extension
base=
"AbstractFeatureType"
>
<join
table=
"cityobject"
fromColumn=
"id"
toColumn=
"id"
toRole=
"parent"
/>
</extension>
<complexAttribute
maxOccurs=
"1"
path=
"libraryCode"
schema=
"ng3"
>
<attribute
column=
"library_code"
type=
"string"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"library_code_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
</complexAttribute>
</featureType>
<!-- Solid Material -->
<featureType
id=
"ng3_SolidMaterialType"
table=
"ng3_material"
objectClassId=
"11055"
path=
"SolidMaterial"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractMaterialType"
/>
<complexAttribute
maxOccurs=
"1"
path=
"thermalConductivity"
schema=
"ng3"
>
<attribute
column=
"thm_conductivity"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"thm_conductivity_uom"
type=
"string"
path=
"@uom"
schema=
"gml"
/>
...
...
@@ -578,270 +958,333 @@ https://3d.bk.tudelft.nl/gagugiaro/
</complexAttribute>
</featureType>
<!-- Gas -->
<featureType
id=
"ng3_GasType"
table=
"ng3_material"
objectClassId=
"11056"
path=
"Gas"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractMaterialType"
/>
<attribute
maxOccurs=
"1"
column=
"is_ventilated"
type=
"boolean"
path=
"isVentilated"
schema=
"ng3"
/>
<complexAttribute
maxOccurs=
"1"
path=
"rValue"
schema=
"ng3"
>
<attribute
column=
"r_value"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"r_value_uom"
type=
"string"
path=
"@uom"
schema=
"gml"
/>
</complexAttribute>
</featureType>
<!--
AbstractResource
-->
<featureType
abstract=
"true"
id=
"ng3_AbstractResource
Type"
table=
"ng3_
resource
"
objectClassId=
"11
070
"
path=
"
AbstractResource
"
schema=
"ng3"
>
<extension
base=
"AbstractFeatureType"
>
<!--
Layer
-->
<featureType
id=
"ng3_Layer
Type"
table=
"ng3_
layer
"
objectClassId=
"11
115
"
path=
"
Layer
"
schema=
"ng3"
>
<extension
base=
"
ng3_
Abstract
ADE
FeatureType"
>
<join
table=
"cityobject"
fromColumn=
"id"
toColumn=
"id"
toRole=
"parent"
/>
</extension>
<attribute
minOccurs=
"1"
maxOccurs=
"1"
column=
"status"
type=
"string"
path=
"status"
schema=
"ng3"
/>
<complexAttribute
minOccurs=
"1"
maxOccurs=
"1"
path=
"operationType"
schema=
"ng3"
>
<attribute
column=
"operation_type"
type=
"string"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"operation_type_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
</complexAttribute>
<complexAttribute
minOccurs=
"1"
maxOccurs=
"1"
path=
"amountType"
schema=
"ng3"
>
<attribute
column=
"amount_type"
type=
"string"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"amount_type_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
</complexAttribute>
<complexAttribute
maxOccurs=
"1"
path=
"amount"
schema=
"ng3"
>
<attribute
column=
"amount"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"amount_uom"
type=
"string"
path=
"@uom"
schema=
"gml"
/>
<complexAttribute
minOccurs=
"1"
maxOccurs=
"1"
path=
"thickness"
schema=
"ng3"
>
<attribute
column=
"thickness"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"thickness_uom"
type=
"string"
path=
"@uom"
schema=
"gml"
/>
</complexAttribute>
<featureProperty
maxOccurs=
"1"
target=
"ng3_Abstract
TimeS
eri
es
Type"
path=
"
timeDependentAmount
"
schema=
"ng3"
relationType=
"
composi
tion"
>
<join
table=
"ng3_
time_s
eri
es
"
fromColumn=
"
time_s
eri
es
_id"
toColumn=
"id"
toRole=
"parent"
>
<featureProperty
minOccurs=
"1"
maxOccurs=
"1"
target=
"ng3_Abstract
Mat
eri
al
Type"
path=
"
material
"
schema=
"ng3"
relationType=
"
aggrega
tion"
>
<join
table=
"ng3_
mat
eri
al
"
fromColumn=
"
mat
eri
al
_id"
toColumn=
"id"
toRole=
"parent"
>
<condition
column=
"objectclass_id"
value=
"${target.objectclass_id}"
type=
"integer"
/>
</join>
</featureProperty>
<attribute
minOccurs=
"1"
maxOccurs=
"1"
column=
"is_amount_normalized"
type=
"boolean"
path=
"isAmountNormalized"
schema=
"ng3"
/>
<complexAttribute
maxOccurs=
"1"
path=
"normalizationValue"
schema=
"ng3"
>
<attribute
column=
"normalization_value"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"normalization_value_uom"
type=
"string"
path=
"@uom"
schema=
"gml"
/>
</complexAttribute>
<attribute
column=
"normalization_param"
type=
"string"
maxOccurs=
"1"
path=
"normalizationParameter"
schema=
"ng3"
/>
<complexAttribute
maxOccurs=
"1"
path=
"co2Equivalent"
schema=
"ng3"
>
<attribute
column=
"co2_equivalent"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"co2_equivalent_uom"
type=
"string"
path=
"@uom"
schema=
"gml"
/>
</complexAttribute>
<attribute
maxOccurs=
"1"
column=
"year"
type=
"integer"
path=
"year"
schema=
"ng3"
/>
<complexAttribute
maxOccurs=
"1"
path=
"costsMoney"
schema=
"ng3"
>
<attribute
column=
"costs_money"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"co2_equivalent_uom"
type=
"string"
path=
"@uom"
schema=
"gml"
/>
</complexAttribute>
<complexAttribute
maxOccurs=
"1"
path=
"yieldsMoney"
schema=
"ng3"
>
<attribute
column=
"yields_money"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"yields_money_uom"
type=
"string"
path=
"@uom"
schema=
"gml"
/>
</complexAttribute>
</featureType>
<!-- Resources: Construction Material -->
<featureType
id=
"ng3_ConstructionMaterialType"
table=
"ng3_resource"
objectClassId=
"11071"
path=
"ConstructionMaterial"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractResourceType"
/>
<complexAttribute
minOccurs=
"1"
maxOccurs=
"1"
path=
"type"
schema=
"ng3"
>
<attribute
column=
"type"
type=
"string"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"type_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
</complexAttribute>
<complexAttribute
minOccurs=
"1"
maxOccurs=
"1"
path=
"endUse"
schema=
"ng3"
>
<attribute
column=
"enduse"
type=
"string"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"enduse_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
</complexAttribute>
</featureType>
<!--
Resources: Energy
-->
<featureType
id=
"ng3_
EnergyType"
table=
"ng3_resource
"
objectClassId=
"11
072
"
path=
"
Energy
"
schema=
"ng3"
>
<extension
base=
"ng3_Abstract
Resource
Type"
/>
<!--
Layered Construction
-->
<featureType
id=
"ng3_
LayeredConstructionType"
table=
"ng3_layered_construction
"
objectClassId=
"11
116
"
path=
"
LayeredConstruction
"
schema=
"ng3"
>
<extension
base=
"ng3_Abstract
LayeredConstruction
Type"
/>
<complexAttribute
minOccurs=
"1"
maxOccurs=
"1"
path=
"type"
schema=
"ng3"
>
<attribute
column=
"type"
type=
"string"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"type_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
</complexAttribute>
<complexAttribute
minOccurs=
"1"
maxOccurs=
"1"
path=
"
endUs
e"
schema=
"ng3"
>
<attribute
column=
"
endus
e"
type=
"
string
"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"
enduse_codespace
"
type=
"string"
path=
"@
codespace
"
schema=
"gml"
/>
<complexAttribute
maxOccurs=
"1"
path=
"
uValu
e"
schema=
"ng3"
>
<attribute
column=
"
u_valu
e"
type=
"
double
"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"
u_value_uom
"
type=
"string"
path=
"@
uom
"
schema=
"gml"
/>
</complexAttribute>
<complexAttribute
maxOccurs=
"1"
path=
"
energyCarrier
"
schema=
"ng3"
>
<attribute
column=
"
energy_carrier
"
type=
"
string
"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"
energy_carrier_codespace
"
type=
"string"
path=
"@
codespace
"
schema=
"gml"
/>
<complexAttribute
maxOccurs=
"1"
path=
"
gValue
"
schema=
"ng3"
>
<attribute
column=
"
g_value
"
type=
"
double
"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"
g_value_uom
"
type=
"string"
path=
"@
uom
"
schema=
"gml"
/>
</complexAttribute>
<complexAttribute
maxOccurs=
"1"
path=
"
maximumLoad
"
schema=
"ng3"
>
<attribute
column=
"
maximum_load
"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"
maximum_load
_uom"
type=
"string"
path=
"@uom"
schema=
"gml"
/>
<complexAttribute
maxOccurs=
"1"
path=
"
glazingRatio
"
schema=
"ng3"
>
<attribute
column=
"
glazing_ratio
"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"
glazing_ratio
_uom"
type=
"string"
path=
"@uom"
schema=
"gml"
/>
</complexAttribute>
<complexAttribute
maxOccurs=
"1"
path=
"source"
schema=
"ng3"
>
<attribute
column=
"source"
type=
"string"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"source_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
<complexProperty
refType=
"ng3_AbsorptanceType"
path=
"absorptance"
schema=
"ng3"
>
<join
table=
"ng3_optical_property"
fromColumn=
"id"
toColumn=
"layered_constr_id"
toRole=
"child"
>
<condition
column=
"objectclass_id"
value=
"${target.objectclass_id}"
type=
"integer"
/>
</join>
</complexProperty>
<complexProperty
refType=
"ng3_EmissivityType"
path=
"emissivity"
schema=
"ng3"
>
<join
table=
"ng3_optical_property"
fromColumn=
"id"
toColumn=
"layered_constr_id"
toRole=
"child"
>
<condition
column=
"objectclass_id"
value=
"${target.objectclass_id}"
type=
"integer"
/>
</join>
</complexProperty>
<complexProperty
refType=
"ng3_ReflectanceType"
path=
"reflectance"
schema=
"ng3"
>
<join
table=
"ng3_optical_property"
fromColumn=
"id"
toColumn=
"layered_constr_id"
toRole=
"child"
>
<condition
column=
"objectclass_id"
value=
"${target.objectclass_id}"
type=
"integer"
/>
</join>
</complexProperty>
<complexProperty
refType=
"ng3_TransmittanceType"
path=
"transmittance"
schema=
"ng3"
>
<join
table=
"ng3_optical_property"
fromColumn=
"id"
toColumn=
"layered_constr_id"
toRole=
"child"
>
<condition
column=
"objectclass_id"
value=
"${target.objectclass_id}"
type=
"integer"
/>
</join>
</complexProperty>
<complexAttribute
maxOccurs=
"1"
path=
"insideConvectionCoefficient"
schema=
"ng3"
>
<attribute
column=
"inside_conv_coeff"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"inside_conv_coeff_uom"
type=
"string"
path=
"@uom"
schema=
"gml"
/>
</complexAttribute>
<complexAttribute
maxOccurs=
"1"
path=
"outsideConvectionCoefficient"
schema=
"ng3"
>
<attribute
column=
"outside_conv_coeff"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"outside_conv_coeff_uom"
type=
"string"
path=
"@uom"
schema=
"gml"
/>
</complexAttribute>
<featureProperty
target=
"ng3_LayerType"
path=
"layer"
schema=
"ng3"
relationType=
"composition"
>
<join
table=
"ng3_layer"
fromColumn=
"id"
toColumn=
"layered_constr_id"
toRole=
"child"
/>
</featureProperty>
</featureType>
<!-- Resources: Food -->
<featureType
id=
"ng3_FoodType"
table=
"ng3_resource"
objectClassId=
"11073"
path=
"Food"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractResourceType"
/>
<complexAttribute
minOccurs=
"1"
maxOccurs=
"1"
path=
"type"
schema=
"ng3"
>
<attribute
column=
"type"
type=
"string"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"type_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
</complexAttribute>
<complexAttribute
minOccurs=
"1"
maxOccurs=
"1"
path=
"endUse"
schema=
"ng3"
>
<attribute
column=
"enduse"
type=
"string"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"enduse_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
</complexAttribute>
<!-- Reverse Layered Construction -->
<featureType
id=
"ng3_ReverseLayeredConstructionType"
table=
"ng3_layered_construction"
objectClassId=
"11117"
path=
"ReverseLayeredConstruction"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractLayeredConstructionType"
/>
<featureProperty
minOccurs=
"1"
maxOccurs=
"1"
target=
"ng3_LayeredConstructionType"
path=
"baseLayeredConstruction"
schema=
"ng3"
relationType=
"association"
>
<join
table=
"ng3_layered_construction"
fromColumn=
"layered_constr_id"
toColumn=
"id"
toRole=
"parent"
>
<condition
column=
"objectclass_id"
value=
"${target.objectclass_id}"
type=
"integer"
/>
</join>
</featureProperty>
</featureType>
<!-- Resources: Other Resource -->
<featureType
id=
"ng3_OtherResourceType"
table=
"ng3_resource"
objectClassId=
"11074"
path=
"OtherResource"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractResourceType"
/>
<!-- Material Library -->
<featureType
topLevel=
"true"
id=
"ng3_MaterialLibraryType"
table=
"ng3_library"
objectClassId=
"11118"
path=
"MaterialLibrary"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractLibraryType"
/>
<featureProperty
target=
"ng3_AbstractMaterialType"
path=
"libraryMember"
schema=
"ng3"
relationType=
"composition"
>
<join
table=
"ng3_material"
fromColumn=
"id"
toColumn=
"library_id"
toRole=
"child"
>
<condition
column=
"objectclass_id"
value=
"${target.objectclass_id}"
type=
"integer"
/>
</join>
</featureProperty>
</featureType>
<!-- Layered Construction Library -->
<featureType
topLevel=
"true"
id=
"ng3_LayeredConstructionLibraryType"
table=
"ng3_library"
objectClassId=
"11119"
path=
"LayeredConstructionLibrary"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractLibraryType"
/>
<featureProperty
target=
"ng3_AbstractLayeredConstructionType"
path=
"libraryMember"
schema=
"ng3"
relationType=
"composition"
>
<join
table=
"ng3_layered_construction"
fromColumn=
"id"
toColumn=
"library_id"
toRole=
"child"
>
<condition
column=
"objectclass_id"
value=
"${target.objectclass_id}"
type=
"integer"
/>
</join>
</featureProperty>
</featureType>
<!-- ******************************** -->
<!-- Building module -->
<!-- ******************************** -->
<!-- Energy Performance Certificate -->
<featureType
id=
"ng3_EnergyPerformanceCertificateType"
table=
"ng3_energy_perf_cert"
objectClassId=
"11020"
path=
"EnergyPerformanceCertificate"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractFeatureWithLifeSpanType"
>
<join
table=
"ng3_cityobject"
fromColumn=
"id"
toColumn=
"id"
toRole=
"parent"
/>
</extension>
<complexAttribute
minOccurs=
"1"
maxOccurs=
"1"
path=
"type"
schema=
"ng3"
>
<attribute
column=
"type"
type=
"string"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"type_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
</complexAttribute>
<complexAttribute
minOccurs=
"1"
maxOccurs=
"1"
path=
"
endUs
e"
schema=
"ng3"
>
<attribute
column=
"
endus
e"
type=
"
string
"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"
enduse_codespace
"
type=
"string"
path=
"@
codespace
"
schema=
"gml"
/>
<complexAttribute
maxOccurs=
"1"
path=
"
valu
e"
schema=
"ng3"
>
<attribute
column=
"
valu
e"
type=
"
double
"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"
value_uom
"
type=
"string"
path=
"@
uom
"
schema=
"gml"
/>
</complexAttribute>
<attribute
minOccurs=
"1"
maxOccurs=
"1"
column=
"label"
type=
"string"
path=
"label"
schema=
"ng3"
/>
<attribute
maxOccurs=
"1"
column=
"cert_method"
type=
"string"
path=
"certificationMethod"
schema=
"ng3"
/>
</featureType>
<!-- Resources: Urban Space -->
<featureType
id=
"ng3_UrbanSpaceType"
table=
"ng3_resource"
objectClassId=
"11075"
path=
"UrbanSpace"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractResourceType"
/>
<!-- Refurbishment Measure -->
<featureType
id=
"ng3_RefurbishmentMeasureType"
table=
"ng3_refurbishment_measure"
objectClassId=
"11121"
path=
"RefurbishmentMeasure"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractFeatureWithLifeSpanType"
>
<join
table=
"ng3_cityobject"
fromColumn=
"id"
toColumn=
"id"
toRole=
"parent"
/>
</extension>
<complexAttribute
minOccurs=
"1"
maxOccurs=
"1"
path=
"type"
schema=
"ng3"
>
<attribute
column=
"type"
type=
"string"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"type_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
</complexAttribute>
<complexAttribute
minOccurs=
"1"
maxOccurs=
"1"
path=
"
endUse
"
schema=
"ng3"
>
<attribute
column=
"
end
us
e
"
type=
"string"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"
end
us
e
_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
<complexAttribute
minOccurs=
"1"
maxOccurs=
"1"
path=
"
status
"
schema=
"ng3"
>
<attribute
column=
"
stat
us"
type=
"string"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"
stat
us_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
</complexAttribute>
<attribute
column=
"start_date"
type=
"date"
maxOccurs=
"1"
path=
"refurbishmentStartDate"
schema=
"ng3"
/>
<attribute
column=
"end_date"
type=
"date"
maxOccurs=
"1"
path=
"refurbishmentEndDate"
schema=
"ng3"
/>
</featureType>
<!-- Resources: Waste -->
<featureType
id=
"ng3_WasteType"
table=
"ng3_resource"
objectClassId=
"11076"
path=
"Waste"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractResourceType"
/>
<!-- Occupants -->
<featureType
id=
"ng3_OccupantsType"
table=
"ng3_occupants"
objectClassId=
"11122"
path=
"Occupants"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractFeatureWithLifeSpanType"
>
<join
table=
"ng3_cityobject"
fromColumn=
"id"
toColumn=
"id"
toRole=
"parent"
/>
</extension>
<complexAttribute
minOccurs=
"1"
maxOccurs=
"1"
path=
"type"
schema=
"ng3"
>
<attribute
column=
"type"
type=
"string"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"type_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
</complexAttribute>
<complexAttribute
minOccurs=
"1"
maxOccurs=
"1"
path=
"endUse"
schema=
"ng3"
>
<attribute
column=
"enduse"
type=
"string"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"enduse_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
<attribute
maxOccurs=
"1"
column=
"num_of_occupants"
type=
"integer"
path=
"numberOfOccupants"
schema=
"ng3"
/>
<complexAttribute
maxOccurs=
"1"
path=
"heatDissipation"
schema=
"ng3"
>
<attribute
column=
"heat_diss"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"heat_diss_uom"
type=
"string"
path=
"@uom"
schema=
"gml"
/>
</complexAttribute>
<attribute
maxOccurs=
"1"
column=
"is_dangerous"
type=
"boolean"
path=
"isDangerous"
schema=
"ng3"
/>
<attribute
maxOccurs=
"1"
column=
"is_recyclable"
type=
"boolean"
path=
"isRecyclable"
schema=
"ng3"
/>
<complexAttribute
maxOccurs=
"1"
path=
"heatDissipationConvectiveFraction"
schema=
"ng3"
>
<attribute
column=
"heat_diss_conv"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"heat_diss_conv_uom"
type=
"string"
path=
"@uom"
schema=
"gml"
/>
</complexAttribute>
<complexAttribute
maxOccurs=
"1"
path=
"heatDissipationLatentFraction"
schema=
"ng3"
>
<attribute
column=
"heat_diss_lat"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"heat_diss_lat_uom"
type=
"string"
path=
"@uom"
schema=
"gml"
/>
</complexAttribute>
<complexAttribute
maxOccurs=
"1"
path=
"heatDissipationRadiantFraction"
schema=
"ng3"
>
<attribute
column=
"heat_diss_rad"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"heat_diss_rad_uom"
type=
"string"
path=
"@uom"
schema=
"gml"
/>
</complexAttribute>
<complexAttribute
maxOccurs=
"1"
path=
"averageDietType"
schema=
"ng3"
>
<attribute
column=
"avg_diet_type"
type=
"string"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"avg_diet_type_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
</complexAttribute>
<complexAttribute
maxOccurs=
"1"
path=
"averageIncomeLevel"
schema=
"ng3"
>
<attribute
column=
"avg_income_level"
type=
"string"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"avg_income_level_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
</complexAttribute>
<complexAttribute
maxOccurs=
"1"
path=
"averageInstructionLevel"
schema=
"ng3"
>
<attribute
column=
"avg_instr_level"
type=
"string"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"avg_instr_level_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
</complexAttribute>
<featureProperty
maxOccurs=
"1"
target=
"ng3_AbstractScheduleType"
path=
"occupancyRate"
schema=
"ng3"
relationType=
"aggregation"
>
<join
table=
"ng3_schedule"
fromColumn=
"schedule_id"
toColumn=
"id"
toRole=
"parent"
>
<condition
column=
"objectclass_id"
value=
"${target.objectclass_id}"
type=
"integer"
/>
</join>
</featureProperty>
</featureType>
<!-- Resources: Water -->
<featureType
id=
"ng3_WaterType"
table=
"ng3_resource"
objectClassId=
"11077"
path=
"Water"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractResourceType"
/>
<!-- Abstract Building Space -->
<featureType
abstract=
"true"
id=
"ng3_AbstractBuildingSpaceType"
table=
"ng3_space"
objectClassId=
"11123"
path=
"AbstractBuildingSpace"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractCityObjectSpaceType"
/>
<featureProperty
target=
"ng3_OccupantsType"
path=
"occupiedBy"
schema=
"ng3"
relationType=
"aggregation"
>
<join
table=
"ng3_occupants"
fromColumn=
"id"
toColumn=
"space_id"
toRole=
"child"
/>
</featureProperty>
</featureType>
<!-- Building Unit -->
<featureType
id=
"ng3_BuildingUnitType"
table=
"ng3_space"
objectClassId=
"11124"
path=
"BuildingUnit"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractBuildingSpaceType"
/>
<complexAttribute
minOccurs=
"1"
maxOccurs=
"1"
path=
"type"
schema=
"ng3"
>
<attribute
column=
"type"
type=
"string"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"type_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
</complexAttribute>
<complexAttribute
minOccurs=
"1"
maxOccurs=
"1"
path=
"endUse"
schema=
"ng3"
>
<attribute
column=
"enduse"
type=
"string"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"enduse_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
<attribute
maxOccurs=
"1"
column=
"num_of_rooms"
type=
"integer"
path=
"numberOfRooms"
schema=
"ng3"
/>
<attribute
maxOccurs=
"1"
column=
"owner_name"
type=
"string"
path=
"ownerName"
schema=
"ng3"
/>
<complexAttribute
maxOccurs=
"1"
path=
"ownershipType"
schema=
"ng3"
>
<attribute
column=
"ownership_type"
type=
"string"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"ownership_type_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
</complexAttribute>
<featureProperty
target=
"AddressType"
path=
"address"
schema=
"ng3"
relationType=
"association"
>
<joinTable
table=
"ng3_address_to_building_unit"
>
<join
table=
"ng3_space"
fromColumn=
"space_id"
toColumn=
"id"
toRole=
"parent"
/>
<inverseJoin
table=
"address"
fromColumn=
"address_id"
toColumn=
"id"
toRole=
"parent"
/>
</joinTable>
</featureProperty>
<featureProperty
target=
"ng3_EnergyPerformanceCertificateType"
path=
"energyPerformanceCertificate"
schema=
"ng3"
relationType=
"composition"
>
<join
table=
"ng3_energy_perf_cert"
fromColumn=
"id"
toColumn=
"space_id"
toRole=
"child"
/>
</featureProperty>
<featureProperty
target=
"ng3_RefurbishmentMeasureType"
path=
"refurbishmentMeasure"
schema=
"ng3"
relationType=
"composition"
>
<join
table=
"ng3_refurbishment_measure"
fromColumn=
"id"
toColumn=
"space_id"
toRole=
"child"
/>
</featureProperty>
</featureType>
<!-- Abstract Building Partition -->
<featureType
abstract=
"true"
id=
"ng3_AbstractBuildingPartitionType"
table=
"ng3_building_partition"
objectClassId=
"11080"
path=
"AbstractBuildingPartition"
schema=
"ng3"
>
<extension
base=
"AbstractCityObjectType"
>
<join
table=
"cityobject"
fromColumn=
"id"
toColumn=
"id"
toRole=
"parent"
/>
<!-- Abstract Zone Opening -->
<featureType
abstract=
"true"
id=
"ng3_AbstractZoneOpeningType"
table=
"ng3_zone_opening"
objectClassId=
"11131"
path=
"AbstractZoneOpening"
schema=
"ng3"
>
<extension
base=
"AbstractOpeningType"
>
<join
table=
"opening"
fromColumn=
"id"
toColumn=
"id"
toRole=
"parent"
/>
</extension>
<complexProperty
refType=
"ng3_QualifiedAreaType"
path=
"area"
schema=
"ng3"
>
<join
table=
"ng3_qualified_attribute"
fromColumn=
"id"
toColumn=
"building_partition_id"
toRole=
"child"
>
<condition
column=
"objectclass_id"
value=
"${target.objectclass_id}"
type=
"integer"
/>
</join>
</complexProperty>
<complexProperty
refType=
"ng3_QualifiedVolumeType"
path=
"volume"
schema=
"ng3"
>
<join
table=
"ng3_qualified_attribute"
fromColumn=
"id"
toColumn=
"building_partition_id"
toRole=
"child"
>
<condition
column=
"objectclass_id"
value=
"${target.objectclass_id}"
type=
"integer"
/>
</join>
</complexProperty>
<geometryProperty
maxOccurs=
"1"
lod=
"1"
refColumn=
"lod1_solid_id"
type=
"AbstractSolid"
path=
"lod1Solid"
schema=
"ng3"
/>
<geometryProperty
maxOccurs=
"1"
lod=
"2"
refColumn=
"lod2_solid_id"
type=
"AbstractSolid"
path=
"lod2Solid"
schema=
"ng3"
/>
<geometryProperty
maxOccurs=
"1"
lod=
"3"
refColumn=
"lod3_solid_id"
type=
"AbstractSolid"
path=
"lod3Solid"
schema=
"ng3"
/>
</featureType>
<!-- Abstract Thermal Zone -->
<featureType
abstract=
"true"
id=
"ng3_AbstractThermalZoneType"
table=
"ng3_building_partition"
objectClassId=
"11045"
path=
"AbstractThermalZone"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractBuildingPartitionType"
/>
<featureProperty
target=
"ng3_AbstractUsageZoneType"
path=
"usageZone"
schema=
"ng3"
relationType=
"association"
>
<join
table=
"ng3_building_partition"
fromColumn=
"id"
toColumn=
"thermal_zone_id"
toRole=
"child"
>
<!-- Abstract Zone Door -->
<featureType
id=
"ng3_ZoneDoorType"
table=
"ng3_zone_opening"
objectClassId=
"11132"
path=
"ZoneDoor"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractZoneOpeningType"
/>
</featureType>
<!-- Abstract Zone Window -->
<featureType
id=
"ng3_ZoneWindowType"
table=
"ng3_zone_opening"
objectClassId=
"11133"
path=
"ZoneWindow"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractZoneOpeningType"
/>
</featureType>
<!-- Abstract Zone Boundary Surface -->
<featureType
abstract=
"true"
id=
"ng3_AbstractZoneBoundarySurfaceType"
table=
"ng3_zone_thematic_surface"
objectClassId=
"11141"
path=
"AbstractZoneBoundarySurface"
schema=
"ng3"
>
<extension
base=
"AbstractBoundarySurfaceType"
>
<join
table=
"thematic_surface"
fromColumn=
"id"
toColumn=
"id"
toRole=
"parent"
/>
</extension>
<featureProperty
target=
"ng3_AbstractZoneOpeningType"
path=
"zoneOpening"
schema=
"ng3"
relationType=
"composition"
>
<join
table=
"ng3_zone_opening"
fromColumn=
"id"
toColumn=
"zone_them_surf_id"
toRole=
"child"
>
<condition
column=
"objectclass_id"
value=
"${target.objectclass_id}"
type=
"integer"
/>
</join>
</featureProperty>
</featureType>
<!-- Thermal Zone -->
<featureType
id=
"ng3_ThermalZoneType"
table=
"ng3_building_partition"
objectClassId=
"11081"
path=
"ThermalZone"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractThermalZoneType"
/>
<complexAttribute
maxOccurs=
"1"
path=
"heatCapacity"
schema=
"ng3"
>
<attribute
column=
"heat_capacity"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"heat_capacity_uom"
type=
"string"
path=
"@uom"
schema=
"gml"
/>
</complexAttribute>
<complexAttribute
maxOccurs=
"1"
path=
"infiltrationRate"
schema=
"ng3"
>
<attribute
column=
"infiltration_rate"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"infiltration_rate_uom"
type=
"string"
path=
"@uom"
schema=
"gml"
/>
</complexAttribute>
<attribute
minOccurs=
"1"
maxOccurs=
"1"
column=
"is_cooled"
type=
"boolean"
path=
"isCooled"
schema=
"ng3"
/>
<attribute
minOccurs=
"1"
maxOccurs=
"1"
column=
"is_heated"
type=
"boolean"
path=
"isHeated"
schema=
"ng3"
/>
<attribute
minOccurs=
"1"
maxOccurs=
"1"
column=
"coincides_with_lod2_hull"
type=
"boolean"
path=
"coincidesWithLod2Hull"
schema=
"ng3"
/>
<attribute
minOccurs=
"1"
maxOccurs=
"1"
column=
"coincides_with_lod3_hull"
type=
"boolean"
path=
"coincidesWithLod3Hull"
schema=
"ng3"
/>
<featureProperty
target=
"AbstractBoundarySurfaceType"
path=
"thermalBoundary"
schema=
"ng3"
relationType=
"composition"
>
<joinTable
table=
"ng3_them_surf_to_thermal_zone"
>
<join
table=
"ng3_building_partition"
fromColumn=
"thermal_zone_id"
toColumn=
"id"
toRole=
"parent"
/>
<inverseJoin
table=
"thematic_surface"
fromColumn=
"thematic_surface_id"
toColumn=
"id"
toRole=
"parent"
>
<condition
column=
"objectclass_id"
value=
"${target.objectclass_id}"
type=
"integer"
/>
</inverseJoin>
</joinTable>
</featureProperty>
<!-- To be tested: Improved version that does not require the association table -->
<!--
<featureProperty target="AbstractBoundarySurfaceType" path="thermalBoundary" schema="ng3">
<joinTable table="ng3_thematic_surface">
<join table="ng3_building_partition" fromColumn="id" toColumn="thermal_zone_id" toRole="parent"/>
<inverseJoin table="thematic_surface" fromColumn="id" toColumn="id" toRole="parent">
<condition column="objectclass_id" value="${target.objectclass_id}" type="integer"/>
</inverseJoin>
</joinTable>
</featureProperty>
-->
</featureType>
<!-- Attic Floor Surface -->
<featureType
id=
"ng3_AtticFloorSurfaceType"
table=
"thematic_surface"
objectClassId=
"11
08
2"
path=
"AtticFloorSurface"
schema=
"ng3"
>
<extension
base=
"AbstractBoundarySurfaceType"
/>
<!--
Zone
Attic Floor Surface -->
<featureType
id=
"ng3_AtticFloorSurfaceType"
table=
"
ng3_zone_
thematic_surface"
objectClassId=
"11
14
2"
path=
"AtticFloorSurface"
schema=
"ng3"
>
<extension
base=
"
ng3_
Abstract
Zone
BoundarySurfaceType"
/>
</featureType>
<!-- Basement Ceiling Surface -->
<featureType
id=
"ng3_BasementCeilingSurfaceType"
table=
"thematic_surface"
objectClassId=
"11083"
path=
"BasementCeilingSurface"
schema=
"ng3"
>
<extension
base=
"AbstractBoundarySurfaceType"
/>
<!-- Zone Basement Ceiling Surface -->
<featureType
id=
"ng3_BasementCeilingSurfaceType"
table=
"ng3_zone_thematic_surface"
objectClassId=
"11143"
path=
"BasementCeilingSurface"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractZoneBoundarySurfaceType"
/>
</featureType>
<!-- Zone Closure Surface -->
<featureType
id=
"ng3_ZoneClosureSurfaceType"
table=
"ng3_zone_thematic_surface"
objectClassId=
"11144"
path=
"ZoneClosureSurface"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractZoneBoundarySurfaceType"
/>
</featureType>
<!-- Zone Exterior Wall Surface -->
<featureType
id=
"ng3_ZoneExteriorWallSurfaceType"
table=
"ng3_zone_thematic_surface"
objectClassId=
"11145"
path=
"ZoneExteriorWallSurface"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractZoneBoundarySurfaceType"
/>
</featureType>
<!-- Zone Ground Surface -->
<featureType
id=
"ng3_ZoneGroundSurfaceType"
table=
"ng3_zone_thematic_surface"
objectClassId=
"11146"
path=
"ZoneGroundSurface"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractZoneBoundarySurfaceType"
/>
</featureType>
<!-- Intermediate Floor Surface -->
<featureType
id=
"ng3_IntermediateFloorSurfaceType"
table=
"thematic_surface"
objectClassId=
"11084"
path=
"IntermediateFloorSurface"
schema=
"ng3"
>
<extension
base=
"AbstractBoundarySurfaceType"
/>
<!-- Zone Intermediate Floor Surface -->
<featureType
id=
"ng3_IntermediateFloorSurfaceType"
table=
"ng3_zone_thematic_surface"
objectClassId=
"11147"
path=
"IntermediateFloorSurface"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractZoneBoundarySurfaceType"
/>
</featureType>
<!-- Party Wall Surface -->
<featureType
id=
"ng3_PartyWallSurfaceType"
table=
"thematic_surface"
objectClassId=
"11085"
path=
"PartyWallSurface"
schema=
"ng3"
>
<extension
base=
"AbstractBoundarySurfaceType"
/>
<!-- Zone Roof Surface -->
<featureType
id=
"ng3_ZoneRoofSurfaceType"
table=
"ng3_zone_thematic_surface"
objectClassId=
"11148"
path=
"ZoneRoofSurface"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractZoneBoundarySurfaceType"
/>
</featureType>
<!-- Abstract Usage Zone -->
<featureType
abstract=
"true"
id=
"ng3_AbstractUsageZoneType"
table=
"ng3_building_partition"
objectClassId=
"11090"
path=
"AbstractUsageZone"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractBuildingPartitionType"
/>
<featureProperty
target=
"ng3_AbstractBuildingUnitType"
path=
"buildingUnit"
schema=
"ng3"
relationType=
"association"
>
<join
table=
"ng3_building_partition"
fromColumn=
"id"
toColumn=
"usage_zone_id"
toRole=
"child"
>
<condition
column=
"objectclass_id"
value=
"${target.objectclass_id}"
type=
"integer"
/>
</join>
</featureProperty>
<!-- Zone Underground Wall Surface -->
<featureType
id=
"ng3_ZoneUndergroundWallSurfaceType"
table=
"ng3_zone_thematic_surface"
objectClassId=
"11149"
path=
"ZoneUndergroundWallSurface"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractZoneBoundarySurfaceType"
/>
</featureType>
<!-- Usage Zone -->
<featureType
id=
"ng3_UsageZoneType"
table=
"ng3_building_partition"
objectClassId=
"11091"
path=
"UsageZone"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractUsageZoneType"
/>
<!-- Abstract Zone -->
<featureType
abstract=
"true"
id=
"ng3_AbstractZoneType"
table=
"ng3_space"
objectClassId=
"11151"
path=
"AbstractZone"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractBuildingSpaceType"
/>
<complexAttribute
minOccurs=
"1"
maxOccurs=
"1"
path=
"type"
schema=
"ng3"
>
<attribute
column=
"type"
type=
"string"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"type_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
</complexAttribute>
<attribute
column=
"is_primary"
type=
"boolean"
maxOccurs=
"1"
path=
"isPrimary"
schema=
"ng3"
/>
<attribute
column=
"num_of_building_units"
type=
"integer"
maxOccurs=
"1"
path=
"numberOfBuildingUnits"
schema=
"ng3"
/>
<attribute
maxOccurs=
"1"
column=
"is_cooled"
type=
"boolean"
path=
"isCooled"
schema=
"ng3"
/>
<attribute
maxOccurs=
"1"
column=
"is_heated"
type=
"boolean"
path=
"isHeated"
schema=
"ng3"
/>
<attribute
maxOccurs=
"1"
column=
"is_mech_ventilated"
type=
"boolean"
path=
"isMechanicallyVentilated"
schema=
"ng3"
/>
<complexAttribute
maxOccurs=
"1"
path=
"infiltrationRate"
schema=
"ng3"
>
<attribute
column=
"infiltration_rate"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"infiltration_rate_uom"
type=
"string"
path=
"@uom"
schema=
"gml"
/>
</complexAttribute>
<complexAttribute
maxOccurs=
"1"
path=
"heatCapacity"
schema=
"ng3"
>
<attribute
column=
"heat_capacity"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"heat_capacity_uom"
type=
"string"
path=
"@uom"
schema=
"gml"
/>
</complexAttribute>
<complexAttribute
maxOccurs=
"1"
path=
"internalHeatGains"
schema=
"ng3"
>
<attribute
column=
"int_heat_gains"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"int_heat_gains_uom"
type=
"string"
path=
"@uom"
schema=
"gml"
/>
...
...
@@ -858,184 +1301,81 @@ https://3d.bk.tudelft.nl/gagugiaro/
<attribute
column=
"int_heat_gains_rad"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"int_heat_gains_rad_uom"
type=
"string"
path=
"@uom"
schema=
"gml"
/>
</complexAttribute>
<featureProperty
maxOccurs=
"1"
target=
"ng3_AbstractScheduleType"
path=
"coolingSchedule"
schema=
"ng3"
relationType=
"aggregation"
>
<join
table=
"ng3_schedule"
fromColumn=
"cooling_schedule_id"
toColumn=
"id"
toRole=
"parent"
>
<attribute
minOccurs=
"1"
maxOccurs=
"1"
column=
"coincides_with_lod2_hull"
type=
"boolean"
path=
"coincidesWithLod2Hull"
schema=
"ng3"
/>
<attribute
minOccurs=
"1"
maxOccurs=
"1"
column=
"coincides_with_lod3_hull"
type=
"boolean"
path=
"coincidesWithLod3Hull"
schema=
"ng3"
/>
<featureProperty
target=
"ng3_AbstractScheduleType"
maxOccurs=
"1"
path=
"heatingSchedule"
schema=
"ng3"
relationType=
"aggregation"
>
<join
table=
"ng3_schedule"
fromColumn=
"heat_schedule_id"
toColumn=
"id"
toRole=
"parent"
>
<condition
column=
"objectclass_id"
value=
"${target.objectclass_id}"
type=
"integer"
/>
</join>
</featureProperty>
<featureProperty
maxOccurs=
"1"
target=
"ng3_AbstractScheduleType"
path=
"
heat
ingSchedule"
schema=
"ng3"
relationType=
"aggregation"
>
<join
table=
"ng3_schedule"
fromColumn=
"
heating
_schedule_id"
toColumn=
"id"
toRole=
"parent"
>
<featureProperty
target=
"ng3_AbstractScheduleType"
maxOccurs=
"1"
path=
"
cool
ingSchedule"
schema=
"ng3"
relationType=
"aggregation"
>
<join
table=
"ng3_schedule"
fromColumn=
"
cool
_schedule_id"
toColumn=
"id"
toRole=
"parent"
>
<condition
column=
"objectclass_id"
value=
"${target.objectclass_id}"
type=
"integer"
/>
</join>
</featureProperty>
<featureProperty
maxOccurs=
"1"
target=
"ng3_AbstractScheduleType"
path=
"v
entilationSchedule"
schema=
"ng3"
relationType=
"aggregation"
>
<join
table=
"ng3_schedule"
fromColumn=
"
ventilation
_schedule_id"
toColumn=
"id"
toRole=
"parent"
>
<featureProperty
target=
"ng3_AbstractScheduleType"
maxOccurs=
"1"
path=
"mechanicalV
entilationSchedule"
schema=
"ng3"
relationType=
"aggregation"
>
<join
table=
"ng3_schedule"
fromColumn=
"
mech_vent
_schedule_id"
toColumn=
"id"
toRole=
"parent"
>
<condition
column=
"objectclass_id"
value=
"${target.objectclass_id}"
type=
"integer"
/>
</join>
</featureProperty>
<featureProperty
target=
"ng3_OccupantsType"
path=
"occupiedBy"
schema=
"ng3"
relationType=
"aggregation"
>
<join
table=
"ng3_occupants"
fromColumn=
"id"
toColumn=
"building_partition_id"
toRole=
"child"
/>
</featureProperty>
</featureType>
<!-- Abstract Building Unit -->
<featureType
abstract=
"true"
id=
"ng3_AbstractBuildingUnitType"
table=
"ng3_building_partition"
objectClassId=
"11092"
path=
"AbstractBuildingUnit"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractBuildingPartitionType"
/>
</featureType>
<!-- Building Unit -->
<featureType
id=
"ng3_BuildingUnitType"
table=
"ng3_building_partition"
objectClassId=
"11093"
path=
"BuildingUnit"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractBuildingUnitType"
/>
<complexAttribute
minOccurs=
"1"
maxOccurs=
"1"
path=
"type"
schema=
"ng3"
>
<attribute
column=
"type"
type=
"string"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"type_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
</complexAttribute>
<attribute
maxOccurs=
"1"
column=
"num_of_rooms"
type=
"integer"
path=
"numberOfRooms"
schema=
"ng3"
/>
<attribute
maxOccurs=
"1"
column=
"owner_name"
type=
"string"
path=
"ownerName"
schema=
"ng3"
/>
<complexAttribute
maxOccurs=
"1"
path=
"ownershipType"
schema=
"ng3"
>
<attribute
column=
"ownership_type"
type=
"string"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"ownership_type_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
</complexAttribute>
<featureProperty
target=
"AddressType"
path=
"address"
schema=
"ng3"
relationType=
"association"
>
<joinTable
table=
"ng3_address_to_building_unit"
>
<join
table=
"ng3_building_partition"
fromColumn=
"building_unit_id"
toColumn=
"id"
toRole=
"parent"
/>
<inverseJoin
table=
"address"
fromColumn=
"address_id"
toColumn=
"id"
toRole=
"parent"
/>
</joinTable>
</featureProperty>
<featureProperty
target=
"ng3_EnergyPerformanceCertificateType"
path=
"energyPerformanceCertificate"
schema=
"ng3"
relationType=
"composition"
>
<join
table=
"ng3_energy_perf_cert"
fromColumn=
"id"
toColumn=
"building_partition_id"
toRole=
"child"
/>
</featureProperty>
<featureProperty
target=
"ng3_RefurbishmentMeasureType"
path=
"refurbishmentMeasure"
schema=
"ng3"
relationType=
"composition"
>
<join
table=
"ng3_refurbishment_measure"
fromColumn=
"id"
toColumn=
"building_partition_id"
toRole=
"child"
/>
</featureProperty>
<featureProperty
target=
"ng3_OccupantsType"
path=
"occupiedBy"
schema=
"ng3"
relationType=
"aggregation"
>
<join
table=
"ng3_occupants"
fromColumn=
"id"
toColumn=
"building_partition_id"
toRole=
"child"
/>
<featureProperty
target=
"ng3_BuildingUnitType"
path=
"buildingUnit"
schema=
"ng3"
relationType=
"association"
>
<join
table=
"ng3_space"
fromColumn=
"id"
toColumn=
"building_unit_id"
toRole=
"child"
/>
</featureProperty>
</featureType>
<!-- Occupants -->
<featureType
id=
"ng3_OccupantsType"
table=
"ng3_occupants"
objectClassId=
"11094"
path=
"Occupants"
schema=
"ng3"
>
<extension
base=
"AbstractFeatureType"
>
<join
table=
"cityobject"
fromColumn=
"id"
toColumn=
"id"
toRole=
"parent"
/>
</extension>
<complexAttribute
minOccurs=
"1"
maxOccurs=
"1"
path=
"type"
schema=
"ng3"
>
<attribute
column=
"type_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
<attribute
column=
"type"
type=
"string"
path=
"."
schema=
"ng3"
/>
</complexAttribute>
<attribute
maxOccurs=
"1"
column=
"num_of_occupants"
type=
"integer"
path=
"numberOfOccupants"
schema=
"ng3"
/>
<complexAttribute
maxOccurs=
"1"
path=
"heatDissipation"
schema=
"ng3"
>
<attribute
column=
"heat_diss"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"heat_diss_uom"
type=
"string"
path=
"@uom"
schema=
"gml"
/>
</complexAttribute>
<complexAttribute
maxOccurs=
"1"
path=
"heatDissipationConvectiveFraction"
schema=
"ng3"
>
<attribute
column=
"heat_diss_conv"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"heat_diss_conv_uom"
type=
"string"
path=
"@uom"
schema=
"gml"
/>
</complexAttribute>
<complexAttribute
maxOccurs=
"1"
path=
"heatDissipationLatentFraction"
schema=
"ng3"
>
<attribute
column=
"heat_diss_lat"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"heat_diss_lat_uom"
type=
"string"
path=
"@uom"
schema=
"gml"
/>
</complexAttribute>
<complexAttribute
maxOccurs=
"1"
path=
"heatDissipationRadiantFraction"
schema=
"ng3"
>
<attribute
column=
"heat_diss_rad"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"heat_diss_rad_uom"
type=
"string"
path=
"@uom"
schema=
"gml"
/>
</complexAttribute>
<complexAttribute
maxOccurs=
"1"
path=
"averageDietType"
schema=
"ng3"
>
<attribute
column=
"avg_diet_type"
type=
"string"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"avg_diet_type_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
</complexAttribute>
<complexAttribute
maxOccurs=
"1"
path=
"averageIncomeLevel"
schema=
"ng3"
>
<attribute
column=
"avg_income_level"
type=
"string"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"avg_income_level_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
</complexAttribute>
<complexAttribute
maxOccurs=
"1"
path=
"averageInstructionLevel"
schema=
"ng3"
>
<attribute
column=
"avg_instr_level"
type=
"string"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"avg_instr_level_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
</complexAttribute>
<featureProperty
maxOccurs=
"1"
target=
"ng3_AbstractScheduleType"
path=
"occupancyRate"
schema=
"ng3"
relationType=
"aggregation"
>
<join
table=
"ng3_schedule"
fromColumn=
"schedule_id"
toColumn=
"id"
toRole=
"parent"
>
<featureProperty
target=
"ng3_AbstractZoneBoundarySurfaceType"
path=
"zoneBoundary"
schema=
"ng3"
relationType=
"composition"
>
<join
table=
"ng3_zone_thematic_surface"
fromColumn=
"id"
toColumn=
"space_id"
toRole=
"child"
>
<condition
column=
"objectclass_id"
value=
"${target.objectclass_id}"
type=
"integer"
/>
</join>
</featureProperty>
</featureType>
<!-- Device Operation -->
<featureType
id=
"ng3_DeviceOperationType"
table=
"ng3_device_operation"
objectClassId=
"11100"
path=
"DeviceOperation"
schema=
"ng3"
>
<extension
base=
"AbstractFeatureType"
>
<join
table=
"cityobject"
fromColumn=
"id"
toColumn=
"id"
toRole=
"parent"
/>
</extension>
<complexAttribute
minOccurs=
"1"
maxOccurs=
"1"
path=
"type"
schema=
"ng3"
>
<attribute
column=
"type"
type=
"string"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"type_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
</complexAttribute>
<attribute
maxOccurs=
"1"
column=
"yearly_global_efficiency"
type=
"double"
path=
"yearlyGlobalEfficiency"
schema=
"ng3"
/>
<featureProperty
maxOccurs=
"1"
target=
"ng3_AbstractScheduleType"
path=
"schedule"
schema=
"ng3"
relationType=
"aggregation"
>
<join
table=
"ng3_schedule"
fromColumn=
"schedule_id"
toColumn=
"id"
toRole=
"parent"
>
<!-- Zone -->
<featureType
id=
"ng3_ZoneType"
table=
"ng3_space"
objectClassId=
"11152"
path=
"Zone"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractZoneType"
/>
<featureProperty
target=
"ng3_ZonePartType"
path=
"zonePart"
schema=
"ng3"
>
<join
table=
"ng3_space"
fromColumn=
"id"
toColumn=
"space_id"
toRole=
"child"
>
<condition
column=
"objectclass_id"
value=
"${target.objectclass_id}"
type=
"integer"
/>
</join>
</featureProperty>
</featureType>
<!-- Abstract Device -->
<featureType
abstract=
"true"
id=
"ng3_AbstractDeviceType"
table=
"ng3_device"
objectClassId=
"11101"
path=
"AbstractDevice"
schema=
"ng3"
>
<extension
base=
"AbstractCityObjectType"
>
<join
table=
"cityobject"
fromColumn=
"id"
toColumn=
"id"
toRole=
"parent"
/>
</extension>
<attribute
maxOccurs=
"1"
column=
"model"
type=
"string"
path=
"model"
schema=
"ng3"
/>
<attribute
maxOccurs=
"1"
column=
"year_of_manufacture"
type=
"integer"
path=
"yearOfManufacture"
schema=
"ng3"
/>
<attribute
maxOccurs=
"1"
column=
"num_of_devices"
type=
"integer"
path=
"numberOfDevices"
schema=
"ng3"
/>
<complexAttribute
maxOccurs=
"1"
path=
"installedPower"
schema=
"ng3"
>
<attribute
column=
"installed_power"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"installed_power_uom"
type=
"string"
path=
"@uom"
schema=
"gml"
/>
</complexAttribute>
<complexAttribute
maxOccurs=
"1"
path=
"nominalEfficiency"
schema=
"ng3"
>
<attribute
column=
"nominal_efficiency"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"nominal_efficiency_uom"
type=
"string"
path=
"@uom"
schema=
"gml"
/>
</complexAttribute>
<attribute
maxOccurs=
"1"
column=
"efficiency_indicator"
type=
"string"
path=
"efficiencyIndicator"
schema=
"ng3"
/>
<complexAttribute
maxOccurs=
"1"
path=
"heatDissipation"
schema=
"ng3"
>
<attribute
column=
"heat_diss"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"heat_diss_uom"
type=
"string"
path=
"@uom"
schema=
"gml"
/>
</complexAttribute>
<complexAttribute
maxOccurs=
"1"
path=
"heatDissipationConvectiveFraction"
schema=
"ng3"
>
<attribute
column=
"heat_diss_conv"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"heat_diss_conv_uom"
type=
"string"
path=
"@uom"
schema=
"gml"
/>
</complexAttribute>
<complexAttribute
maxOccurs=
"1"
path=
"heatDissipationLatentFraction"
schema=
"ng3"
>
<attribute
column=
"heat_diss_lat"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"heat_diss_lat_uom"
type=
"string"
path=
"@uom"
schema=
"gml"
/>
</complexAttribute>
<complexAttribute
maxOccurs=
"1"
path=
"heatDissipationRadiantFraction"
schema=
"ng3"
>
<attribute
column=
"heat_diss_rad"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"heat_diss_rad_uom"
type=
"string"
path=
"@uom"
schema=
"gml"
/>
</complexAttribute>
<featureProperty
target=
"ng3_DeviceOperationType"
path=
"deviceOperation"
schema=
"ng3"
relationType=
"aggregation"
>
<join
table=
"ng3_device_operation"
fromColumn=
"id"
toColumn=
"device_id"
toRole=
"child"
/>
</featureProperty>
<!-- Zone Part -->
<featureType
id=
"ng3_ZonePartType"
table=
"ng3_space"
objectClassId=
"11153"
path=
"ZonePart"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractZoneType"
/>
</featureType>
<!-- ******************************** -->
<!-- Devices module -->
<!-- ******************************** -->
<!-- Boiler -->
<featureType
id=
"ng3_BoilerType"
table=
"ng3_device"
objectClassId=
"111
02
"
path=
"Boiler"
schema=
"ng3"
>
<featureType
id=
"ng3_BoilerType"
table=
"ng3_device"
objectClassId=
"111
61
"
path=
"Boiler"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractDeviceType"
/>
<attribute
column=
"has_condensation"
type=
"boolean"
minOccurs=
"1"
maxOccurs=
"1"
path=
"hasCondensation"
schema=
"ng3"
/>
</featureType>
<!-- Generic Device -->
<featureType
id=
"ng3_GenericDeviceType"
table=
"ng3_device"
objectClassId=
"111
03
"
path=
"GenericDevice"
schema=
"ng3"
>
<featureType
id=
"ng3_GenericDeviceType"
table=
"ng3_device"
objectClassId=
"111
62
"
path=
"GenericDevice"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractDeviceType"
/>
</featureType>
<!-- Generic Electrical Device -->
<featureType
id=
"ng3_GenericElectricalDeviceType"
table=
"ng3_device"
objectClassId=
"111
04
"
path=
"GenericElectricalDevice"
schema=
"ng3"
>
<featureType
id=
"ng3_GenericElectricalDeviceType"
table=
"ng3_device"
objectClassId=
"111
63
"
path=
"GenericElectricalDevice"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractDeviceType"
/>
</featureType>
<!-- Lighting Device -->
<featureType
id=
"ng3_LightingDeviceType"
table=
"ng3_device"
objectClassId=
"111
05
"
path=
"LightingDevice"
schema=
"ng3"
>
<featureType
id=
"ng3_LightingDeviceType"
table=
"ng3_device"
objectClassId=
"111
64
"
path=
"LightingDevice"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractDeviceType"
/>
</featureType>
<!-- Heat Pump -->
<featureType
id=
"ng3_HeatPumpType"
table=
"ng3_device"
objectClassId=
"111
0
6"
path=
"HeatPump"
schema=
"ng3"
>
<featureType
id=
"ng3_HeatPumpType"
table=
"ng3_device"
objectClassId=
"1116
5
"
path=
"HeatPump"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractDeviceType"
/>
<complexAttribute
minOccurs=
"1"
maxOccurs=
"1"
path=
"heatSource"
schema=
"ng3"
>
<attribute
column=
"heat_source"
type=
"string"
path=
"."
schema=
"ng3"
/>
...
...
@@ -1051,8 +1391,9 @@ https://3d.bk.tudelft.nl/gagugiaro/
</complexAttribute>
</featureType>
<!-- Movable Shading Device -->
<featureType
id=
"ng3_MovableShadingDeviceType"
table=
"ng3_device"
objectClassId=
"111
07
"
path=
"MovableShadingDevice"
schema=
"ng3"
>
<featureType
id=
"ng3_MovableShadingDeviceType"
table=
"ng3_device"
objectClassId=
"111
66
"
path=
"MovableShadingDevice"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractDeviceType"
/>
<complexAttribute
minOccurs=
"1"
maxOccurs=
"1"
path=
"type"
schema=
"ng3"
>
<attribute
column=
"type"
type=
"string"
path=
"."
schema=
"ng3"
/>
...
...
@@ -1070,8 +1411,9 @@ https://3d.bk.tudelft.nl/gagugiaro/
</complexProperty>
</featureType>
<!-- Electrical Storage Device -->
<featureType
id=
"ng3_ElectricalStorageDeviceType"
table=
"ng3_storage_device"
objectClassId=
"111
08
"
path=
"ElectricalStorageDevice"
schema=
"ng3"
>
<featureType
id=
"ng3_ElectricalStorageDeviceType"
table=
"ng3_storage_device"
objectClassId=
"111
67
"
path=
"ElectricalStorageDevice"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractDeviceType"
>
<join
table=
"ng3_device"
fromColumn=
"id"
toColumn=
"id"
toRole=
"parent"
/>
</extension>
...
...
@@ -1085,8 +1427,9 @@ https://3d.bk.tudelft.nl/gagugiaro/
</complexAttribute>
</featureType>
<!-- Thermal Storage Device -->
<featureType
id=
"ng3_ThermalStorageDeviceType"
table=
"ng3_storage_device"
objectClassId=
"111
09
"
path=
"ThermalStorageDevice"
schema=
"ng3"
>
<featureType
id=
"ng3_ThermalStorageDeviceType"
table=
"ng3_storage_device"
objectClassId=
"111
68
"
path=
"ThermalStorageDevice"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractDeviceType"
>
<join
table=
"ng3_device"
fromColumn=
"id"
toColumn=
"id"
toRole=
"parent"
/>
</extension>
...
...
@@ -1108,8 +1451,15 @@ https://3d.bk.tudelft.nl/gagugiaro/
</complexAttribute>
</featureType>
<!-- Generic Storage Device -->
<featureType
id=
"ng3_GenericStorageDeviceType"
table=
"ng3_storage_device"
objectClassId=
"11169"
path=
"GenericStorageDevice"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractDeviceType"
/>
</featureType>
<!-- Abstract Solar Collector -->
<featureType
abstract=
"true"
id=
"ng3_AbstractSolarCollectorType"
table=
"ng3_solar_collector"
objectClassId=
"111
1
0"
path=
"AbstractSolarCollector"
schema=
"ng3"
>
<featureType
abstract=
"true"
id=
"ng3_AbstractSolarCollectorType"
table=
"ng3_solar_collector"
objectClassId=
"111
7
0"
path=
"AbstractSolarCollector"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractDeviceType"
>
<join
table=
"ng3_device"
fromColumn=
"id"
toColumn=
"id"
toRole=
"parent"
/>
</extension>
...
...
@@ -1133,13 +1483,15 @@ https://3d.bk.tudelft.nl/gagugiaro/
<geometryProperty
maxOccurs=
"1"
lod=
"3"
refColumn=
"lod3_multi_surface_id"
type=
"MultiSurface"
path=
"lod3MultiSurface"
schema=
"ng3"
/>
</featureType>
<!-- Generic Solar Collector -->
<featureType
id=
"ng3_GenericSolarCollectorType"
table=
"ng3_solar_collector"
objectClassId=
"111
1
1"
path=
"GenericSolarCollector"
schema=
"ng3"
>
<featureType
id=
"ng3_GenericSolarCollectorType"
table=
"ng3_solar_collector"
objectClassId=
"111
7
1"
path=
"GenericSolarCollector"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractSolarCollectorType"
/>
</featureType>
<!-- Photovoltaic Collector -->
<featureType
id=
"ng3_PhotovoltaicCollectorType"
table=
"ng3_solar_collector"
objectClassId=
"111
1
2"
path=
"PhotovoltaicCollector"
schema=
"ng3"
>
<featureType
id=
"ng3_PhotovoltaicCollectorType"
table=
"ng3_solar_collector"
objectClassId=
"111
7
2"
path=
"PhotovoltaicCollector"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractSolarCollectorType"
/>
<complexAttribute
minOccurs=
"1"
maxOccurs=
"1"
path=
"cellType"
schema=
"ng3"
>
<attribute
column=
"cell_type"
type=
"string"
path=
"."
schema=
"ng3"
/>
...
...
@@ -1147,8 +1499,9 @@ https://3d.bk.tudelft.nl/gagugiaro/
</complexAttribute>
</featureType>
<!-- Solar Thermal Collector -->
<featureType
id=
"ng3_SolarThermalCollectorType"
table=
"ng3_solar_collector"
objectClassId=
"111
1
3"
path=
"SolarThermalCollector"
schema=
"ng3"
>
<featureType
id=
"ng3_SolarThermalCollectorType"
table=
"ng3_solar_collector"
objectClassId=
"111
7
3"
path=
"SolarThermalCollector"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractSolarCollectorType"
/>
<complexAttribute
minOccurs=
"1"
maxOccurs=
"1"
path=
"collectorType"
schema=
"ng3"
>
<attribute
column=
"type"
type=
"string"
path=
"."
schema=
"ng3"
/>
...
...
@@ -1162,8 +1515,9 @@ https://3d.bk.tudelft.nl/gagugiaro/
<attribute
maxOccurs=
"1"
column=
"quad_heat_loss_coeff"
type=
"double"
path=
"quadraticHeatLossCoefficient"
schema=
"ng3"
/>
</featureType>
<!-- Photovoltaic Thermal Collector -->
<featureType
id=
"ng3_PhotovoltaicThermalCollectorType"
table=
"ng3_solar_collector"
objectClassId=
"111
1
4"
path=
"PhotovoltaicThermalCollector"
schema=
"ng3"
>
<featureType
id=
"ng3_PhotovoltaicThermalCollectorType"
table=
"ng3_solar_collector"
objectClassId=
"111
7
4"
path=
"PhotovoltaicThermalCollector"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractSolarCollectorType"
/>
<complexAttribute
minOccurs=
"1"
maxOccurs=
"1"
path=
"collectorType"
schema=
"ng3"
>
<attribute
column=
"type"
type=
"string"
path=
"."
schema=
"ng3"
/>
...
...
@@ -1181,8 +1535,12 @@ https://3d.bk.tudelft.nl/gagugiaro/
<attribute
maxOccurs=
"1"
column=
"quad_heat_loss_coeff"
type=
"double"
path=
"quadraticHeatLossCoefficient"
schema=
"ng3"
/>
</featureType>
<!-- ******************************** -->
<!-- Urban Function Area module -->
<!-- ******************************** -->
<!-- Urban Function Area -->
<featureType
id=
"ng3_UrbanFunctionAreaType"
table=
"ng3_urban_function_area"
objectClassId=
"1
1120"
topLevel=
"true
"
path=
"UrbanFunctionArea"
schema=
"ng3"
>
<featureType
topLevel=
"true"
id=
"ng3_UrbanFunctionAreaType"
table=
"ng3_urban_function_area"
objectClassId=
"1
2001
"
path=
"UrbanFunctionArea"
schema=
"ng3"
>
<extension
base=
"CityObjectGroupType"
>
<join
table=
"cityobjectgroup"
fromColumn=
"id"
toColumn=
"id"
toRole=
"parent"
/>
</extension>
...
...
@@ -1194,54 +1552,24 @@ https://3d.bk.tudelft.nl/gagugiaro/
<attribute
column=
"code"
type=
"string"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"code_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
</complexAttribute>
</featureType>
<!-- Weather Station -->
<featureType
id=
"ng3_WeatherStationType"
table=
"cityobject"
objectClassId=
"11130"
topLevel=
"true"
path=
"WeatherStation"
schema=
"ng3"
>
<extension
base=
"AbstractCityObjectType"
/>
</featureType>
<!-- Abstract Library -->
<featureType
abstract=
"true"
id=
"ng3_AbstractLibraryType"
table=
"ng3_library"
objectClassId=
"11140"
path=
"AbstractLibrary"
schema=
"ng3"
>
<extension
base=
"AbstractCityObjectType"
>
<join
table=
"cityobject"
fromColumn=
"id"
toColumn=
"id"
toRole=
"parent"
/>
</extension>
<complexAttribute
maxOccurs=
"1"
path=
"type"
schema=
"ng3"
>
<attribute
column=
"type_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
<attribute
column=
"type"
type=
"string"
path=
"."
schema=
"ng3"
/>
<complexAttribute
maxOccurs=
"1"
path=
"area"
schema=
"ng3"
>
<attribute
column=
"area"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"area_uom"
type=
"string"
path=
"@uom"
schema=
"gml"
/>
</complexAttribute>
<attribute
maxOccurs=
"1"
column=
"source"
type=
"string"
path=
"source"
schema=
"ng3"
/>
<attribute
maxOccurs=
"1"
column=
"author"
type=
"string"
path=
"author"
schema=
"ng3"
/>
</featureType>
<!-- Layered Construction Library -->
<featureType
id=
"ng3_LayeredConstructionLibraryType"
table=
"ng3_library"
objectClassId=
"11141"
topLevel=
"true"
path=
"LayeredConstructionLibrary"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractLibraryType"
/>
<featureProperty
target=
"ng3_AbstractLayeredConstructionType"
path=
"libraryMember"
schema=
"ng3"
relationType=
"composition"
>
<join
table=
"ng3_layered_construction"
fromColumn=
"id"
toColumn=
"library_id"
toRole=
"child"
>
<condition
column=
"objectclass_id"
value=
"${target.objectclass_id}"
type=
"integer"
/>
</join>
</featureProperty>
</featureType>
<!-- ******************************** -->
<!-- Weather Station module -->
<!-- ******************************** -->
<!-- Material Library -->
<featureType
id=
"ng3_MaterialLibraryType"
table=
"ng3_library"
objectClassId=
"11142"
topLevel=
"true"
path=
"MaterialLibrary"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractLibraryType"
/>
<featureProperty
target=
"ng3_AbstractMaterialType"
path=
"libraryMember"
schema=
"ng3"
relationType=
"composition"
>
<join
table=
"ng3_material"
fromColumn=
"id"
toColumn=
"library_id"
toRole=
"child"
>
<condition
column=
"objectclass_id"
value=
"${target.objectclass_id}"
type=
"integer"
/>
</join>
</featureProperty>
<!-- Weather Data -->
<featureType
id=
"ng3_WeatherDataType"
table=
"ng3_sensordata"
objectClassId=
"12011"
path=
"WeatherData"
schema=
"ng3"
>
<extension
base=
"ng3_SensorDataType"
/>
</featureType>
<!-- Schedule Library -->
<featureType
id=
"ng3_ScheduleLibraryType"
table=
"ng3_library"
objectClassId=
"11143"
topLevel=
"true"
path=
"ScheduleLibrary"
schema=
"ng3"
>
<extension
base=
"ng3_AbstractLibraryType"
/>
<featureProperty
target=
"ng3_AbstractScheduleType"
path=
"libraryMember"
schema=
"ng3"
relationType=
"composition"
>
<join
table=
"ng3_schedule"
fromColumn=
"id"
toColumn=
"library_id"
toRole=
"child"
>
<condition
column=
"objectclass_id"
value=
"${target.objectclass_id}"
type=
"integer"
/>
</join>
</featureProperty>
<!-- Weather Station -->
<featureType
topLevel=
"true"
id=
"ng3_WeatherStationType"
table=
"cityobject"
objectClassId=
"12012"
path=
"WeatherStation"
schema=
"ng3"
>
<extension
base=
"AbstractCityObjectType"
/>
</featureType>
</featureTypes>
...
...
@@ -1252,14 +1580,25 @@ https://3d.bk.tudelft.nl/gagugiaro/
<!-- ADE _CityObject -->
<propertyInjection
table=
"ng3_cityobject"
defaultBase=
"AbstractCityObjectType"
>
<join
table=
"ng3_cityobject"
fromColumn=
"id"
toColumn=
"id"
toRole=
"child"
/>
<complexAttribute
maxOccurs=
"1"
path=
"permanentIdentifier"
schema=
"ng3"
>
<attribute
column=
"perm_identifier"
type=
"string"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"perm_identifier_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
</complexAttribute>
<attribute
maxOccurs=
"1"
column=
"validfrom"
type=
"timestamp"
path=
"validFrom"
schema=
"ng3"
/>
<attribute
maxOccurs=
"1"
column=
"validto"
type=
"timestamp"
path=
"validTo"
schema=
"ng3"
/>
<complexProperty
refType=
"ng3_CityObjectRelationType"
path=
"relatedTo"
schema=
"ng3"
>
<join
table=
"ng3_ctyobj_relation"
fromColumn=
"id"
toColumn=
"ng3_cityobject_id"
toRole=
"child"
/>
</complexProperty>
<featureProperty
target=
"ng3_UtilityNetworkConnectionType"
path=
"utilityNetworkConnection"
schema=
"ng3"
relationType=
"composition"
>
<join
table=
"ng3_utl_ntw_connection"
fromColumn=
"id"
toColumn=
"cityobject_id"
toRole=
"child"
/>
</featureProperty>
<featureProperty
maxOccurs=
"1"
target=
"ng3_AbstractLayeredConstructionType"
path=
"layeredConstruction"
schema=
"ng3"
relationType=
"association"
>
<!-- could be "aggregation" -->
<join
table=
"ng3_layered_construction"
fromColumn=
"layered_construction_id"
toColumn=
"id"
toRole=
"parent"
>
<featureProperty
maxOccurs=
"1"
target=
"ng3_AbstractLayeredConstructionType"
path=
"layeredConstruction"
schema=
"ng3"
relationType=
"composition"
>
<join
table=
"ng3_layered_construction"
fromColumn=
"layered_constr_id"
toColumn=
"id"
toRole=
"parent"
>
<condition
column=
"objectclass_id"
value=
"${target.objectclass_id}"
type=
"integer"
/>
</join>
</featureProperty>
<featureProperty
maxOccurs=
"1"
target=
"ng3_AbstractLayeredConstructionType"
path=
"librarylayeredConstruction"
schema=
"ng3"
relationType=
"aggregation"
>
<join
table=
"ng3_layered_construction"
fromColumn=
"lib_layered_constr_id"
toColumn=
"id"
toRole=
"parent"
>
<condition
column=
"objectclass_id"
value=
"${target.objectclass_id}"
type=
"integer"
/>
</join>
</featureProperty>
...
...
@@ -1276,12 +1615,13 @@ https://3d.bk.tudelft.nl/gagugiaro/
<complexProperty
refType=
"ng3_SuitabilityType"
path=
"suitability"
schema=
"ng3"
>
<join
table=
"ng3_suitability"
fromColumn=
"id"
toColumn=
"cityobject_id"
toRole=
"child"
/>
</complexProperty>
<featureProperty
target=
"ng3_
Weathe
rDataType"
path=
"
weathe
rData"
schema=
"ng3"
relationType=
"composition"
>
<join
table=
"ng3_
weathe
r_data"
fromColumn=
"id"
toColumn=
"cityobject_id"
toRole=
"child"
/>
<featureProperty
target=
"ng3_
Senso
rDataType"
path=
"
senso
rData"
schema=
"ng3"
relationType=
"composition"
>
<join
table=
"ng3_
senso
r_data"
fromColumn=
"id"
toColumn=
"cityobject_id"
toRole=
"child"
/>
</featureProperty>
<geometryProperty
inlineColumn=
"ref_point"
type=
"Point"
path=
"referencePoint"
schema=
"ng3"
/>
</propertyInjection>
<!-- ADE Building -->
<propertyInjection
table=
"ng3_building"
defaultBase=
"AbstractBuildingType"
>
<join
table=
"ng3_building"
fromColumn=
"id"
toColumn=
"id"
toRole=
"child"
/>
...
...
@@ -1289,6 +1629,11 @@ https://3d.bk.tudelft.nl/gagugiaro/
<attribute
column=
"type"
type=
"string"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"type_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
</complexAttribute>
<attribute
maxOccurs=
"1"
column=
"owner_name"
type=
"string"
path=
"bdgOwnerName"
schema=
"ng3"
/>
<complexAttribute
maxOccurs=
"1"
path=
"bdgOwnershipType"
schema=
"ng3"
>
<attribute
column=
"ownership_type"
type=
"string"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"ownership_type_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
</complexAttribute>
<complexAttribute
maxOccurs=
"1"
path=
"bdgConstructionWeight"
schema=
"ng3"
>
<attribute
column=
"constr_weight"
type=
"string"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"constr_weight_codespace"
type=
"string"
path=
"@codespace"
schema=
"gml"
/>
...
...
@@ -1311,49 +1656,37 @@ https://3d.bk.tudelft.nl/gagugiaro/
<condition
column=
"objectclass_id"
value=
"${target.objectclass_id}"
type=
"integer"
/>
</join>
</complexProperty>
<featureProperty
target=
"ng3_RefurbishmentMeasureType"
path=
"refurbishmentMeasure"
schema=
"ng3"
relationType=
"composition"
>
<join
table=
"ng3_refurbishment_measure"
fromColumn=
"id"
toColumn=
"building_id"
toRole=
"child"
/>
</featureProperty>
<featureProperty
target=
"ng3_EnergyPerformanceCertificateType"
path=
"energyPerformanceCertificate"
schema=
"ng3"
relationType=
"composition"
>
<join
table=
"ng3_energy_perf_cert"
fromColumn=
"id"
toColumn=
"building_id"
toRole=
"child"
/>
</featureProperty>
<featureProperty
target=
"ng3_AbstractBuildingUnitType"
path=
"buildingUnit"
schema=
"ng3"
relationType=
"composition"
>
<join
table=
"ng3_building_partition"
fromColumn=
"id"
toColumn=
"building_id"
toRole=
"child"
>
<condition
column=
"objectclass_id"
value=
"${target.objectclass_id}"
type=
"integer"
/>
</join>
<featureProperty
target=
"ng3_RefurbishmentMeasureType"
path=
"refurbishmentMeasure"
schema=
"ng3"
relationType=
"composition"
>
<join
table=
"ng3_refurbishment_measure"
fromColumn=
"id"
toColumn=
"building_id"
toRole=
"child"
/>
</featureProperty>
<featureProperty
target=
"ng3_
AbstractThermalZoneType"
path=
"thermalZone
"
schema=
"ng3"
relationType=
"composition"
>
<join
table=
"ng3_
building_partition
"
fromColumn=
"id"
toColumn=
"building_id"
toRole=
"child"
>
<featureProperty
target=
"ng3_
BuildingUnitType"
path=
"buildingUnit
"
schema=
"ng3"
relationType=
"composition"
>
<join
table=
"ng3_
space
"
fromColumn=
"id"
toColumn=
"building_id"
toRole=
"child"
>
<condition
column=
"objectclass_id"
value=
"${target.objectclass_id}"
type=
"integer"
/>
</join>
</featureProperty>
<featureProperty
target=
"ng3_Abstract
Usage
ZoneType"
path=
"
usageZ
one"
schema=
"ng3"
relationType=
"composition"
>
<join
table=
"ng3_
building_partition
"
fromColumn=
"id"
toColumn=
"building_id"
toRole=
"child"
>
<featureProperty
target=
"ng3_AbstractZoneType"
path=
"
z
one"
schema=
"ng3"
relationType=
"composition"
>
<join
table=
"ng3_
space
"
fromColumn=
"id"
toColumn=
"building_id"
toRole=
"child"
>
<condition
column=
"objectclass_id"
value=
"${target.objectclass_id}"
type=
"integer"
/>
</join>
</featureProperty>
</propertyInjection>
<!-- (Building) ADE _BoundarySurface -->
<propertyInjection
table=
"ng3_thematic_surface"
defaultBase=
"AbstractBoundarySurfaceType"
>
<join
table=
"ng3_thematic_surface"
fromColumn=
"id"
toColumn=
"id"
toRole=
"child"
/>
<complexAttribute
maxOccurs=
"1"
path=
"bdgBdrySurfAzimuth"
schema=
"ng3"
>
<attribute
column=
"azimuth"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"azimuth_uom"
type=
"string"
path=
"@uom"
schema=
"gml"
/>
</complexAttribute>
<complexAttribute
maxOccurs=
"1"
path=
"bdgBdrySurfGroundViewFactor"
schema=
"ng3"
>
<attribute
column=
"ground_view_factor"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"ground_view_factor_uom"
type=
"string"
path=
"@uom"
schema=
"gml"
/>
</complexAttribute>
<complexAttribute
maxOccurs=
"1"
path=
"bdgBdrySurfHeatCapacity"
schema=
"ng3"
>
<attribute
column=
"heat_capacity"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"heat_capacity_uom"
type=
"string"
path=
"@uom"
schema=
"gml"
/>
<attribute
maxOccurs=
"1"
column=
"is_shared"
type=
"boolean"
path=
"bdgBdrySurfIsAdiabatic"
schema=
"ng3"
/>
<complexAttribute
maxOccurs=
"1"
path=
"bdgBdrySurfThickness"
schema=
"ng3"
>
<attribute
column=
"thickness"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"thickness_uom"
type=
"string"
path=
"@uom"
schema=
"gml"
/>
</complexAttribute>
<complexAttribute
maxOccurs=
"1"
path=
"bdgBdrySurf
Inclination
"
schema=
"ng3"
>
<attribute
column=
"
inclination
"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"
inclination
_uom"
type=
"string"
path=
"@uom"
schema=
"gml"
/>
<complexAttribute
maxOccurs=
"1"
path=
"bdgBdrySurf
TotalSurfaceArea
"
schema=
"ng3"
>
<attribute
column=
"
total_surf_area
"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"
total_surf_area
_uom"
type=
"string"
path=
"@uom"
schema=
"gml"
/>
</complexAttribute>
<attribute
maxOccurs=
"1"
column=
"is_adiabatic"
type=
"boolean"
path=
"bdgBdrySurfIsAdiabatic"
schema=
"ng3"
/>
<complexAttribute
maxOccurs=
"1"
path=
"bdgBdrySurfOpaqueSurfaceArea"
schema=
"ng3"
>
<attribute
column=
"opaque_surf_area"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"opaque_surf_area_uom"
type=
"string"
path=
"@uom"
schema=
"gml"
/>
...
...
@@ -1362,20 +1695,29 @@ https://3d.bk.tudelft.nl/gagugiaro/
<attribute
column=
"open_to_surf_ration"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"open_to_surf_ration_uom"
type=
"string"
path=
"@uom"
schema=
"gml"
/>
</complexAttribute>
<complexAttribute
maxOccurs=
"1"
path=
"bdgBdrySurfAzimuth"
schema=
"ng3"
>
<attribute
column=
"azimuth"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"azimuth_uom"
type=
"string"
path=
"@uom"
schema=
"gml"
/>
</complexAttribute>
<complexAttribute
maxOccurs=
"1"
path=
"bdgBdrySurfInclination"
schema=
"ng3"
>
<attribute
column=
"inclination"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"inclination_uom"
type=
"string"
path=
"@uom"
schema=
"gml"
/>
</complexAttribute>
<complexAttribute
maxOccurs=
"1"
path=
"bdgBdrySurfHeatCapacity"
schema=
"ng3"
>
<attribute
column=
"heat_capacity"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"heat_capacity_uom"
type=
"string"
path=
"@uom"
schema=
"gml"
/>
</complexAttribute>
<complexAttribute
maxOccurs=
"1"
path=
"bdgBdrySurfGroundViewFactor"
schema=
"ng3"
>
<attribute
column=
"ground_view_factor"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"ground_view_factor_uom"
type=
"string"
path=
"@uom"
schema=
"gml"
/>
</complexAttribute>
<complexAttribute
maxOccurs=
"1"
path=
"bdgBdrySurfSkyViewFactor"
schema=
"ng3"
>
<attribute
column=
"sky_view_factor"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"sky_view_factor_uom"
type=
"string"
path=
"@uom"
schema=
"gml"
/>
</complexAttribute>
<complexAttribute
maxOccurs=
"1"
path=
"bdgBdrySurfThickness"
schema=
"ng3"
>
<attribute
column=
"thickness"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"thickness_uom"
type=
"string"
path=
"@uom"
schema=
"gml"
/>
</complexAttribute>
<complexAttribute
maxOccurs=
"1"
path=
"bdgBdrySurfTotalSurfaceArea"
schema=
"ng3"
>
<attribute
column=
"total_surf_area"
type=
"double"
path=
"."
schema=
"ng3"
/>
<attribute
column=
"total_surf_area_uom"
type=
"string"
path=
"@uom"
schema=
"gml"
/>
</complexAttribute>
</propertyInjection>
<!-- (Building) ADE _Opening -->
<propertyInjection
table=
"ng3_opening"
defaultBase=
"AbstractOpeningType"
>
<join
table=
"ng3_opening"
fromColumn=
"id"
toColumn=
"id"
toRole=
"child"
/>
...
...
src/main/java/de/stuttgart/hft/ade/energy3/exporter/BuildingPropertiesExporter.java
View file @
2ef0d8b9
...
...
@@ -10,7 +10,7 @@ import org.citydb.core.query.filter.projection.ProjectionFilter;
import
org.citygml4j.ade.energy3.model.core.*
;
import
org.citygml4j.ade.energy3.model.module.EnergyADEModule
;
import
org.citygml4j.model.citygml.building.AbstractBuilding
;
import
org.sig3d.citygml.energyADE3beta
7
.ThermalStatusValueType
;
import
org.sig3d.citygml.energyADE3beta
8
.ThermalStatusValueType
;
import
java.sql.Connection
;
import
java.sql.PreparedStatement
;
...
...
src/main/java/de/stuttgart/hft/ade/energy3/exporter/CityObjectPropertiesExporter.java
View file @
2ef0d8b9
...
...
@@ -25,7 +25,7 @@ public class CityObjectPropertiesExporter implements ADEExporter {
private
final
CityGMLExportHelper
helper
;
private
final
ExportManager
manager
;
private
final
Connection
connection
;
private
WeatherDataExporter
weatherDataExporter
;
//
private WeatherDataExporter weatherDataExporter;
private
ResourceExporter
resourceExporter
;
private
String
module
;
...
...
@@ -41,7 +41,7 @@ public class CityObjectPropertiesExporter implements ADEExporter {
module
=
EnergyADEModule
.
v3_0
.
getNamespaceURI
();
ps
=
connection
.
prepareStatement
(
select
);
weatherDataExporter
=
manager
.
getExporter
(
WeatherDataExporter
.
class
);
//
weatherDataExporter = manager.getExporter(WeatherDataExporter.class);
resourceExporter
=
manager
.
getExporter
(
ResourceExporter
.
class
);
}
...
...
@@ -52,12 +52,12 @@ public class CityObjectPropertiesExporter implements ADEExporter {
Collection
<
AbstractCityObject
>
result
=
new
ArrayList
<>();
while
(
rs
.
next
())
{
Object
pointObj
=
rs
.
getObject
(
2
);
if
(
projectionFilter
.
containsProperty
(
"weatherData"
,
module
))
{
for
(
WeatherData
weatherData
:
weatherDataExporter
.
doExport
(
objectId
))
{
WeatherDataProperty
property
=
new
WeatherDataProperty
(
weatherData
);
cityObject
.
addGenericApplicationPropertyOfCityObject
(
property
);
}
}
//
if (projectionFilter.containsProperty("weatherData", module)) {
//
for (WeatherData weatherData : weatherDataExporter.doExport(objectId)) {
//
WeatherDataProperty property = new WeatherDataProperty(weatherData);
//
cityObject.addGenericApplicationPropertyOfCityObject(property);
//
}
//
}
if
(
projectionFilter
.
containsProperty
(
"resource"
,
module
))
{
for
(
AbstractResource
resource
:
resourceExporter
.
doExport
(
objectId
))
{
...
...
src/main/java/de/stuttgart/hft/ade/energy3/exporter/ExportManager.java
View file @
2ef0d8b9
...
...
@@ -48,8 +48,8 @@ public class ExportManager implements ADEExportManager {
public
void
exportObject
(
ADEModelObject
object
,
long
objectId
,
AbstractObjectType
<?>
objectType
,
ProjectionFilter
projectionFilter
)
throws
CityGMLExportException
,
SQLException
{
if
(
object
instanceof
WeatherStation
)
getExporter
(
WeatherStationExporter
.
class
).
doExport
((
WeatherStation
)
object
,
objectId
,
objectType
,
projectionFilter
);
else
if
(
object
instanceof
WeatherData
)
getExporter
(
WeatherDataExporter
.
class
).
doExport
(
objectId
);
//
else if (object instanceof WeatherData)
//
getExporter(WeatherDataExporter.class).doExport(objectId);
else
if
(
object
instanceof
UrbanFunctionArea
)
getExporter
(
UrbanFunctionAreaExporter
.
class
).
doExport
((
UrbanFunctionArea
)
object
,
objectId
,
objectType
,
projectionFilter
);
else
if
(
object
instanceof
AbstractTimeSeries
)
...
...
@@ -96,8 +96,8 @@ public class ExportManager implements ADEExportManager {
exporter
=
new
WeatherStationExporter
(
connection
,
helper
,
this
);
else
if
(
type
==
ResourceExporter
.
class
)
exporter
=
new
ResourceExporter
(
connection
,
helper
,
this
);
else
if
(
type
==
WeatherDataExporter
.
class
)
exporter
=
new
WeatherDataExporter
(
connection
,
helper
,
this
);
//
else if (type == WeatherDataExporter.class)
//
exporter = new WeatherDataExporter(connection, helper, this);
else
if
(
type
==
CityObjectPropertiesExporter
.
class
)
exporter
=
new
CityObjectPropertiesExporter
(
connection
,
helper
,
this
);
else
if
(
type
==
BuildingPropertiesExporter
.
class
)
...
...
src/main/java/de/stuttgart/hft/ade/energy3/exporter/ResourceExporter.java
View file @
2ef0d8b9
...
...
@@ -10,7 +10,7 @@ import org.citygml4j.ade.energy3.model.core.AbstractResource;
import
org.citygml4j.ade.energy3.model.supportingClasses.*
;
import
org.citygml4j.model.gml.basicTypes.Code
;
import
org.citygml4j.model.gml.basicTypes.Measure
;
import
org.sig3d.citygml.energyADE3beta
7
.ResourceStatusValueType
;
import
org.sig3d.citygml.energyADE3beta
8
.ResourceStatusValueType
;
import
java.sql.*
;
import
java.util.ArrayList
;
...
...
src/main/java/de/stuttgart/hft/ade/energy3/exporter/WeatherDataExporter.java
View file @
2ef0d8b9
package
de.stuttgart.hft.ade.energy3.exporter
;
import
de.stuttgart.hft.ade.energy3.schema.ADETable
;
import
org.citydb.config.geometry.GeometryObject
;
import
org.citydb.core.ade.exporter.ADEExporter
;
import
org.citydb.core.ade.exporter.CityGMLExportHelper
;
import
org.citydb.core.database.schema.mapping.ObjectType
;
import
org.citydb.core.operation.exporter.CityGMLExportException
;
import
org.citydb.core.operation.exporter.database.content.GMLConverter
;
import
org.citydb.core.query.filter.projection.CombinedProjectionFilter
;
import
org.citydb.core.query.filter.projection.ProjectionFilter
;
import
org.citydb.sqlbuilder.expression.PlaceHolder
;
import
org.citydb.sqlbuilder.schema.Table
;
import
org.citydb.sqlbuilder.select.Select
;
import
org.citydb.sqlbuilder.select.operator.comparison.ComparisonFactory
;
import
org.citygml4j.ade.energy3.model.core.ReferencePointProperty
;
import
org.citygml4j.ade.energy3.model.core.WeatherData
;
import
org.citygml4j.ade.energy3.model.module.EnergyADEModule
;
import
org.citygml4j.ade.energy3.model.supportingClasses.AbstractTimeSeries
;
import
org.citygml4j.ade.energy3.model.supportingClasses.AbstractTimeSeriesProperty
;
import
org.citygml4j.model.gml.basicTypes.Code
;
import
org.citygml4j.model.gml.basicTypes.Measure
;
import
org.citygml4j.model.gml.geometry.primitives.Point
;
import
org.citygml4j.model.gml.geometry.primitives.PointProperty
;
import
java.sql.Connection
;
import
java.sql.PreparedStatement
;
import
java.sql.ResultSet
;
import
java.sql.SQLException
;
import
java.util.ArrayList
;
import
java.util.Collection
;
public
class
WeatherDataExporter
implements
ADEExporter
{
private
final
CityGMLExportHelper
helper
;
private
final
int
objectClassId
;
private
PreparedStatement
ps
;
private
TimeSeriesExporter
timeSeriesExporter
;
private
GMLConverter
gmlConverter
;
private
String
module
;
public
WeatherDataExporter
(
Connection
connection
,
CityGMLExportHelper
helper
,
ExportManager
manager
)
throws
CityGMLExportException
,
SQLException
{
this
.
helper
=
helper
;
objectClassId
=
manager
.
getObjectMapper
().
getObjectClassId
(
WeatherData
.
class
);
String
tableName
=
manager
.
getSchemaMapper
().
getTableName
(
ADETable
.
WEATHER_DATA
);
CombinedProjectionFilter
projectionFilter
=
helper
.
getCombinedProjectionFilter
(
tableName
);
module
=
EnergyADEModule
.
v3_0
.
getNamespaceURI
();
Table
table
=
new
Table
(
helper
.
getTableNameWithSchema
(
tableName
));
Select
select
=
new
Select
().
addProjection
(
table
.
getColumn
(
"id"
),
table
.
getColumn
(
"type"
),
table
.
getColumn
(
"type_codespace"
),
table
.
getColumn
(
"value_type"
),
table
.
getColumn
(
"value_type_codespace"
),
table
.
getColumn
(
"yearly_value"
),
table
.
getColumn
(
"yearly_value_uom"
),
table
.
getColumn
(
"library_code"
),
table
.
getColumn
(
"library_code_codespace"
),
table
.
getColumn
(
"time_series_id"
),
table
.
getColumn
(
"cityobject_id"
)
);
if
(
projectionFilter
.
containsProperty
(
"position"
,
module
))
select
.
addProjection
(
table
.
getColumn
(
"position"
));
select
.
addSelection
(
ComparisonFactory
.
equalTo
(
table
.
getColumn
(
"cityobject_id"
),
new
PlaceHolder
<>()));
ps
=
connection
.
prepareStatement
(
select
.
toString
());
timeSeriesExporter
=
manager
.
getExporter
(
TimeSeriesExporter
.
class
);
gmlConverter
=
helper
.
getGMLConverter
();
}
public
Collection
<
WeatherData
>
doExport
(
long
parentId
)
throws
CityGMLExportException
,
SQLException
{
ps
.
setLong
(
1
,
parentId
);
try
(
ResultSet
rs
=
ps
.
executeQuery
())
{
Collection
<
WeatherData
>
result
=
new
ArrayList
<>();
while
(
rs
.
next
())
{
long
weatherDataId
=
rs
.
getLong
(
1
);
WeatherData
weatherData
=
helper
.
createObject
(
weatherDataId
,
objectClassId
,
WeatherData
.
class
);
if
(
weatherData
==
null
)
{
helper
.
logOrThrowErrorMessage
(
"Failed to instantiate "
+
helper
.
getObjectSignature
(
objectClassId
,
weatherDataId
)
+
" as weather data object."
);
continue
;
}
ObjectType
objectType
=
helper
.
getObjectType
(
objectClassId
);
ProjectionFilter
projectionFilter
=
helper
.
getProjectionFilter
(
objectType
);
weatherData
.
setId
(
String
.
valueOf
(
weatherDataId
));
// Set type
String
typeValue
=
rs
.
getString
(
2
);
String
typeCodeSpace
=
rs
.
getString
(
3
);
if
(
typeValue
!=
null
||
typeCodeSpace
!=
null
)
{
Code
type
=
new
Code
();
type
.
setValue
(
typeValue
);
type
.
setCodeSpace
(
typeCodeSpace
);
type
.
setParent
(
weatherData
);
weatherData
.
setType
(
type
);
}
// Set value type
String
valueTypeValue
=
rs
.
getString
(
4
);
String
valueTypeCodeSpace
=
rs
.
getString
(
5
);
if
(
valueTypeValue
!=
null
||
valueTypeCodeSpace
!=
null
)
{
Code
valueType
=
new
Code
();
valueType
.
setValue
(
valueTypeValue
);
valueType
.
setCodeSpace
(
valueTypeCodeSpace
);
valueType
.
setParent
(
weatherData
);
weatherData
.
setValueType
(
valueType
);
}
// Set yearly value and UOM
double
yearlyValue
=
rs
.
getDouble
(
6
);
if
(!
rs
.
wasNull
())
{
Measure
yearlyMeasure
=
new
Measure
();
yearlyMeasure
.
setValue
(
yearlyValue
);
String
yearlyValueUom
=
rs
.
getString
(
7
);
if
(
yearlyValueUom
!=
null
)
{
yearlyMeasure
.
setUom
(
yearlyValueUom
);
}
yearlyMeasure
.
setParent
(
weatherData
);
weatherData
.
setYearlyValue
(
yearlyMeasure
);
}
// Set library code
String
libraryCodeValue
=
rs
.
getString
(
8
);
String
libraryCodeSpace
=
rs
.
getString
(
9
);
if
(
libraryCodeValue
!=
null
||
libraryCodeSpace
!=
null
)
{
Code
libraryCode
=
new
Code
();
libraryCode
.
setValue
(
libraryCodeValue
);
libraryCode
.
setCodeSpace
(
libraryCodeSpace
);
libraryCode
.
setParent
(
weatherData
);
weatherData
.
setLibraryCode
(
libraryCode
);
}
// Set time series
long
timeSeriesId
=
rs
.
getLong
(
10
);
if
(!
rs
.
wasNull
())
{
Collection
<
AbstractTimeSeries
>
timeSeries
=
timeSeriesExporter
.
doExport
(
timeSeriesId
);
if
(
timeSeries
!=
null
&&
!
timeSeries
.
isEmpty
())
{
AbstractTimeSeries
firstSeries
=
timeSeries
.
iterator
().
next
();
weatherData
.
setTimeDependentValues
(
new
AbstractTimeSeriesProperty
(
firstSeries
));
}
}
// Set position (if requested)
if
(
projectionFilter
.
containsProperty
(
"position"
,
module
))
{
Object
pointObj
=
rs
.
getObject
(
"position"
);
if
(
pointObj
!=
null
)
{
try
{
GeometryObject
point
=
helper
.
getDatabaseAdapter
().
getGeometryConverter
().
getPoint
(
pointObj
);
if
(
point
!=
null
)
{
Point
gmlPoint
=
gmlConverter
.
getPoint
(
point
);
PointProperty
pointProperty
=
new
PointProperty
(
gmlPoint
);
ReferencePointProperty
refPointProp
=
new
ReferencePointProperty
(
pointProperty
);
weatherData
.
setPosition
(
refPointProp
);
}
}
catch
(
Exception
e
)
{
// Skip invalid geometry to continue export
}
}
}
result
.
add
(
weatherData
);
}
return
result
;
}
}
@Override
public
void
close
()
throws
CityGMLExportException
,
SQLException
{
ps
.
close
();
}
}
\ No newline at end of file
//package de.stuttgart.hft.ade.energy3.exporter;
//
//import de.stuttgart.hft.ade.energy3.schema.ADETable;
//import org.citydb.config.geometry.GeometryObject;
//import org.citydb.core.ade.exporter.ADEExporter;
//import org.citydb.core.ade.exporter.CityGMLExportHelper;
//import org.citydb.core.database.schema.mapping.ObjectType;
//import org.citydb.core.operation.exporter.CityGMLExportException;
//import org.citydb.core.operation.exporter.database.content.GMLConverter;
//import org.citydb.core.query.filter.projection.CombinedProjectionFilter;
//import org.citydb.core.query.filter.projection.ProjectionFilter;
//import org.citydb.sqlbuilder.expression.PlaceHolder;
//import org.citydb.sqlbuilder.schema.Table;
//import org.citydb.sqlbuilder.select.Select;
//import org.citydb.sqlbuilder.select.operator.comparison.ComparisonFactory;
//import org.citygml4j.ade.energy3.model.core.ReferencePointProperty;
//import org.citygml4j.ade.energy3.model.core.WeatherData;
//import org.citygml4j.ade.energy3.model.module.EnergyADEModule;
//import org.citygml4j.ade.energy3.model.supportingClasses.AbstractTimeSeries;
//import org.citygml4j.ade.energy3.model.supportingClasses.AbstractTimeSeriesProperty;
//import org.citygml4j.model.gml.basicTypes.Code;
//import org.citygml4j.model.gml.basicTypes.Measure;
//import org.citygml4j.model.gml.geometry.primitives.Point;
//import org.citygml4j.model.gml.geometry.primitives.PointProperty;
//
//import java.sql.Connection;
//import java.sql.PreparedStatement;
//import java.sql.ResultSet;
//import java.sql.SQLException;
//import java.util.ArrayList;
//import java.util.Collection;
//
//public class WeatherDataExporter implements ADEExporter {
//
// private final CityGMLExportHelper helper;
// private final int objectClassId;
//
// private PreparedStatement ps;
// private TimeSeriesExporter timeSeriesExporter;
// private GMLConverter gmlConverter;
// private String module;
//
// public WeatherDataExporter(Connection connection, CityGMLExportHelper helper, ExportManager manager) throws CityGMLExportException, SQLException {
// this.helper = helper;
// objectClassId = manager.getObjectMapper().getObjectClassId(WeatherData.class);
//
// //String tableName = manager.getSchemaMapper().getTableName(ADETable.WEATHER_DATA);
//// CombinedProjectionFilter projectionFilter = helper.getCombinedProjectionFilter(tableName);
//// module = EnergyADEModule.v3_0.getNamespaceURI();
////
//// Table table = new Table(helper.getTableNameWithSchema(tableName));
//
// Select select = new Select().addProjection(
// table.getColumn("id"),
// table.getColumn("type"),
// table.getColumn("type_codespace"),
// table.getColumn("value_type"),
// table.getColumn("value_type_codespace"),
// table.getColumn("yearly_value"),
// table.getColumn("yearly_value_uom"),
// table.getColumn("library_code"),
// table.getColumn("library_code_codespace"),
// table.getColumn("time_series_id"),
// table.getColumn("cityobject_id")
// );
//
// if (projectionFilter.containsProperty("position", module))
// select.addProjection(table.getColumn("position"));
//
// select.addSelection(ComparisonFactory.equalTo(table.getColumn("cityobject_id"), new PlaceHolder<>()));
//
// ps = connection.prepareStatement(select.toString());
//
// timeSeriesExporter = manager.getExporter(TimeSeriesExporter.class);
// gmlConverter = helper.getGMLConverter();
// }
//
// public Collection<WeatherData> doExport(long parentId) throws CityGMLExportException, SQLException {
// ps.setLong(1, parentId);
//
// try (ResultSet rs = ps.executeQuery()) {
// Collection<WeatherData> result = new ArrayList<>();
//
// while (rs.next()) {
// long weatherDataId = rs.getLong(1);
//
// WeatherData weatherData = helper.createObject(weatherDataId, objectClassId, WeatherData.class);
// if (weatherData == null) {
// helper.logOrThrowErrorMessage("Failed to instantiate " + helper.getObjectSignature(objectClassId, weatherDataId) + " as weather data object.");
// continue;
// }
//
// ObjectType objectType = helper.getObjectType(objectClassId);
// ProjectionFilter projectionFilter = helper.getProjectionFilter(objectType);
//
// weatherData.setId(String.valueOf(weatherDataId));
//
// // Set type
// String typeValue = rs.getString(2);
// String typeCodeSpace = rs.getString(3);
// if (typeValue != null || typeCodeSpace != null) {
// Code type = new Code();
// type.setValue(typeValue);
// type.setCodeSpace(typeCodeSpace);
// type.setParent(weatherData);
// weatherData.setType(type);
// }
//
// // Set value type
// String valueTypeValue = rs.getString(4);
// String valueTypeCodeSpace = rs.getString(5);
// if (valueTypeValue != null || valueTypeCodeSpace != null) {
// Code valueType = new Code();
// valueType.setValue(valueTypeValue);
// valueType.setCodeSpace(valueTypeCodeSpace);
// valueType.setParent(weatherData);
// weatherData.setValueType(valueType);
// }
//
// // Set yearly value and UOM
// double yearlyValue = rs.getDouble(6);
// if (!rs.wasNull()) {
// Measure yearlyMeasure = new Measure();
// yearlyMeasure.setValue(yearlyValue);
// String yearlyValueUom = rs.getString(7);
// if (yearlyValueUom != null) {
// yearlyMeasure.setUom(yearlyValueUom);
// }
// yearlyMeasure.setParent(weatherData);
// weatherData.setYearlyValue(yearlyMeasure);
// }
//
// // Set library code
// String libraryCodeValue = rs.getString(8);
// String libraryCodeSpace = rs.getString(9);
// if (libraryCodeValue != null || libraryCodeSpace != null) {
// Code libraryCode = new Code();
// libraryCode.setValue(libraryCodeValue);
// libraryCode.setCodeSpace(libraryCodeSpace);
// libraryCode.setParent(weatherData);
// weatherData.setLibraryCode(libraryCode);
// }
//
// // Set time series
// long timeSeriesId = rs.getLong(10);
// if (!rs.wasNull()) {
// Collection<AbstractTimeSeries> timeSeries = timeSeriesExporter.doExport(timeSeriesId);
// if (timeSeries != null && !timeSeries.isEmpty()) {
// AbstractTimeSeries firstSeries = timeSeries.iterator().next();
// weatherData.setTimeDependentValues(new AbstractTimeSeriesProperty(firstSeries));
// }
// }
//
// // Set position (if requested)
// if (projectionFilter.containsProperty("position", module)) {
// Object pointObj = rs.getObject("position");
// if (pointObj != null) {
// try {
// GeometryObject point = helper.getDatabaseAdapter().getGeometryConverter().getPoint(pointObj);
// if (point != null) {
// Point gmlPoint = gmlConverter.getPoint(point);
// PointProperty pointProperty = new PointProperty(gmlPoint);
// ReferencePointProperty refPointProp = new ReferencePointProperty(pointProperty);
// weatherData.setPosition(refPointProp);
// }
// } catch (Exception e) {
// // Skip invalid geometry to continue export
// }
// }
// }
//
// result.add(weatherData);
// }
//
// return result;
// }
// }
//
// @Override
// public void close() throws CityGMLExportException, SQLException {
// ps.close();
// }
//}
\ No newline at end of file
src/main/java/de/stuttgart/hft/ade/energy3/exporter/WeatherStationExporter.java
View file @
2ef0d8b9
...
...
@@ -25,7 +25,7 @@ public class WeatherStationExporter implements ADEExporter {
private
PreparedStatement
ps
;
private
TimeSeriesExporter
timeSeriesExporter
;
private
WeatherDataExporter
weatherDataExporter
;
//
private WeatherDataExporter weatherDataExporter;
private
GMLConverter
gmlConverter
;
private
String
module
;
...
...
@@ -42,7 +42,7 @@ public class WeatherStationExporter implements ADEExporter {
ps
=
connection
.
prepareStatement
(
select
.
toString
());
timeSeriesExporter
=
manager
.
getExporter
(
TimeSeriesExporter
.
class
);
weatherDataExporter
=
manager
.
getExporter
(
WeatherDataExporter
.
class
);
//
weatherDataExporter = manager.getExporter(WeatherDataExporter.class);
gmlConverter
=
helper
.
getGMLConverter
();
}
...
...
src/main/java/de/stuttgart/hft/ade/energy3/importer/AbstractQualifiedAttributeImporter.java
View file @
2ef0d8b9
...
...
@@ -10,10 +10,10 @@ import org.citydb.core.database.schema.mapping.SchemaMapping;
import
org.citydb.core.operation.importer.CityGMLImportException
;
import
org.citydb.core.operation.importer.util.GeometryConverter
;
import
org.citydb.core.registry.ObjectRegistry
;
import
org.sig3d.citygml.energyADE3beta
7
.AbstractQualifiedAttributeType
;
import
org.sig3d.citygml.energyADE3beta
7
.QualifiedAreaType
;
import
org.sig3d.citygml.energyADE3beta
7
.QualifiedHeightType
;
import
org.sig3d.citygml.energyADE3beta
7
.QualifiedVolumeType
;
import
org.sig3d.citygml.energyADE3beta
8
.AbstractQualifiedAttributeType
;
import
org.sig3d.citygml.energyADE3beta
8
.QualifiedAreaType
;
import
org.sig3d.citygml.energyADE3beta
8
.QualifiedHeightType
;
import
org.sig3d.citygml.energyADE3beta
8
.QualifiedVolumeType
;
import
java.sql.Connection
;
import
java.sql.PreparedStatement
;
...
...
src/main/java/de/stuttgart/hft/ade/energy3/importer/BuildingPropertiesImporter.java
View file @
2ef0d8b9
...
...
@@ -11,9 +11,9 @@ import org.citydb.core.operation.importer.CityGMLImportException;
import
org.citydb.core.operation.importer.util.GeometryConverter
;
import
org.citygml4j.ade.energy3.model.core.*
;
import
org.citygml4j.model.citygml.building.AbstractBuilding
;
import
org.sig3d.citygml.energyADE3beta
7
.QualifiedAreaType
;
import
org.sig3d.citygml.energyADE3beta
7
.QualifiedHeightType
;
import
org.sig3d.citygml.energyADE3beta
7
.QualifiedVolumeType
;
import
org.sig3d.citygml.energyADE3beta
8
.QualifiedAreaType
;
import
org.sig3d.citygml.energyADE3beta
8
.QualifiedHeightType
;
import
org.sig3d.citygml.energyADE3beta
8
.QualifiedVolumeType
;
import
java.sql.Connection
;
import
java.sql.PreparedStatement
;
...
...
src/main/java/de/stuttgart/hft/ade/energy3/importer/WeatherDataImporter.java
View file @
2ef0d8b9
...
...
@@ -31,10 +31,10 @@ public class WeatherDataImporter implements ADEImporter {
this
.
connection
=
connection
;
this
.
helper
=
helper
;
ps
=
connection
.
prepareStatement
(
"insert into "
+
helper
.
getTableNameWithSchema
(
manager
.
getSchemaMapper
().
getTableName
(
ADETable
.
WEATHER_DATA
))
+
" "
+
"(id, type, type_codespace, value_type, value_type_codespace, yearly_value, yearly_value_uom, library_code, library_code_codespace, time_series_id, cityObject_id, position) "
+
"values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"
);
//
ps = connection.prepareStatement("insert into " +
//
helper.getTableNameWithSchema(manager.getSchemaMapper().getTableName(ADETable.WEATHER_DATA)) + " " +
//
"(id, type, type_codespace, value_type, value_type_codespace, yearly_value, yearly_value_uom, library_code, library_code_codespace, time_series_id, cityObject_id, position) " +
//
"values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
geometryConverter
=
helper
.
getGeometryConverter
();
}
...
...
src/main/java/de/stuttgart/hft/ade/energy3/schema/ADETable.java
View file @
2ef0d8b9
...
...
@@ -6,7 +6,7 @@ import org.citydb.core.ade.importer.ADEImporter;
public
enum
ADETable
{
ADDRESS_TO_BUILDING_UNIT
(
null
),
BUILDING
(
BuildingPropertiesImporter
.
class
),
BUILDING_PARTITION
(
null
),
//
BUILDING_PARTITION(null),
CITYOBJECT
(
CityObjectPropertiesImporter
.
class
),
CTYOBJ_RELATION
(
null
),
DEVICE
(
AbstractDeviceImporter
.
class
),
...
...
@@ -15,9 +15,9 @@ public enum ADETable {
//FACILITIES(null),
//HEAT_EXCHANGE_TYPE(null),
//IMAGE_TEXTURE(null),
LAYER
(
null
),
LAYERED_CONSTRUCTION
(
null
),
//LAYER_COMPONENT(null),
LAYER
(
null
),
LIBRARY
(
null
),
MATERIAL
(
null
),
OCCUPANTS
(
null
),
...
...
@@ -25,12 +25,14 @@ public enum ADETable {
OPTICAL_PROPERTY
(
null
),
//PERIOD_OF_YEAR(null),
QUALIFIED_ATTRIBUTE
(
AbstractQualifiedAttributeImporter
.
class
),
RESOURCE
(
ResourceImporter
.
class
),
REFURBISHMENT_MEASURE
(
RefurbishmentMeasureImporter
.
class
),
RESOURCE
(
ResourceImporter
.
class
),
SCHEDULE
(
null
),
SCHEDULE_COMPONENT
(
null
),
SENSOR_DATA
(
null
),
//SYSTEM_OPERATION(null),
SOLAR_COLLECTOR
(
null
),
SPACE
(
null
),
//STORAGE_SYSTEM(null),
STORAGE_DEVICE
(
null
),
//SENSOR_CONNECTION(null),
...
...
@@ -38,14 +40,16 @@ public enum ADETable {
SUITABILITY
(
null
),
//THERMAL_BOUNDARY(null),
//THERMAL_OPENING(null),
THEM_SURF_TO_THERMAL_ZONE
(
null
),
//
THEM_SURF_TO_THERMAL_ZONE(null),
THEMATIC_SURFACE
(
null
),
//THERMAL_ZONE(null),
TIME_SERIES
(
TimeSeriesImporter
.
class
),
URBAN_FUNCTION_AREA
(
UrbanFunctionAreaImporter
.
class
),
//USAGE_ZONE(null),
UTL_NTW_CONNECTION
(
UtilityNetworkConnectionImporter
.
class
),
WEATHER_DATA
(
WeatherDataImporter
.
class
);
//WEATHER_DATA(WeatherDataImporter.class);
ZONE_OPENING
(
null
),
ZONE_THEMATIC_SURFACE
(
null
);
private
Class
<?
extends
ADEImporter
>
importerClass
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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