Monday, April 10, 2017

Calculating Volumes of Stock Piles Using Pix4D and ESRI Software

Introduction

In a previous exercise, the Litchfield Mine imagery was process in Pix4D that contained several stock piles. For this exercise, the volumes of select piles will be calculated from these data sets using both Pix4D and toolbox operations in ArcMap. The differents methods used and their results will then be compared.

Volumetric Analysis Overview

Volumetric analysis involves the measurement of a volume using a variety of methods. Volumetric analysis has several applications including, but not limited to:
  • Calculating the amount of silt deposited on a lake bottom
  • Calculating the amount of material removed at a mining site
  • Track the progress of clearing debris piles
UAS are able to capture precise images from which mosaic images and 3D models can then be produced and volumetric calculations can be made. The quality of the aerial images are important to producing results that are superior to traditional ground based methods.

Toolbox Operations

In order to engage in analyzing the volumes of each pile, the following toolbox operations in ArcMap described below will be utilized:
  • Extract by Mask: clips a raster using a polygon shape according the defined extents or to the shape of an input polygon feature class; the shape defining the clip can clip the extent of the raster or clip out an area within the raster where the clip output includes any pixels that intersect the extent; for this exercise, a feature class will be created for each pile that includes the entire pile while excluding any other piles and this polygon will then be used for the clipping extent
  • Raster to TIN: converts a raster to a triangulated irregular network (TIN) dataset; a variety of analytic operations can then be performed on these TIN surfaces; after each pile has been made into a feature class and clipped, it will then be converted into a TIN surface
  • Add Surface Information: attributes features with spatial information derived from a surface; polygons summarize the surface Z properties within its area; this tool will be ran on the polygon clips of each TIN as a way of adding Z data
  • Surface Volume: calculates the area and volume of the region between a surface and a reference plane; a Z factor must be applied to ensure the accuracy of volume calculations when the surface Z values are expressed in a different unit of measure than the XY units
  • Polygon Volume: calculates the volume and surface area between a polygon and terrain or TIN surface; calculations will only be made for the portions of the input polygons and the TIN or terrain dataset surface that overlap; the volume represents the region between the surface and the space above or below the polygon features based on the selection made in the Reference Plane parameter:
    • Calculate Above the Plane: volume is calculated between the plane and the underside of the surface
    • Calculate Below the Plane: volume is calculated between the plane and the topside of the surface; the surface area for the same portion of the surface is also calculated
  • Cut Fill: calculates the volume change between two surfaces; enables one to create a map based on two input surfaces - before and after - displaying the areas and volumes of surface materials that have been modified by the removal or addition of surface material; both the input raster surfaces must have a common origin, the same number of rows and columns of cells, and the same cell size; for accurate results, the z-units should be the same as the x,y ground units

Methods

Use Pix4D to Calculate Volumes

To save time on processing, the data generated in Pix4D in the previous exercise Processing Pix4D Imagery with GCPs will be copied and pasted into a new folder for this week's exercise. Once this is complete, open the saved Pix4D project.
Figure 1: Calculating volumes in Pix4D

Step 1: Click on the 'Volumes' tab located on the far left side (Figure 1). Underneath the 'Objects' tab on the upper left side, click on the 'New Volume' button (the one on the left that has the shape of a cylinder with a plus sign on it). Zoom into the image and pick a pile to analyze.

Step 2: Once a desired pile has been picked, follow the prompts on how to draw a shape around the pile - left click to mark vertices along the base of the pile then right click to add the last volume and create the volume base.

Step 3: Once step 2 is completed, a message will appear in the 'Volume #' box with a message saying "The measurements have not been computed yet" with a 'Compute' button underneath the message; click on the 'Compute' button to calculate the volume

Step 4: Repeat steps 1-3 until three piles have been computed and take note of the volumes computed for each pile


Use 3D Analyst to Calculate Volumes of a Raster Clip

Open a new blank map in ArcMap. Add the DSM and the orthomosaic generated by Pix4D of the Litchfield Mine to the map.

