3dcitydb / energy-ade-citydb

Energy ADE extension for the 3DCityDB
Apache License 2.0
7 stars 4 forks source link

Issues when importing data (WeatherStation) #2

Closed gioagu closed 3 years ago

gioagu commented 3 years ago

Hi,

I have been testing a bit the Importer/Exporter (3DCityDB 4.3 RC1) and data generated using the KIT profile of the Energy ADE.

I attach also a small dataset to replicate the errors. The sample data contains 1 WeatherStation. The WeatherStation has 2 WeatherData objects modelled via the "parameter" property of class WeatherStation, and 2 WeatherData objects modelled via the "weatherData" property of the ADE_CityObject. Please note that, strictly speaking, the "parameter" property is redundant and will be removed in the next Energy ADE version.

Issues:

1) The gml_id, name and description properties (from CityObject) of the weather station are not imported. This cityobject is assigned a (new) id generated upon import. 2) Only the WeatherData objects via "parameter" are imported, the 2 via "weatherData" are ignored 3) Gml_ids of WeatherData objects are ignored and not imported. They are assigned a (new) id generated upon import. 4) Objects of class WeatherData and (Regular)TimeSeries have some attributes written in the CITYOBJECT table. I think this is wrong.

Test data:

202104211_weather_data_Energy_ADE_weather_station_par2.zip

clausnagel commented 3 years ago

Thanks @gioagu for spotting the issues.

Issues 1-3 are bugs in the citygml4j module for parsing Energy ADE data and have been fixed there: https://github.com/citygml4j/energy-ade-citygml4j/commit/5f4161abb30e81c573d07655fca00cca71202ce1

Issue 4 is not a bug. All objects having an identifier are registered in the CITYOBJECT table. In terms of CityGML and ADEs, this means all types derived from gml:AbstractGMLType and not just types derived from core:AbstractCityObjectType.

I found another issue in the Importer/Exporter when exporting your dataset, because the WeatherData objects were missing in the output. So, thanks for providing the dataset :-) The PR fixing this issue is here: https://github.com/3dcitydb/importer-exporter/pull/184

You can try and build a new version from the sources. But we will also publish a new release soon.

clausnagel commented 3 years ago

fixed in version 1.2.1