3dcitydb icon indicating copy to clipboard operation
3dcitydb copied to clipboard

Purpose of "datatype" column?

Open clausnagel opened this issue 2 years ago • 7 comments

What is the purpose of the datatype column in the property table?

clausnagel avatar Jun 07 '22 18:06 clausnagel

the datatype should be given as a qualified datatype name from the CityGML schema (e.g. gml:GenericName, gml:DateTime)

according to this doc https://github.com/tum-gis/3dcitydb-v5/blob/master/docs/meeting_recordings/2021_10_19_3DCityDB_Version_5.0_Kolbe.xlsx

yaozhihang avatar Jun 07 '22 21:06 yaozhihang

I see the following issues:

  1. I think we should keep the database free from encoding-specific stuff like GML type names. We could store the type name as defined in the conceptual model - but that implicitly follows from the qualified name of the property already.
  2. The type name is stored redundantly with every instance of a property. This will let the property table grow. We should have a good use case why we need this.

This needs more discussion.

clausnagel avatar Jun 08 '22 07:06 clausnagel

It is a column to keep properties decomposable. For example. lod2Solid properties in the table have namespace values as "core", name values as "lod2Solid" and they have "gml:Solid" as datatype values. So, feature_id, namespace, name and index numbers are enough to define/differ geometries, but they are still keeping gml definitions on same table.

muratkendir avatar Jun 08 '22 09:06 muratkendir

Not sure whether this speaks in favor of keeping or dropping the colunm?

In any case we should keep this independent from GML.

clausnagel avatar Jun 08 '22 09:06 clausnagel

I feel myself very conservative at this moment :) So, i prefer to keep datatype column.

muratkendir avatar Jun 08 '22 09:06 muratkendir

For the same reason I would drop it because we didn't have it in v4 and I never missed it :-) We can keep this issue open to collect use cases and reasons for having the column.

In your example, note that the data type of the "lod2Solid" attribute is not "gml:Solid" but "gml:SolidPropertyType". And this property type can be used to either store a "gml:Solid" or a "gml:CompositeSolid". So, if you want to store "gml:Solid" as information here, then you want to store the name of the attribute value not of the data type. That's a difference. The value is available from the geometry_data table.

clausnagel avatar Jun 08 '22 10:06 clausnagel

agree with @clausnagel

yaozhihang avatar Jun 08 '22 10:06 yaozhihang