Figure 2: New Feature Class window
Step 1: Create a new file geodatabase in a personal folder where all data will be saved. Then create three polygon feature classes and name them for the raster clips (e.g. Pile3Clip) by right clicking on the created geodatabase > New > Feature Class. This will bring up the 'New Feature Class' window (Figure 2).
Figure 3: Editing feature classes 
 Step 2: Right click on the feature class for the first pile and select Edit Features > Start Editing. The 'Create Feature' window appears that allows for the creation of polygon shapes. Select the Rectangle construction tool and draw around the first pile making sure to capture the entire pile while not including one of the other piles (Figure 3). Repeat this step for the other two piles. When finished, in the Editor toolbar, select Editor > Save Edits, then Stop Editing.

Figure 4: Extract by Mask tool
Step 3: Next, in the search toolbar, search for 'Extract by Mask' and select the Extract by Mask (Spatial Analyst) tool. This will bring up the 'Extract by Mask' window (Figure 4). Under 'Input Raster' select the DSM and under 'Input raster or feature mask data' select the feature class clip for the first pile. Under 'Output raster' save it to the file geodatabase created earlier (e.g. Pile1Clip_clipped) and click 'OK'. Repeat this step for the other two piles.






Figure 5: Surface Volume window
Step 4: Before running the next tool, the correct base Z value must be found for each pile. Select the 'Identify' tool and click around the first pile on the extracted DSM raster (the dark black areas) and obtain a rough average Z value. Then, in the search toolbar, search for 'Surface Volume' then select the Surface Volume (3D Analyst) tool. This will bring up the 'Surface Volume' window (Figure 5). Under 'Input Surface' select the raster clip of the first pile. Under 'Output Text File' save this to the geodatabase. Under 'Reference Plane' select 'Above' and under 'Z Factor' enter in the Z value that was just retrieved using the Identify tool. Click 'OK' to run the tool. Open the attribute table of the generated text file and scroll over until the 'Volume' field is reached and record the volume of the pile. Repeat this step for the other two piles.


Use 3D analyst to calculate volumes of a TIN

Figure 6: Raster to TIN tool window
Step 1: Take all three of the raster clips that were created in the previous section and convert them into TINs. In the search toolbar, search for 'Raster to TIN' and then select 'Raster to TIN (3D Analyst). This will open the 'Raster to TIN' window (Figure 6). Under 'Input Raster' select the raster clip of choice, save it under 'Output TIN' (just in the folder, NOT the geodatabase) and click 'OK' to run the tool. Repeat this step for every pile.





Step 2: Create three more feature classes within the geodatabase and give them a name that relates them to volume (e.g. Pile2Volume). Right click on the feature class that was just created for volume in the table of contents then click on Edit Features > Start Editing. Similar to 'Step 2' in the previous section, draw polygons around each pile except this time, use the 'Polygon' option under the 'Construction Tools' and trace around each TIN pile precisely, being careful to only include the extent of the pile. Do this for all piles and then save the edits and finish editing.


Figure 7: Add Surface Information window
Step 3: Next, Z value information must be added to the attribute table of each TIN. Search for 'Add Surface Information' and select 'Add Surface Information (3D Analyst)'. This will bring up the 'Add Surface Information' window (Figure 7). Under 'Input Feature Class' select one of the volume feature classes created in the previous step. Under 'Input Surface' select the TIN that corresponds to the pile of the feature class. Under 'Output Property' select 'Z_MIN' and 'Z_MAX' and then leave all other sections in their default values. Click 'OK' to run the tool. When the tool is finished running, open the attribute table for each volume feature class and scroll over to the 'Z_Min' and 'Z_Max' fields. Record the value of whichever of the two is smaller since this will be used in the next step.


Figure 8: Polygon Volume tool window
Step 4: Next, the volume of each TIN pile will be determined. Search for 'Polygon Volume' and click on 'Polygon Volume (3D Analyst)' to open the 'Polygon Volume' tool window (Figure 8). Under 'Input Surface' select the TIN of choice, and under 'Input Feature Class' select the volume feature class that corresponds to the appropriate TIN. Under 'Height Field' select the Z value field that had the lowest value from the previous step. Under 'Reference Plane' select 'Above' and leave the other sections in their default values. Click 'OK' to run the tool. Once the tool has ran, open the attribute table and scroll until the 'Volume' field is reached and record the volume.

