reteplayground
Select

GeoSPARQL in 3D — the 10 elements nearest the staircase

ElementTypeM
IfcRailing @enIfcRailing1.66
Wand-Int-ERDG-4 @enIfcWallStandardCase2
EG-Fenster-8 @enIfcWindow2.1
EG-Fenster-9 @enIfcWindow2.31
Run this query → no server · no download · no account
caviri.github.io/rete
Run this query in the playground → 10 rows · 278 ms · no server, no download — the query runs in your browser.

The query

PREFIX bot: <https://w3id.org/bot#> PREFIX cad: <https://w3id.org/rete/cad#> PREFIX geo: <http://www.opengis.net/ont/geosparql#> PREFIX geo3: <https://w3id.org/rete/geo3#> PREFIX geof3: <https://w3id.org/rete/geo3/function/> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> SELECT ?element ?type (ROUND(geof3:distance3D(?sw,?w)*100)/100 AS ?m) WHERE { ?stair cad:ifcClass "IfcStair" ; geo:hasGeometry/geo3:asWKT3D ?sw . ?e a bot:Element ; rdfs:label ?element ; cad:ifcClass ?type ; geo:hasGeometry/geo3:asWKT3D ?w . FILTER(?e != ?stair && ?type != "IfcOpeningElement") } ORDER BY ?m LIMIT 10

rete playground · documentation · github.com/caviri/rete