Skip to content

Easier import location (Site, Building, Storey, Space) #228

Description

@s-celles

Hello,

In BEMServer, locations have a hierachical form. 4 CSV files can be used to import location (site, building, storey, space)
Maybe supporting YAML import should be considered as it can be a very convenient maner to populate database with sample data (in an human readable format).

---
sites:
  Site 1:
    latitude: -90
    longitude: -180
    description: AAAAAA
    ifc_id: AAAAAA
    buildings:
      Building 1:
        description: AAAAAA
        ifc_id: AAAAAA
        storeys:
          R0:
            description: AAAAAA
            ifc_id: AAAAAA
            spaces:
              ROOM 1:
                description: AAAAAA
                ifc_id: AAAAAA
              ROOM 2:
                description: AAAAAA
                ifc_id: AAAAAA
          R1:
            description: AAAAAA
            ifc_id: AAAAAA
      Building 2:
        description: AAAAAA
        ifc_id: AAAAAA

Linting and viewing such a file can be done using online tools such as https://jsonformatter.org/yaml-viewer and https://www.yamllint.com/

Others options to consider could be TOML
https://transform.tools/yaml-to-toml

[sites."Site 1"]
latitude = -90
longitude = -180
description = "AAAAAA"
ifc_id = "AAAAAA"

[sites."Site 1".buildings."Building 1"]
description = "AAAAAA"
ifc_id = "AAAAAA"

[sites."Site 1".buildings."Building 1".storeys.R0]
description = "AAAAAA"
ifc_id = "AAAAAA"

[sites."Site 1".buildings."Building 1".storeys.R0.spaces."ROOM 1"]
description = "AAAAAA"
ifc_id = "AAAAAA"

[sites."Site 1".buildings."Building 1".storeys.R0.spaces."ROOM 2"]
description = "AAAAAA"
ifc_id = "AAAAAA"

[sites."Site 1".buildings."Building 1".storeys.R1]
description = "AAAAAA"
ifc_id = "AAAAAA"

[sites."Site 1".buildings."Building 2"]
description = "AAAAAA"
ifc_id = "AAAAAA"

Kind regards

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions