<commit_before>---
layout: post
title: "R: Create a Canopy Height Model from LiDAR derived Rasters (grids) in R"
date:   2014-7-18 20:49:52
createdDate:   2014-07-21 20:49:52
lastModified:   2015-4-27 15:33:52
estimatedTime: 3.0 - 3.5 Hours
packagesLibraries: raster, sp, dplyr, maptools, rgeos
authors: <NAME>, <NAME>
category: remote-sensing
categories: [Remote Sensing]
tags : [lidar,R]
description: "Bring LiDAR-derived raster data (DSM and DTM) into R to create a final canopy height model representing the actual vegetation height with the influence of elevation removed. Then compare lidar derived height (CHM) to field measured tree height to estimate uncertainty in lidar estimates."
permalink: /lidar-data/lidar-data-rasters-in-R/
code1: Create_Lidar_CHM.R
image:
  feature: textur2_pointsProfile.png
  credit: National Ecological Observatory Network (NEON) Higher Education
  creditlink: http://www.neoninc.org
comments:true
---
<section id="table-of-contents" class="toc">
  <header>
    <h3 >Contents</h3>
  </header>
<div id="drawer" markdown="1">
*  Auto generated table of contents
{:toc}
</div>
</section><!-- /#table-of-contents -->


##Background
NEON (National Ecological Observatory Network) will provide derived LiDAR products as one of its many free ecological data products. One data product that NEON will provide is a digital surface model which represents the top of the surface elevation of objects on the earth. These products will come in a [geotiff](http://trac.osgeo.org/geotiff/ "geotiff (read more)") format, which is simply a raster format, that is spatially located on the earth. Geotiffs can be easily accessed using the `raster` package in R.

A common first analysis using LiDAR data is to derive top of the canopy height values from the LiDAR data. These values are often used to track changes in forest structure over time, to calculate biomass, and even LAI. Let's dive into the basics of working with raster formatted lidar data in R! Before we begin, make sure you've downloaded the data required to run the code below.

<div id="objectives">
<h3>What you'll need</h3>
<ol><commit_msg>fixed spacing<commit_after>---
layout: post
title: "R: Create a Canopy Height Model from LiDAR derived Rasters (grids) in R"
date:   2014-7-18 20:49:52
createdDate:   2014-07-21 20:49:52
lastModified:   2015-4-27 15:33:52
estimatedTime: 3.0 - 3.5 Hours
packagesLibraries: raster, sp, dplyr, maptools, rgeos
authors: <NAME>, <NAME>
category: remote-sensing
categories: [Remote Sensing]
tags : [lidar, R]
description: "Bring LiDAR-derived raster data (DSM and DTM) into R to create a final canopy height model representing the actual vegetation height with the influence of elevation removed. Then compare lidar derived height (CHM) to field measured tree height to estimate uncertainty in lidar estimates."
permalink: /lidar-data/lidar-data-rasters-in-R/
code1: Create_Lidar_CHM.R
image:
  feature: textur2_pointsProfile.png
  credit: National Ecological Observatory Network (NEON) Higher Education
  creditlink: http://www.neoninc.org
comments:true
---
<section id="table-of-contents" class="toc">
  <header>
    <h3 >Contents</h3>
  </header>
<div id="drawer" markdown="1">
*  Auto generated table of contents
{:toc}
</div>
</section><!-- /#table-of-contents -->


##Background
NEON (National Ecological Observatory Network) will provide derived LiDAR products as one of its many free ecological data products. One data product that NEON will provide is a digital surface model which represents the top of the surface elevation of objects on the earth. These products will come in a [geotiff](http://trac.osgeo.org/geotiff/ "geotiff (read more)") format, which is simply a raster format, that is spatially located on the earth. Geotiffs can be easily accessed using the `raster` package in R.

A common first analysis using LiDAR data is to derive top of the canopy height values from the LiDAR data. These values are often used to track changes in forest structure over time, to calculate biomass, and even LAI. Let's dive into the basics of working with raster formatted lidar data in R! Before we begin, make sure you've downloaded the data required to run the code below.

<div id="objectives">
<h3>What you'll need</h3>
<ol>
{'fraction_non_alphanumeric': 0.08781404085466071, 'fraction_numerical': 0.023949283869452925, 'mean_word_length': 4.718120805369128, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 33, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3625622', 'n_tokens_mistral': 1350, 'n_tokens_neox': 1244, 'n_words': 565}