Advertisement
Guest User

Untitled

a guest
Feb 20th, 2020
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.87 KB | None | 0 0
  1. SELECT DISTINCT
  2. SLAB.elementid, ST_ID.elev
  3. FROM
  4. bimrl.bimrl_element_016F SLAB,
  5. bimrl.bimrl_spatialstructure_016F SLAB_ST,
  6. (
  7. SELECT DISTINCT
  8. F_STOREY.elementid,
  9. F_STOREY.transform_col[3][4] as elev
  10. FROM
  11. bimrl.bimrl_element_016F F_STOREY,
  12. (
  13. SELECT DISTINCT
  14. STOREY.elementid,
  15. STOREY.transform_col[3][4] as elev
  16. FROM
  17. bimrl.bimrl_element_016F STOREY,
  18. bimrl.bimrl_spatialstructure_016F STRUCT,
  19. (
  20. SELECT DISTINCT
  21. DIS.elementid,
  22. DIS.container,
  23. DIS.geometrybody_bbox[2].Z
  24. FROM
  25. bimrl.bimrl_element_016F DIS,
  26. bimrl.bimrl_type_016F DTYPE
  27. WHERE
  28. lower(DTYPE.ifctype) = 'ifcdistributionchamberelementtype'
  29. AND
  30. (
  31. lower(DTYPE.predefinedtype) SIMILAR TO '(inspectionchamber|manhole)'
  32. OR lower(DIS.objecttype) SIMILAR TO '(inspectionchamber|manhole)'
  33. )
  34. AND DIS.typeid = DTYPE.elementid
  35. ORDER BY
  36. DIS.geometrybody_bbox[2].Z DESC LIMIT 1
  37. )
  38. DIST
  39. WHERE
  40. STOREY.elementtype ILIKE '%storey%'
  41. AND DIST.container = STRUCT.spatialelementid
  42. AND STRUCT.parentid = STOREY.elementid
  43. )
  44. STOREY
  45. WHERE
  46. F_STOREY.elementtype ILIKE '%storey%'
  47. AND STOREY.elev <= F_STOREY.transform_col[3][4] LIMIT 3
  48. )
  49. ST_ID
  50. WHERE
  51. SLAB.elementtype ILIKE '%slab%'
  52. AND SLAB.container = SLAB_ST.spatialelementid
  53. AND SLAB_ST.parentid = ST_ID.elementid
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement