TopologicPy is now more than a geometry library.
It is becoming a unified computational substrate for spatial data: geometry gives form, topology gives structure, graphs give relational intelligence, and ontology gives meaning.
Geometric form
Vertices, edges, wires, faces, shells, cells, cell complexes, clusters, and apertures remain the foundation.
Semantic identity
Objects can carry canonical ontology classes such as top:Room, top:Wall, and top:AdjacencyGraph.
Graph intelligence
Spatial relationships can be queried, stored, learned from, retrieved, and generated across GQL, Kuzu, Neo4j, PyG, and GraphRAG.
Linked data
TopologicPy can move toward RDF, OWL, BOT, Brick, IFC, persistent w3id identifiers, and linked building data workflows.
Today’s ontology work turned the idea into infrastructure.
The ontology is no longer just a specification file. It now connects importers, topology, graph construction, graph databases, GQL, GraphRAG, PyG, RDF export, RDF import, and validation.
Canonical namespace
The ontology uses a persistent namespace intended to survive changes in hosting infrastructure.
@prefix top: <http://w3id.org/topologicpy#> .
The physical TTL file is hosted by GitHub Pages, while w3id provides the persistent identifier.
Formal ontology specification
The TTL file defines classes, properties, subclass relations, BIM concepts, topology concepts, graph concepts, provenance terms, analysis metrics, and BOT/Brick alignment.
Ontology.py became the semantic API
The class now standardises annotation, class/category inference, IFC mapping, validation, Turtle export, Turtle validation, and RDF/Turtle graph import.
IFC import became ontology-aware
Imported IFC entities can be annotated with ontology_class, ifc_class, ifc_guid, source, category, label, and provenance.
Graphs became semantic carriers
Graph vertices and edges can preserve ontology classes and categories through construction, database round-trips, GQL queries, PyG datasets, and GraphRAG generation loops.
Persistence and query layers were aligned
GraphDB, Kuzu, Neo4j, GQL, Parser, and Executor were reconciled so ontology metadata can be stored, retrieved, matched, and projected consistently.
Regression tests and notebooks were added
The new test suite and IFC ontology notebook check annotation, validation, Turtle export/import, GQL matching, and optional graph database round-trips.
A semantic backbone for spatial computing.
The ontology turns TopologicPy dictionaries into a shared semantic contract. The same keys and classes can travel through geometry, topology, IFC, graph databases, graph machine learning, GQL, GraphRAG, and RDF.
Core ontology keys
Stable dictionary keys make semantic metadata portable across TopologicPy workflows.
- ontology_class
- ontology_uri
- category
- label
- uri
- source
- generated_by
- derived_from
BIM provenance
IFC imports can retain enough provenance to support quality control, traceability, and linked building data.
- ifc_class
- ifc_guid
- ifc_name
- source file
- BOT alignment
- Brick alignment
Graph intelligence
Semantic graphs can support retrieval, reasoning, analytics, machine learning, and generative workflows.
- AdjacencyGraph
- VisibilityGraph
- KnowledgeGraph
- GraphDB
- GQL
- GraphRAG
- PyG
Ontology-aware Python
Annotate an object once, then preserve the semantic contract across downstream workflows.
from topologicpy.Ontology import Ontology
Ontology.Annotate(
cell,
ontologyClass="top:Room",
label="Room 101",
source="model.ifc",
generatedBy="IFC.TopologiesByPath"
)
ttl = Ontology.TTLString(cell)Ontology-aware graph query
GQL can target semantic classes rather than only raw dictionary labels.
from topologicpy.GQL import GQL
query = '''
MATCH (r:top:Room)-[e]->(s:top:Space)
RETURN r.label AS room,
s.label AS adjacent_space
'''
rows = GQL.Query(graph, query)IFC to semantic graph
IFC entities can become topologies and graphs that preserve BIM identity, topology, and ontology.
from topologicpy.IFC import IFC
from topologicpy.Ontology import Ontology
graph = IFC.SpaceAdjacencyGraph(
"model.ifc",
ontology=True
)
report = Ontology.ValidateGraph(graph)RDF export and import
TopologicPy can participate directly in linked-data and semantic-web workflows.
Ontology.ExportTTL(
graph,
"building_graph.ttl",
includeGraph=True,
includeBOT=True
)
restored = Ontology.GraphByTTLPath(
"building_graph.ttl"
)One model. Many computational lives.
A building can be a geometric model, a topological model, a graph, an IFC-derived dataset, a graph database, a GNN dataset, an RDF document, and a reasoning substrate. The ontology is what lets those identities remain connected.
- Vertex
- Edge
- Wire
- Face
- Shell
- Cell
- CellComplex
- Cluster
- Aperture
- Dictionary
- Graph
- Space
- Room
- Building
- Storey
- Interface
- Wall
- Door
- Window
- AdjacencyGraph
- VisibilityGraph
- CirculationGraph
- ConnectivityGraph
- KnowledgeGraph
- GraphRAG
- GQL
- PyG
- RDF
- OWL
- BOT
- Brick
- IFC
Ontology resources
Persistent identifier policy
The canonical namespace is http://w3id.org/topologicpy#. If the physical hosting location changes, the redirect can change without breaking published data.
Maintainer
Professor Wassim Jabi, Welsh School of Architecture, Cardiff University. Source code and ontology development are maintained in the TopologicPy repository.