0

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?

  • By offering to use other software you make this question too broad. The documentation you cite does not include rasters. It seems like you will need to do this the old-fashioned way, by using the database to nominate candidates from 2D overlap and processing the results you need in your own code. You have sufficient reputation to attempt a discussion on this topic in Geographic Information Systems Chat, but you are more likely to get answers in some other doscussion forum. – Vince Jan 9 '18 at 12:47
  • Removed the part about other software. All my rasters have the same extent (the city of Stockholm), so the old-fashioned way to nominate candidates from 2D overlap is unnecessary, 99,9% overlap xy-wise. It's the z-intersection for each cell I need. I guess I'll just have to keep on doing these analysis manually but any directions to a potential solution what so ever are welcome! – johlund Jan 10 '18 at 23:29
  • Are you trying to find the intersection of the vector/polygon buildings and the DEM, or where the buildings coincide with a viewshed layer based on the DEM and observer points? One thought that came up, it might make sense to incorporate your buildings into the DEM - convert from vector to raster with the z value as Attribute field, and then add to DEM with raster calculator and re-run your viewshed analysis. – AlecZ Jan 11 '18 at 0:05
  • The intersection, since I want to be able to flag new planned development as a 'potential conflict' if it pierces through the lowest sightline (=is visible from any of my 381 viewshed points) The viewshed analysis was executed on a DEM where buildings and vegetation was stacked on the ground elevation, just like you suggested. – johlund Jan 11 '18 at 6:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.