Volume table

Create a table that compares the results of each method. Record the volumes of each pile for each of the three methods that were used (Pix4D, Raster Clip, TIN).

Results/Discussion

Pix4D Volume Analysis

This seemed to be the quickest and easiest method for calculating volumes of the piles. It is straight-forward and only involves a couple of steps which are 1) tracing the piles, and 2) calculating the volumes at the push of a button. The concern here is, however, how accurately the user can capture the pile while tracing it. The user can only work with the imagery while tracing, making it somewhat difficult to see the true extent of the volume. This is not the case when working with ArcMap.

Raster Clip

This method was more tedious and time consuming compared to the Pix4D method but not quite as tedious as the TIN method. The difference with this method along with the TIN method, is the ability to become more precise with the amount of volume that is being calculated which may, in turn, improve the accuracy of the result. Running the 'Hillshade' tool on the DSM allows the user to see exactly where the piles extend to. However, the feature classes used for this method are rectangles that extend past the piles themselves where the Z value is determined in the area outside of the piles; when entering a 'Plane Height' into the 'Surface Volume' tool, it may then include too much volume outside the pile or exclude too much inside the volume depending on the chosen Z value.

TIN

This method seemed to be the most tedious but is possibly the most accurate of the three methods. The analysis seems to be more precise in that the feature classes were drawn exactly around the perimeter of the piles and a minimum and mean Z values are actually produced by the program rather than entering a Z value based on a rough estimate as was the case in the raster clip method. However, the true volume may not be captured extremely precisely due to the rigid landscape of the TIN as opposed to a smooth flow between heights.

Volume comparison table

Table 1 below shows the calculated volumes in cubic meters of each method for each pile. Piles 1 and 2 are fairly similar in size with averages of 985.7 and 1233.1 cubic meters, respectively, while pile 3 is much larger with an average value of 7501.6 cubic meters. The calculations that were closest to each other were for pile 1 where the range between the highest and lowest values are only 95.98 cubic meters and were by far the farthest from each other were for pile 3 which had a range of 2340.3 cubic meters. Although pile 2 was similar in size to pile 1, its range was much larger at a value of 711.4 cubic meters. The method that proved to be the closest to the average value for piles 1, 2, and 3 was raster clip, TIN, and TIN, respectively. This does not necessarily mean, however, that the TIN method was the most accurate while the Pix4D was the least accurate.


Table 1: Volumes comparison

Conclusion

UAS imagery and data provides the necessary components that allows for volumetric analysis while programs such as Pix4D and ArcMap allow for the processing and analysis of the imagery and data. The quality of the UAS imagery plays a major role in how well volumes can be calculated. There were several different methods explored in this exercise including 1) Pix4D volume calculations, 2) ArcMap raster clip, and 3) ArcMap TIN. The Pix4D method was quick and easy, but may have lacked accuracy on how well the extent of the piles were traced out. The raster clip method was more tedious but allowed for a more accurate analysis on the extent of the pile; yet the user must enter a somewhat rough estimate for a Z value when running the 'Surface Volume' tool which may lead to less precision. According to the final table, the TIN appeared to be the most accurate method even if it was the most tedious one. It allows the user to trace out the exact extent of the pile while also providing a calculated Z value to use as a base height which may help improve the accuracy of the volume calculation.

Sources

Volumetric analysis overview information:

https://www.aeryon.com/casestudies/gismodel

https://books.google.com/books?id=ETry0PA5aF8C&pg=PA311&lpg=PA311&dq=geospatial+volumetric+analysis&source=bl&ots=-nV3blMgIA&sig=Ik7M6MxkG2JG-ICYVtU0DBmmCfg&hl=en&sa=X&ved=0ahUKEwjeodTO6ZvTAhVFwYMKHXyfCxQQ6AEIRjAD#v=onepage&q=geospatial%20volumetric%20analysis&f=false

Toolbox operations information:

http://resources.arcgis.com/en/help/

No comments:

Post a Comment