[postgis-users] Line of sight (LOS) Calculation

Mark Wynter mark at dimensionaledge.com
Sun Mar 8 14:44:39 PDT 2015


Grass r.viewshed is very good and fast, and plays nicely with postgis et al. We are talking about seconds per viewshed.

You keep your DEM in grass. Then set the g.extent of the DEM raster to define your area of interest. This is very important to get fast calculation times.

Once you've called r.viewshed, you need to convert to a vector using r.to.vect. Then export to Postgis using v.out.ogr

This will give you a viewshed in postgis which you can then query in the usual way.

If you're looking to parallelise, then g.extent doesn't - each map set can only ever have 1 extent - there are ways around this.

I've run this r.viewshed to PostGIS process at scale for mobile telco operators with 20,000 plus towers x N scenarios per tower.  Works well.



> I wander if there is an experience with such task and what will be the
> execution time for a single query


More information about the postgis-users mailing list