This program takes as input a set of trees and a set of light rays and determines, for each ray, which trees intersect it. Light rays are defined by an origin point (x, y, z), an azimuth, and an altitude. The calculations used to determine intersection are the same as used by SORTIE for GLI light calculations. The program takes three files as input: a file with a list of GLI rays for which to find intersecting trees, a file with a list of plot trees, and a file with the parameters for the allometric relationships. It returns an output file listing the intersecting trees for each GLI light ray. All files are tab-delimited text (in table format, with table columns separated by tab characters). All files can have any file extension desired. Header rows for input files are ignored; you can have any text you wish in the header row. However, the position of the columns must always be the same.

Deep calculation details on canopy intersection here.

Trees are modeled as cylinders atop one-dimensional lines. These lines, the trunks, do not intersect light rays. The size and shape of the cylindrical canopy is controlled by the allometry equations. All dimensions are calculated, directly or indirectly, from DBH.

Equations:

where Height is tree height, in meters, M is the maximum species tree height, in meters, and H is the height constant.

where Canopy radius is the radius of the canopy, in meters, R is the canopy radius coefficient, and G is the canopy radius exponent.

where Height of canopy bottom is the distance above the ground that the canopy cylinder starts, in meters, Height is tree height, in meters, and D is the canopy depth coefficient.

The tree file is the list of plot trees. It has a header row at the top and six columns, which must be in the same order as the example below. Example:

TAG | SPP | DBH | DAMCODE | X | Y |
---|---|---|---|---|---|

1097 | ALCFLO | 35 | 1 | 160.78 | 2.75 |

1262 | BUCCAP | 82 | 2 | 155.63 | 30.26 |

1360 | ANDINE | 17.7 | 0 | 210.39 | 33.21 |

**TAG** is an identifying code for the tree. It is ignored in the code but is written to the output file. **SPP** is the species name. It can be any combination of letters and/or numbers. **DBH** is the tree's DBH, in cm. **DAMCODE** is the tree's damage code, as an integer. It is ignored in the code but is written to the output file. **X** is the tree's coordinate along the plot X axis, in meters. **Y** is the tree's coordinate along the plot Y axis, in meters. The X and Y axes can have any orientation relative to true north, as long as the coordinates are consistent with the GLI light ray points as well.

The GLI ray file is the list of light rays for which to find intersecting trees. It has a header row at the top and seven columns, which must be in the same order as the example below. Example:

Alt | Azimuth | Subquad | Light | X | Y | Height |
---|---|---|---|---|---|---|

20 | 5 | 30311 | 0 | 125 | 325 | 1.25 |

5 | 180 | 30311 | 0 | 225 | 425 | 1.25 |

22 | 345 | 30311 | 0 | 225 | 425 | 1.25 |

**Alt** is the light ray's altitude angle, in degrees. **Azimuth** is the light ray's azimuth heading, in degrees. The positive Y axis is zero and azimuth increases in a clockwise direction. **Subquad** is a location identifier for the ray. It is ignored in the code but will be written to the output file. **Light** is the light ray's light level. It is ignored in the code but will be written to the output file. **X** is the light ray origin's coordinate along the X plot axis. **Y** is the light ray origin's coordinate along the Y plot axis. The X and Y coordinates must match the coordinate system of the trees. **Height** is the light ray origin's height above the ground, in meters.

The allometry input file lists the contants to be used in the allometric relationships, above. The first two rows contain the X and Y plot lengths, respectively, in the second column. Then there is a header row. Then there are six columns of data, which must be in the same order as the example below. Example:

X plot length: | 320 | ||||

Y plot length: | 500 | ||||

Spp | Rad Coeff | Rad Exp | MaxHt | HtConst | Depth coeff |
---|---|---|---|---|---|

ALCLAT | 0.073 | 1.0 | 27.3 | 0.025 | 0.477 |

BUCCAP | 0.06 | 0.9 | 24.57 | 0.048 | 0.55 |

CASARB | 0.09 | 0.8 | 30 | 0.029 | 0.54 |

DACEXC | 0.075 | 1.1 | 23.81 | 0.061 | 0.576 |

OTHER | 0.074 | 1.5 | 23.84 | 0.049 | 0.497 |

The plot lengths in the first two rows are in meters. No tree or ray coordinate may be outside these dimensions. The **Spp** column is the species name. It should match the values in the **SPP** column of the tree input file. If you do not want to add a row for all possible tree species, you can put in a row with "OTHER" as the species name. This is the set of values that will be used for the allometric equations of tree species that are not explicitly defined in this file. If you do not add an "OTHER" row, you must add a row for every species that appears in the tree input file. **Rad Coeff** is the tree canopy radius coefficient (R) in the canopy radius equation above. **Rad Exp** is the tree canopy radius exponent (G) in the canopy radius equation above. **MaxHt** is the maximum species tree height (M) in the height equation above. **HtConst** is the height constant (H) in the height equation above. **Depth coeff** is the canopy depth coefficient (D) in the canopy bottom height equation above.

The output file lists each GLI ray and all the trees that intersect it. Each GLI ray gets one row. The number of columns in the row varies according to the number of intercepting trees. Example:

ALT | AZIMUTH | SUBQUAD | LIGHT | RAY X | RAY Y | RAY HEIGHT | # INTERCEPTORS | TAG | SPP | DBH | DAMCODE | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|

20 | 5 | 30311 | 0 | 125 | 325 | 1.25 | 0 | ||||||||||||

5 | 180 | 30311 | 0 | 225 | 425 | 1.25 | 3 | 14691 | ALCLAT | 30.2 | 0 | 14694 | ALCLAT | 18.8 | 0 | 16675 | BUCCAP | 7 | 0 |

22 | 345 | 30311 | 0 | 225 | 425 | 1.25 | 2 | 18275 | BUCCAP | 73.8 | 2 | 18271 | BYRSPI | 80.1 | 2 | ||||

60 | 0 | 30311 | 0 | 160 | 490 | 1.25 | 2 | 16850 | ANDINE | 130 | 0 | 18882 | BUCCAP | 145.5 | 0 | ||||

25 | 138 | 30311 | 0 | 225 | 425 | 1.25 | 1 | 17209 | CASARB | 30 | 2 |

The first seven columns are the same as the GLI ray input file. The rays should be listed in the same order as in that file, as well. The next column, **# INTERCEPTORS**, lists the number of intercepting trees for that ray. Each tree is identified by a quadruple of values. The value in the **# INTERCEPTORS** column is how many quadruples follow. The quadruples are the same as the first four columns in the tree input file.