Closed rskelly closed 4 years ago
The crowns phase already computes the tree top height and position from the original raster, however it does not create a new geometry for that point. It must wait until the crowns section because the top located in the treetops phase is deduced from the smoothed raster, whose maxima don't necessarily correspond to those in the original raster. The maximum is located in the region delineated by the crown associated with the top.
1) Should we create a new geometry to represent the top from the un-smoothed raster? This can be added to the tops database or the crowns database. Either entails less work than creating a new database. 2) It would perhaps be good to provide a structure for the tables that are required. The current fields are:
Tops: id | parentid | smoothcol | smoothrow | smoothx | smoothy | smoothz | origx | origy | origz | (geometry)
Crowns: id | (geometry)
We talked this over and decided that we would like a streamlined output that we can deliver to the client without revising the attributes. This would include the same attributes for both tops and crowns: TREE_ID, GROUND_Z, TOP_Z, TREE_HT Please use orig (non-smoothed) values only.
We would also require geometry to be 3D, Please use TOP_Z for the top's elevation and (GROUND_Z + (0.5 * TREE_HT)) for crown's elevation (this allows us to visualize the tops/crowns with the lidar in 3D).
We realize that the other fields are valuable for debugging/development so perhaps there could be a "debug" or "verbose" option that includes whatever fields you feel may be required for debugging and/or future development.
Unresolved: The smoothed values will be removed from the output entirely, with only the heights extracted from the original raster remaining. Since the crowns phase is required for generating top heights from the original raster, if the tops phase is run alone, these columns will be empty. Our choices for handling this are:
Please use combination of 3) and 4). No problem to run tops and crowns every time and only output smoothed heights if user wants them (default to off)
Python script attached which performs this fix.
TreetopUtils.txt