Skip to content

Latest commit

 

History

History
46 lines (30 loc) · 2.61 KB

README.md

File metadata and controls

46 lines (30 loc) · 2.61 KB

Introduction

Height vis will determinate line of sight visibility information for an object on the earth's surface, using SRTM topography data.

Dependencies

  • numpy
  • libtiff
  • matplotlib
  • opencv2

Setup

  1. Install the dependencies (see "Dependencies" above). You may want to setup a virtualenv for this.
  2. Run setup.py install to build and install the extension module.
  3. Download SRTM tile for the area you're interested in, using the SRTM tile grabber.
  4. Optional: Obtain 1:250 000 OS map data from the OS website. Skip this step if you're not mapping an area in Britain, or you don't want a map to be overlaid.

Running

Here's a sample invocation that plots visibility of the Shard from the area surrounding Newbury.

python heightvis.py 
    -i data/srtm/srtm_36_02.tif -w data/srtm/srtm_36_02.tfw # SRTM data files,
    -e '51.5045 -0.0865 306'                                # Latitude/longitude/height of the target
    -o data/ras250_gb.zip                                   # 1:250 000 OS map data
    -c '51.397849 -1.343434' -s 0.3                         # Coordinates of view centre, and view size in degrees.

(For more options run python heightvis.py --help.)

The calculation will take a few minutes to complete, after which you'll be presented with an interactive display. The left hand side is a plot of visibility information: Grey areas are where the target is not visible:

Clicking on a point on the left hand side will update the right hand side with a cross-sectional profile view:

In this case a visible (ie. not grey) point on the image was clicked. It shows three lines:

  • Blue line: Elevation of the terrain on the line between the clicked piece of terrain and the target.
  • Red line: Sight line from the terrain to the target. (If this intersects with the blue line, then the view is blocked.)
  • Green line: Earth curvature on the line between the clicked piece of terrain and the target. This is the offset applied to the raw height data to account for curvature of the earth.