12

I would like to retrieve the set of buildings I can see from a given location (point -lat,lng) and orientation (interval of angles) + certainly with a given depth (e.g. 100 meters). Ideally I would like as output something like: from angle 1 to angle2 the user can see building 1, from angle 2 to angle3 we see building 2.

Data = Polygons representing the buildings of a city in shapefile.

input: a location and an orientation (angle range) to represent the visual perception of a person.

output:
Version 1 - a list of {BuildingID}
Version 2 (better)- list of {BuildingID, set of visible segments for each building (facade of buildings)}
Version 3 (ideal output) - a list of {buildingID, angle ranges}. (for exemple , from angle 1 to angle2 the user can see building 1, from angle 2 to angle3 we see building 2, etc..)

Toolbox I can use: PostGis, QGis, ruby, R

start of solution for output v1:
- creating a triangle representing the simplified visual scope of the user for a given point and orientation (internval of angle) and with a certain radius/deepth (e.g. 100 meters)
- computing intersection with buildings (e.g. ST_INTERSECTION) and visual scope. but a building can hide another one so pure intersection between visual scope and buildings might add no visible buildings. this issue need to be tackled.

update: potential solution 2 - creating a triangle representing the simplified visual scope of the user for a given point and orientation (internval of angle) and with a certain radius/deepth (e.g. 100 meters) - creating n rays (LINE) at different angles filling the scopes.
- transforming all buildings(POLYGONS) into SEGMENTS/LINES
- for each ray finding the closest SEGMENT and the related buildingID. (ST_DISTANCE , ST_DWithin)
at this stage so we should have a list of rays and the related building ID.
- then we could aggregate this list {ranges of angle,related building ID}.

Any idea about a more efficient way to do?

1 Answer 1

5

Here's two examples. First, a video showing off the new QGIS Globe plugin, but also showing PostGIS's 3d functions:

http://vimeo.com/54776907

Second, an example of viewshed analysis using PostGIS, R, and GRASS:

http://www.dimensionaledge.com/main/postgis/viewshed-analysis-in-postgis-using-plr-and-grass/

1
  • 1
    second link is not working? Jun 2, 2020 at 23:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.