When researching this topic I haven't been able to verify if it's possible to make spatial 3D Intersect queries between a vector polygon with z-values and GeoTIFF/DEM file holding the elevation values?
The intersect query I want to run should basically take a planned house (polygon with building height stored as a z-value in the attribute table) and check if it spatially intersects in the z-dimension with height limitations calculated with the plugin advanced viewshed analysis (QGIS).
reading PostGIS documentation on ST_Intersects and ST_3DIntersects rules out the standard ST_intersects query since its only two dimensional. And from what I can understand the ST_3DIntersects query can't work with GeoTIFF's/DEM's? Only TIN-images if SFCGAL backend has been enabled.
ST_3DIntersects — Returns TRUE if the Geometries "spatially intersect" in 3d - only for points, linestrings, polygons, polyhedral surface (area). With SFCGAL backend enabled also supports TINS
I could probably convert my GeoTIFF's to TIN but I rather not since I have 400 GB of already calculated results from the viewshed analysis.
Is there to your knowledge, any know way to run this kind of intersect query with QGIS/PostGIS?