Geospatial Modelling Environment

lineofsight2d (Line Of Sight (2D))

Generates polygons representing visible areas from source viewpoints given a polygon barrier dataset


This tool defines the area that is visible from a source point given a set of barriers (polygons) that block the line of sight. The outer limits of the visible area are defined by a radius the user specifies. If multiple viewpoints are specified, then the output can be specified as independent polygons, the union of these polygons, or the intersection of these polygons. This facilitates answering questions such as 'What area can be seen from any viewpoint?' and 'What area can be seen from all viewpoints simultaneously?'.

This is a two dimensional vector model of visibility in contrast to the three dimensional raster DEM based model of visibility. There are advantages and disadvantages to both approaches. The advantage of this 2D vector model is that it may be more precise (often the horizontal extent of objects is mapped more precisely than the vertical dimension). The disadvantage is that it does not account for elevation, rather it assumes that all barriers block visibility.


lineofsight2d(poly, radius, out, [pnt], [source], [independent], [union], [intersect], [where]);

polythe barrier polygon data source
radiusthe maximum radius around source points out to which the visibility polygons is calculated
outthe output polygon data source
[pnt]input point data source representing the locations from which visibility polygons are calculated (see the 'source' option as an alternative to this parameter)
[source]the coordinates of the location from which the visibility polygon is calculated specified using the c(x, y) syntax (see the 'pnt' for an alternative way of specifying this location
[independent](TRUE/FALSE) if true, one polygon is produced for each input point regardless (polygons are independent of one another and may overlap) (default=TRUE)
[union](TRUE/FALSE) if true, one polygon is produced as output by unioning all the visibility polygons, thereby representing all areas that can be seen from at least one source point (default=FALSE)
[intersect](TRUE/FALSE) if true, one polygon is produced as output by intersecting all the visibility polygons, thereby representing the areas that can be seen from all source points (default=FALSE)
[where]the filter/selection statement that will be applied to the input polygon data source to identify a subset of features to process


lineofsight2d(poly="C:\data\islands.shp", radius=20000, out="C:\data\visible.shp", pnt="C:\data\observers.shp", union=TRUE);

lineofsight2d(poly="C:\data\obstacles.shp", radius=1000, out="C:\data\visible.shp", source=c(123456.1,9876543.9));

lineofsight2d(poly="C:\data\barriers.shp", radius=50000, out="C:\data\visible.shp", pnt="C:\data\targets.shp", intersect=TRUE);


Please consider making a purchase to support the continued development of these tools  Read more...

Tips on how to use this interface efficiently 


Open Source GIS

Copyright © 2001-2014 Hawthorne L. Beyer, Ph.D., Spatial Ecology LLC    Connect on LinkedIn