globallightingdata / gldf

Global Lighting Data Format
https://gldf.io
MIT License
15 stars 5 forks source link

How to store "multi-value" BIM properties in custom properties? #14

Closed mrmonat closed 1 year ago

mrmonat commented 2 years ago

I am currently trying to provide additional BIM information into the GLDF file using CustomProperties/Property.

The following bim attribute supports "n" values for one "property". How should this information be stored in the xml?

The attribute: Bildschirmfoto 2022-06-03 um 10 10 06

CustomProperties/Property XSD: Bildschirmfoto 2022-06-03 um 10 08 33

Is this XML snippet correct for "simpler" BIM properties? (for example 1 value of type string):

<Property id="1dPvrZN3vEIB0n0vwYvDcX"><!-- GlobalID from BIM spreadsheet? -->
    <Name>
        <Locale language="de">Breite</Locale>
        <Locale language="en">width</Locale>
     </Name>
     <PropertySource>BIM</PropertySource>
     <Value>107</Value><!-- How to provide multiple values here? -->
</Property>

Another question is how to provide translated values for "string" bim properties without values sets?

holg commented 2 years ago

You might consider which of those might as well be Marketing - type Application - attributes, otherwise... Property is a list item of the parent CustomProperties, id did not check, but it should work like this:

<CustomProperties>
    <Property id="1dPvrZN3vEIB0n0vwYvDcX">
        <Name>
            <Locale language="de">Breite</Locale>
            <Locale language="en">width</Locale>
         </Name>
         <PropertySource>BIM</PropertySource>
         <Value>107</Value><!-- How to provide multiple values here? -->
    </Property>
</CustomProperties>
mrmonat commented 2 years ago

I know that I can list many Property inside CustomProperties but I have to list multiple Values inside one Property, for example:

<CustomProperties>

    <Property id="1dPvrZN3vEIB0n0vwYvDcX">
        <Name>
            <Locale language="de">Breite</Locale>
            <Locale language="en">width</Locale>
         </Name>
         <PropertySource>BIM</PropertySource>
         <Value>107</Value><!-- Single numeric value, everything okay, works. -->
    </Property>

    <Property id="XXXXXXXXXX">
        <Name>
            <Locale language="de">Anwendung</Locale>
            <Locale language="en">application</Locale>
         </Name>
         <PropertySource>BIM</PropertySource>
         <Values><!-- currently not supported, but needed for some BIM attributes with value sets and n possible values -->
             <Value>Indoor</Value>
             <Value>Outdoor</Value>
         </Values>
    </Property>

    <Property id="XXXXXXXXXX">
        <Name>
            <Locale language="de">Beispiel</Locale>
            <Locale language="en">example</Locale>
         </Name>
         <PropertySource>BIM</PropertySource>
         <Values><!-- currently not supported, but needed for some BIM attributes without value sets and 1 possible string value-->
             <Value language="de">Beispielwert Deutsch</Value>
             <Value language="en">Beispielwert Englisch</Value>
         </Values>
    </Property>

</CustomProperties>
Kurpanik commented 2 years ago

I think the question ist how to provide multiple values for one specific property. Something like multiple colors for example. Currently there is no specification in GLDF for this, because we cannot cover all cases. And we want to keep it simple.

But there could be conventions that can be used for writing and reading such custom properties in applications. Like a separator for multiple values:

<CustomProperties>
    <Property id="1dPvrZN3vEIB0n0vwYvDcX">
        <Name>
            <Locale language="en">Colors</Locale>
         </Name>
         <PropertySource>BIM</PropertySource>
         <Value>Red;Green;White</Value> <!-- semicolon-separated values here-->
    </Property>
</CustomProperties>

Or a hyphen for value ranges:

<CustomProperties>
    <Property id="1dPvrZN3vEIB0n0vwYvDcX">
        <Name>
            <Locale language="en">Some important temperature range</Locale>
         </Name>
         <PropertySource>BIM</PropertySource>
         <Value>15-80</Value> <!-- range determined by a hyphen -->
    </Property>
</CustomProperties>
Kurpanik commented 2 years ago

However, when the need arises for "type-safe" definitions of multiple values in one custom property in the GLDF, we could also consider an adaptation of the format like in your example above.

It would be interesting to hear whether the proposed solution above would be sufficient for you?

mrmonat commented 2 years ago

If I remember correctly, in one of the first GLDF introduction webinars it was mentioned, that BIM properties (https://gldf.io/download#bim---building-information-modeling) should be provided via <CustomProperties>. The reason for us trying to provide BIM properties into our GLDF files is, that we thought it would be added / needed to the .ifs / .rfa files generated by RELUX / DIAL from our GLDF files. Is this even needed / planned or are only the "core" / "default" GLDF properties taken into account while converting to .ifs / .rfa? In that case we would simply not include any CustomProperties into our GLDF files.

Kurpanik commented 2 years ago

Basically we recommend maintaining as much data as possible. GLDF is an open format with more and more use cases and stakeholders. Perhaps there is a need for the BIM properties elsewhere in the future.

But speaking at this point (and from my side for DIAL only): First of all, we will integrate the format into DIALux and not evaluate the CustomProperties - at least in the medium term. This does not mean that our IFC applications and services could not be extended in the future and handle GLDF including BIM inside CustomProperties as well. However, there are no concrete plans for this at the moment - the priority currently in to support GLDF is DIALux.