-
Notifications
You must be signed in to change notification settings - Fork 3
Home
by Collin Bode
SSR is a model written in python that runs within GRASS GIS. To use, it requires installing and configuring GRASS, creating a grass workspace appropriate to your target area, and importing the LiDAR data into the workspace. Once all of this is accomplished, then you can run the model. Light modeling requires ray-tracing, which is extremely computationally expensive. It also is memory intensive. The output of the model is raster maps of insolation in watt-hours per meter squared. It runs for one calendar year and produces one representative map per week. This is 52 maps. There are 10 intermediate maps produced during the model run, resulting in 520 rasters.
Operating System: Linux (tested on Centos 5 & 7)
- GRASS GIS 6.4 stable
- Python 2.7
- Operating System Independent (Centos 7 Linux, Windows 7, Mac OS X 10.10)
- GRASS GIS 7.0.1
- Python 2.7
- RAM 32GB
- CPU 8 cores
- Storage 500GB free
- LiDAR bare-earth raster, preferably 1x1 m cell resolution in geoTIFF format.
- LiDAR canopy raster (optional, can be generated), 1x1 m cell in geoTIFF format.
- LiDAR point cloud, classified ground, non-ground, .las format or ASCII text.
This documentation will not cover the installation of GRASS GIS or python modules. Please see the linked sites for details. The documentation will assume the Linux operating system and will be done entirely from the command line, even though GRASS has a graphical user interface.
Detailed walkthrough can be found on this page. Note: when creating your workspace, it is wise to make it the cell resolution of your desired output, not the resolution of the source dataset. While the SSR code will try to set cell size at all times, the default value sometimes overrides the manual setting. This is a known issue.
SSR model runs mostly from outside GRASS. To do so, the parameter file must have the correct pathnames to libraries and the workspace.
This section controls which parts of the model are run. Generally it is wise to run each section in sequence on its own, so to troubleshoot as you go.
Run Parts? 0 = do not run, 1 = run, but do not overwrite maps, 2 = run, overwrite maps
lidar_run = 0
preprocessing_run = 1
rsun_run = 0
lpi_run = 0
algore_run = 0
# GRASS GIS requires 4 inputs to start:
gisbase = '/usr/lib64/grass-6.4.4' # GIS BASE (GISBASE): path to GRASS binaries.
gisdbase = '/data/grass_workspace' # DATABASE (GISDBASE): A directory containing GRASS maps and data.
location = loc = 'angelo2014' # LOCATION (loc): Defined by coordinate system & bounding box.
mapset = 'PERMANENT' # MAPSET: subset of a location. PERMANENT is the default.
C = 2 # cell size in meters
demsource = 'angelo1m2014dem' # name of bare-earth raster to use for model run
cansource = '' # name of canopy elevation raster to use for model run.
# leave blank for automatic generation.
r.in.gdal input=/data/gis/angelo1m2014dem.tif output=angelo1m2014dem
# if you have a tree elevation map (top of vegetation from sea level, not tree height),
# also import and define your parameter above.
r.in.gdal input=/data/gis/angelo1m2014can.tif output=angelo1m2014can
You are now ready to run the model. Run each part from the linux command line using python, not from inside GRASS GIS. Edit ssr_params.py to run each part in sequence. Unless you have run the model before, it is best to run each section separately. The proper order of execution is as follows:
1. python ssr_lidar.py
2. python ssr_rsun.py # preprocessing run
3. python ssr_rsun.py # light model run
4. python ssr_lpi.py
5. python ssr_algore.py
Model output is listed below. Export of rasters is by r.out.gdal.
1 bare-earth dem resampled to target resolution
1 canopy dem generated from lidar points
52 total solar radation maps
12 LPI (Light Penetration Index) maps, one for each month. June or July can be used as a rough indication of vegetation density.