Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer

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/

share|improve this answer
1  
wow, both links are really impressive. –  nickves Apr 10 '13 at 13:44
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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