Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

simplification of header #4

Open
janbrouwer opened this issue May 30, 2020 · 4 comments
Open

simplification of header #4

janbrouwer opened this issue May 30, 2020 · 4 comments
Assignees

Comments

@janbrouwer
Copy link
Collaborator

janbrouwer commented May 30, 2020

Until now I have been creating (optional) headers for IFCJSON files like this:

{
    "header": {
        "file_description": {
            "description": "ViewDefinition [CoordinationView]",
            "implementation_level": "2;1"
        },
        "file_name": {
            "name": "7m900_tue_hello_wall_with_door.json",
            "time_stamp": "2020-05-30T09:18:25",
            "author": "",
            "organization": "",
            "preprocessor_version": "IFC-manager for SketchUp (3.0.1)",
            "originating_system": "SketchUp Pro 2018 (18.0.16975)",
            "authorization": ""
        },
        "file_schema": "IFC2X3"
    },
    "data": [
        {
            "type": "IfcProject",

I propose to change it to something like this:

{
    "type": "ifcjson",
    "file_description": {
        "description": "ViewDefinition [CoordinationView]",
        "implementation_level": "2;1"
    },
    "file_name": {
        "name": "7m900_tue_hello_wall_with_door.json",
        "time_stamp": "2020-05-30T09:09:10",
        "author": "",
        "organization": "",
        "preprocessor_version": "IFC-manager for SketchUp (3.0.1)",
        "originating_system": "SketchUp Pro 2018 (18.0.16975)",
        "authorization": ""
    },
    "file_schema": "IFC2X3",
    "data": [
        {
            "type": "IfcProject",

Where I added a main "type", and flattened the "header" section.
That main type could be mandatory because it tells a parser that it can expect "ifcjson" data.
The STEP style file_description, file_name and file_schema could also be further flattened or simplyfied by stripping the "file_".

@pipauwel
Copy link
Contributor

I am still not a big fan of the header, as I think that it is content that belongs in a file system, not inside a file.

That being said, if we indeed keep the header, your suggested changes look good, and it is fine to include them. I would additionally:

  • remove "file_" prefixes
  • opt for camelCase everywhere, instead of the underscore_case
  • aim to keep removing empty attributes (e.g. author, organisation).
  • abandon IFC2x3 examples

@janbrouwer
Copy link
Collaborator Author

janbrouwer commented May 30, 2020

I am still not a big fan of the header, as I think that it is content that belongs in a file system, not inside a file.

That being said, if we indeed keep the header, your suggested changes look good, and it is fine to include them.

I think it's a good idea to minimize header information as much as possible and like to replace the explicit "header" part with some file-describing meta-data.
And make this information optional.
I do agree that filename should be part of the filesystem and not of the file header, because you want to be able to change that afterwards completely.
But I do think we need a formal method to describe:

  • what version of the IFC base schema the file claims to adhere to.
  • what version of IFC JSON the file claims to adhere to.
  • declare that the data is IFC JSON (and not for example GeoJSON).
  • see when the file is created, because the file-system infromation mostly gets messed up on transfers and modifications.
    And with less importance I would like to be able to set:
  • preprocessorVersion
  • originatingSystem
    To be able to see what application is responsible for generating the data.

I would additionally:

  • remove "file_" prefixes

agreed

  • opt for camelCase everywhere, instead of the underscore_case

agreed

  • aim to keep removing empty attributes (e.g. author, organisation).

agreed

  • abandon IFC2x3 examples

agreed, but that essentially rules out sketchup for generating any IFC JSON data for the time being.

@janbrouwer
Copy link
Collaborator Author

Proposal for exchange of IFC JSON for a complete model (for snippets, just the contents of "data"):

{
    "type": "ifcjson",
    "schema": "IFC4",
    "description": "ViewDefinition [CoordinationView]",
    "timeStamp": "2020-05-30T09:09:10",
    "preprocessorVersion": "IFC-manager for SketchUp (3.0.1)",
    "originatingSystem": "SketchUp Pro 2018 (18.0.16975)",
    "data": [
        {
            "type": "IfcProject",

@pipauwel
Copy link
Contributor

+++ fully agree

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants