Have you looked at just using IFC? It’s the canonical “building as a graph” BIM format. Whether the in memory IFC allows querying I suppose is up to the implementation, I have only used xbim https://github.com/xBimTeam
Ask HN: I'm trying to represent an entire building as a graph
21–30 of 30 posts
Re: Ask HN: I'm trying to represent an entire building as a graph
#22So is the in-memory representation! Have you thought about using lazy structures? The graph can be conceptually infinite in size but your program only loads the pieces being used as they are needed and offloads old ones that are not.
Re: Ask HN: I'm trying to represent an entire building as a graph
#23Why were not graphs embraced by other domains? Plan and elevations by definition are constrained view points. (Hint: for the same reason the highly available and highly consistent flavors of graph databases require paid licenses :)
Graphs make for difficult decomposable 'unit' assemblies. Plans and elevations are 'standard units'. (Again: it may help to think of as plans and elevations as tables and reverse indexes, respectively.)
Note requirements such as e.g. "show directions from one entity to another" are also present for documenting the electrical systems, or HVAC, in a building.
A modular system for representing graphs of arbitrary scale is the minimal and trivial 'one node per modular unit'. The alternative is throwing huge amounts of processing power to allow arbitrary views into a graph at any scale.
IoT, as an 'integrated component' of building systems, will find a very happy place on plans and elevations.
Re: Ask HN: I'm trying to represent an entire building as a graph
#24http://treenotation.org/sandbox/build/#grammar%0A%20nodeType...
Re: Ask HN: I'm trying to represent an entire building as a graph
#25http://www.texample.net/tikz/examples/pressurized-water-reac...
Re: Ask HN: I'm trying to represent an entire building as a graph
#26graphviz
It depends on what is really needed there. If is interactive or not and how complex. To draw a very complex building, something that will not place nodes and move lines around by itself (Autocad, etc) could be easily the weapon of choice here.
Re: Ask HN: I'm trying to represent an entire building as a graph
#27I'm doing something quite similar at the moment
Re: Ask HN: I'm trying to represent an entire building as a graph
#28graphviz
Graphviz is fine, specially for small graphs, but probably not what is required here. Plain pdf could be less painful if your graph program choose automatically reorder the data as it wants to optimize shorter paths (mixing nodes in second and fifth floor and then drawing first floor above the others for example is not what you could want). It depends on what is really needed there. If is interactive or not and how c…
Being text based it is easily manipulable and readily scalable to many nodes. It also supports subgraphs.
I am surprised at being downvoted when suggesting what is quantifiably the most mature tool in the space.
PDF is a presentation format, and has nothing to do with graphs in the sense of data structures. The fact that the original question references photoshop shows that the person asking is not approaching the problem from a formal standpoint. This is asking for trouble.
Frankly, I am not sure a graph is the right data structure for this problem. It is more likely that a general purpose database would fulfil current and future requirements more effectively. Graphs could be generated from that trivially as representations.
Re: Ask HN: I'm trying to represent an entire building as a graph
#29Earlier quoted context omitted.
Graphviz is fine, specially for small graphs, but probably not what is required here. Plain pdf could be less painful if your graph program choose automatically reorder the data as it wants to optimize shorter paths (mixing nodes in second and fifth floor and then drawing first floor above the others for example is not what you could want). It depends on what is really needed there. If is interactive or not and how c…
Graphviz is a family of tools and a file format. Being text based it is easily manipulable and readily scalable to many nodes. It also supports subgraphs. I am surprised at being downvoted when suggesting what is quantifiably the most mature tool in the space. PDF is a presentation format, and has nothing to do with graphs in the sense of data structures. The fact that the original question references photoshop shows…
I agree in the database focus
Re: Ask HN: I'm trying to represent an entire building as a graph
#30As you talked about BIM, I guess you are already aware of IFC. The real question is that your use case isn't very clear to me. What are you trying to achieve? Visualize a graph?