Tuesday, December 19, 2017

Field Activity #12: Pix4D Processing UAS Data with GCPs

Introduction
This field activity will discuss the use of Pix4Dmapper software in mapping UAS data with Ground Control Points (GCPs).Pix4Dmapper software allows the user to process drone data with or without GCPs. Pix4Dmapper strongly recommends the usage of GCPs when combining multiple different areal images such as nadir (0º) or oblique(45º-90º). Because of the angle difference in images having GCPs will allow for proper adjustment of the different set of images that will relay accurate data. Field Activity #11 discussed the processing of UAS data without GCPs. This field activity will focus on processing data with GCPs and compare the data accuracy between the two. The GCPs data for this field activity was gathered with a Topcon HiPer on 9/30/2016 provided from the University of Wisconsin-Eau Claire. The area of study is shown in Figure 1.

Figure 1. Litchfield; area of study

Methods 
The steps of the UAS initial set up for processing of data with GCPs was the same without GCPs. Referencing Field Activity #11, it goes through the steps. For the sake of saving time the file that was created from the initial project setup was saved under a different name. Using this file and going under the Project Tab--> GCP MTP manager--> import GCPs. Once the GCPs were imported they had to be attached to images. To do this Basic Editor was used and going through the 222 images a couple of images per GCPs were manually tagged. This was able to be done because each GCPs platform was spray painted with a number. Figure 2. Shows the GCPs used. Using the number in correspondant to the Label of GCP allowed for this process to be done. Also, since field notes were taken on the day of this field excursion a mental map was created when placing the GCP for reference when flying the drones. 


Figure 2. GCP

16 GCPs were taken at the Litchfield mine. So every GCP had a couple of images tagged to it. Not all GCPs were tagged because the next step was to Process--> Reoptimize. This basically allowed the data to update the points that were manually tagged. Then going back to Project Tab--> GCP MTP manager and clicking rayCloud Editor all of the images were brought in for each GCP but was not tagged. Figure 3. Shows the GCPs in correspondent to the labels that were not tagged.

Figure 3. GCPs not tagged in raycloud editor
After tagging all of the correct GCPs to the labels the data was then processed through all of the steps. This then created a geotiff that could be opened as a raster in ArcMap.


Results/Discussion
Figure 4. Figure 4. Shows the Orthomosaic image of Litchfield with 16 GCPs. The Orthomosaic with & w/o GCPs differed from each other. This could have been just from the processing of stitching the areal images together individually. Since an overlay of the images would just come up as a blurred image it was withheld from the results.


Figure 4. Orthomosaic with GCPs of Litchfield Mine

Figure 5. Showing the DSMs with & W/O GCPs. The difference can be seen with the elevation of each DSM. The one on the right is w/o GCPs and the one on the left has GCPs. The difference in elevation is quite astounding given just 16 GCPs to go off of in an area of roughly forty acres.

Figure 5. DSMs with & w/o GCPs of Litchfield Mine

Conclusion
Referring Figure 5. Data with GCPs is much more accurate when using drone imagery to survey property and products. The GCPs DSM of Litchfield mine accurately shows the elevation that can be used to measure the mounds of sand to estimate the value the mine has. This is very helpful in any industry and can be applied to others for further use. 


Reference
https://pix4d.com/product/pix4dmapper-photogrammetry-software/#

Friday, December 8, 2017

Field Activity #11 Pix4D Processing UAS Data W/O GCPs

Introduction
Pix4Dmapper software is a package that helps process drone data with photogrammetry and computer vision algorithms. It creates 3D, 2D, Orthomosaic, DSM, Point Clouds, and other images. In this lab Pix4Dmapper was used to run processes on drone areal images to create an orthomosaic and DSM. The areal images were taken on 9/30/2016 with a DJI Phantom 3 drone at 80 meters elevation over the Litchfield mine in Eau Claire, WI. Field Activity #3 in this blog covers the details of the mission. Since this data was covered before Ground Points were established in the area of study shown in Figure 1. The main objective of this lab will be analyzing the datum issue in regards of lack of GCP's. 

Figure 1. Litchfield Mine; area of study

GCPs are not required for use in Pix4D; however, they are recommended to improve the accuracy and georeferenced of reconstructing the area of study in respect to the elevation. Other criteria's that had to be taken into consideration during the gathering the data onsite was the terrain, number of flights needed to cover the area, and imagery. For Pix4D the recommended overlap is at least 75% frontal overlap (with respect to the flight direction) and at least 60% side overlap (between flying tracks) and flying in a grid pattern, Figure 2. shows this. 


Figure 2. grid pattern

Since the terrain of the area of study was sand this enhanced the recommended overlap. Sand mines are large uniform terrains in this case, a frontal overlap of at least 85% and 70% of side overlap should be used. This exposes the area to as much detail as possible of the sand and size of the area. With the use of drones and processing of Pix4D consideration of how many flights to cover the area should be in the flight plan. Since drones only have so much flight time with their batteries they need to take multiple flights depending on the area of study and have enough areal images to overlap to create a full panorama image. Besides the the amount of flights the areal images of the area needed to be addressed. That is should they be done with oblique or nadir images. Pix4D can process both of these imagery's; however, in the actual drone flight the pilot needs to consider which method they will take to know the angle of the images.


Methods 
The first step taken was to Create a New Project in Pix4DMapper. From the next screen it prompts the used to create/browse for a file to extract the data from. Professor Hupy exported the data ahead of time from the drone and into a folder that was able to be connected to. The new folder location was then named appropriately for good data management of ever recollecting it i.e. date, drone, location, and elevation. Before uploading the areal images they were looked over to make sure there were only areal images seen from 80 meters of the mine rather than the takeoff or landing of the drone. From here all of the areal images were uploaded. Next, the image properties window popped up, from this window the CS (supposedly) used and geocoded images are shown in Figure 3. As mentioned by Professor Hupy, defaults can never be trusted when pertaining to equipment usage. Therefore the Selected Camera Model was edited. The Shutter Model was changed from Global Shutter to Linear Rolling Shutter. This means that instead of the shutter of the camera scanning the whole area of study simultaneously it scanned is sequentially from top to bottom, like a scanner or copy machine.

Figure 3. Image Properties

Next, the screen prompted for a selected output CS since most software's allow for reprojection i.e. ArcGIS, the data was left on Auto Detected. Form the final step was selecting a template to have the areal images process into. 3D Maps were chosen for the purpose of this lab displaying orthomosaic and DSM analysis. 



Figure 4. Processing outline


After finishing the perimeters for the modal, the data points/locations of areal images can be seen in Figure 4. Indicated by the red circles presented themselves. Looking at all the areal images and where the actual Litchfield mine was located it was decided to allow the mine and disregard the rest of the data points/areal images. This would help cut down in processing time and since the DJI Phantom 3 sensor lenses cannot differentiate movement the images would not come out clear anyways. Next, the following steps consisted of setting the Processing Options. Referring to Figure 5. The Raster DMS Geotiff method was changed to triangulation. This method was found to have slightly better details than any other method. It did however add onto the processing time a little.


Figure 5. Triangulation method


Then clicking on the Additional Outputs tab and going down to the Contour Lines header, the following were changed; Elevation Interval-2 Resolution -50 Minimum Line Size- 100, as shown Figure 6. This was done to help create a better geotiff image of the area of study.


Figure 6. Contour Lines


Finally, Processing was ready to be started. For the first time running only the Initial Processing was run to retrieve the report shown in Figure 7. Quality Report. Looking at Figure 7. The Quality Report didn't come back 100% checked out. Looking at Figure 1. On the bottom and Figure 7. A large section of areal images were not registered. Also, referring to Figure 8. The areas of red indicate error. Since these areas were not in the Litchfield mine and wouldn't disrupt the data the author of this blog decided to move on with the processes. Also, since GCPs were not used they also came up with an error but not The Point Cloud and Mesh and DSM, Orthomosiac and Index Processes were run. In total the 3 Processing stages took close to 3 hours to run. In this case Pix4D does have rapid check that could be used. This process option outweighs the time of processing to the accuracy of the detail of imagery. In this case the author of this blog felt that using this method would deter from the objective of the lab stated in the introduction. 


Figure 7. Quality Report


Figure 8. Ray Cloud 


Results/Discussion
The Figure 9. Shows a DSM of Litchfield Mine. The higher elevations in this DSM could indicate sand piles or equipment at the site. The areal images of the area were taken at 80 meters. The edges northwest side and southeast side of the DSM show up low elevation. However this isn't exactly the case especially when comparing it to Figure 10. There are actually trees on the southeast side and a body of water on the northeast side. Since the DJI Phantom 3 sensor lenses cannot differentiate the motion of water and reflection of sunlight the elevation data is inaccurate on the northwest side. Also, with the tree canopies on the southeast side the sensor lenses do not distinguish well with the movement of tree canopies. 
Figure 9. DSM of Litchfield Mine
Figure 10. Shows an Orthomosaic of Litchfield Mine. This map shows the shape and sizes of the sand piles. It also does a great job with distinguishing between what is vegetation and other inanimate objects, the color as well adds onto this. On the eastern half of the map the area is a little darker in gradient and appears to give a 3D effect to the image. This could be from cloud coverage during the drone's flight path.


Figure 10. Orthomosaic of Litchfield Mine

Conclusion
These maps created show a good general area of study with drone imagery; however with analysis of the Litchfield sand mine these maps and processes done cannot be used. That is because there were no GCPs in this analysis, meaning the z-elevation is off. This is a drastic issue considering that Sand mines are looking into the size and amount of their products of the piles. If modals do not have GCPs they have no datum to measure off the elevation factor and then companies do not have the ability to analysis their stock piles of product and revenue.

    
Reference
https://www.bhphotovideo.com/explora/video/tips-and-solutions/rolling-shutter-versus-global-shutter

https://pix4d.com/product/pix4dmapper-photogrammetry-software/#

https://support.pix4d.com/hc/en-us/articles/204272989-Offline-Getting-Started-and-Manual-pdf-#gsc.tab=0

Sunday, December 3, 2017

Field Activity #10 Sand Survey

Introduction
This field activity is of data processed from Field Activity #1. Field Activity #1 was creating a Digital Elevation Surface in a sandbox at the University of Wisconsin-Eau Claire. The basic overall idea was to create an elevation surface within a sandbox and create sample points based on elevation. The terrain had to include: ridge, hill, depression, valley, and a plain. The author of this blog and group members decided to replicate a continental shelf/ ocean floor landscape. In total 361 data points were gathered from an area of 114cm squared grid. This help create the data to be normalized. Normalization is the process of organizing data in a clear and non-redundant manner for use. Since the data points were already measured in x,y,z the data was already normalized by using negative and positive numbers displaying the z-elevation. Figure 1. Shows the sand data points normalized. For the grid sampling a systematic sampling method was used that created an easy way to gather data and allow for the use of interpolation on it. Using different interpolations on the data created 3D models that exhibited how each interpolation interpreted the data with varying rules implied. Using the interpolations of the data will help distinguish the best one to exhibit the sandbox data points. The required interpolations to use were:  IDW, Natural Neighbors, Kriging, Spline, and TIN.

Figure 1. Sand data points example
Methods 
The first step was to import the x,y,z data points in an excel file to ArcMap by going go File--> Add XY Data. Since the data was taken with a cadastral or unknown/none coordinate system it did not have to be projected in any way. Figure 2. Shows the sand data points in the grid format and color coded blue for the ocean in compliance with the elevation difference in a continental shelf/ocean floor. The data came in as shapefile and then was exported as a feature class in a file geodatabase to run tools on and analyze the data easier.

Figure 2. sand points in grid format

The Interpolation tools used were found under the 3D Analyst-Tools-->Raster Interpolation--> IDW, Kriging, Natural Neighbour, and Spline. TIN was found under 3D Analyst Tools-->Data Management--> TIN--> Create TIN.
A description of the tools used are listed as followed from Esri's GIS Dictionary and ArcGIS Pro Tool Reference.

"IDW (Inverse Distance Weighted) tool uses a method of interpolation that estimates cell values by averaging the values of sample data points in the neighborhood of each processing cell. The closer a point is to the center of the cell being estimated, the more influence, or weight, it has in the averaging process" (Esri 2017)

"Kriging is an advanced geostatistical procedure that generates an estimated surface from a scattered set of points with z-values. More so than other interpolation methods, a thorough investigation of the spatial behavior of the phenomenon represented by the z-values should be done before you select the best estimation method for generating the output surface" (Esri 2017).

"Natural Neighbor interpolation finds the closest subset of input samples to a query point and applies weights to them based on proportionate areas to interpolate a value (Sibson, 1981). It is also known as Sibson or "area-stealing" interpolation" (Esri 2017).

"Spline interpolation method estimates values using a mathematical function that minimizes overall surface curvature, resulting in a smooth surface that passes exactly through the input points" (Esri 2017).

"TIN (triangulated irregular network) A vector data structure that partitions geographic space into contiguous, non-overlapping triangles. The vertices of each triangle are sample data points with x-, y-, and z-values. These sample points are connected by lines to form Delaunay triangles. TINs are used to store and display surface models" (Esri).
Once all of the Interpolations were created in ArcMap they were then imported into ArcScene to create a 3D modal of the terrain. From there they were exported as a 2D image into Adobe Illustrator along with the interpolations feature classes in ArcMap. Adobe Illustrator was used for its flexibility with creating map components, color resolution, and easy rotation to show model orientation. The 2D images were imported into ArcMap as a reference modal but the colors of the bands showed up too poorly to analyze the terrain so Adobe Illustrator was used in place of.

Results/Discussion
When creating the surface terrain a continental shelf and the ocean floor was thought of two best portray in the sand so the color chosen for portraying the data was blue. Figure 3. Shows the first interpolation tool used, IDW. In this figure and all others that follow the raster file with the interpolation created in ArcMap is on top with a scale, legend, and arrow in orientation, while the 3D modal in ArcScene created and exported into Adobe Illustrator as a 2D is on the bottom with a legend and arrow in orientation. A scale was not assigned to the 2D image for the representation of it being 3D and not fitting correctly with a scale unless measured from one point to another. For the purpose of this examination the author of this blog will be relating to the 2D model on the bottom of each figure. The IDW Interpolation tool did a poor expressing the data points collected, it doesn't represent a continuous modal of the terrain and did a bad job with exhibiting the ridge and valley in the southeast section. It exhibited the depression and plain well given that it uses the average sampling method of that area and it would have minimal difference in elevation. 


Figure 3. IDW interpolation

Figure 4. Shows the Kriging Interpolation tool. Kriging gives a nice continuous terrain modal that creates a realistic terrain. It displays elevation quite well with the hill and ridges in the eastern sector but does not with the valley right next to the ridge that seems nonexistent.

Figure 4. Kriging Interpolation

Figure 5. Shows the Natural Neighbour Interpolation. This interpolation looks very similar to Kriging in Figure 4. The only difference seen is with more detail in the elevation compared to Figure 4. However this still does a poor job with the valley depression and gives off a shadowing effect from the ridge. 

Figure 5. Natural Neighbour Interpolation

Figure 6. Shows the Spline Interpolation tool. This tool compared to Figure 5. Gives a more refined look to the elevation and rounds off the rough edges compared to the Natural Neighborhood Interpolation. The Spline Interpolation provides the best presentation of the valley right of the ridge in the southeast sector. There is a somewhat clear depiction of elevation change with the terrain presenting a more 3D look than any of the other models.

Figure 6. Spline Interpolation

Figure 7. Shows the TIN method/Interpolation, although TIN is not exactly Interpolation it still provides the data to be exhibited in a terrain modal with x,y,z points. This method gives a choppy presentation of the elevation difference in comparison to the real world. It does provide great detail in elevation difference with the contour lines.

Figure 7. TIN Method
Conclusion
The best Interpolation method used to display the data accurately was the Spline Interpolation. The Spline Interpolation tool exhibited all forms of elevation the best compared to any other tool. Since the author of this blog and their group used the systematic sampling approach the Spline Interpolation represented it the best. The Spline Interpolation tool and other other Interpolation tools/methods can be used in trying to display x,y,z data gathered for the intent of 3D modelling. It is easy and quick tool compared to running other processes on data. 

Reference
http://pro.arcgis.com/en/pro-app/tool-reference/3d-analyst/comparing-interpolation-methods.htm

https://support.esri.com/en/other-resources/gis-dictionary/term/tin

Monday, November 27, 2017

Field Actvity #9 ArcCollector Historical Houses in Third Ward of Eau Claire, WI



Introduction
This field activity expanded from Field Activity #7 in where ArcCollector, the app, was used via mobile device to collect data with. The objective of this field activity was to create your own spatial question to answer gathering data points with the ArcCollector app in the field. The author of this blog's question was "Where and what correlations do historic houses have in the Third Ward of Eau Claire, WI?" The author of this blog lives in the Third Ward of Eau Claire and came upon this question based on walking past and living in a historic house with a plaque of the house history. The author of the blog decided to create a map showing the houses and numerous attributes of them provided by the plaques outside historic houses to find correlation with them within Eau Claire's city history. Figure 1. shows the area of study, an outline of the Third Ward in Eau Claire, WI.


Figure 1. Vague Outline of Third Ward in Eau Claire


Methods
In order to begin answering the spatial question a survey had to be set up for the ArcCollector App to have a basemap to collect data points on. To do this an ESRI tutorial was followed (http://doc.arcgis.com/en/collector/). The first step was creating a geodatabase for the data and setting the domains to match up with the fields of the feature class. Figure 2. shows the domains that were created within the file geodatabase. The Condition domain was a coded domain along with the Exterior Material domain. Storey and Year  were range domains. Next the feature class was created and the fields were edited to comply with the geodatabase domains and survey inquires. For this specific survey our professor provided us a criteria of including fields with a floating or integer field, notes or field notes, and category option ex. Material-BRK. Figure 3. Shows the fields in the feature class.


Figure 2. Gdb domains
Figure 3. Feature class fields


Also, attachments were enabled in ArcCatalog by going clicking on the feature class and choosing Manage --> Create Attachments. Enabling this feature will allow for pictures to be attached in ArcCollector when out in the field. Once the feature class fields were set it was brought into Arcmap. Then an attribute that was created in fields was symbolized to create a data point that would be viable during the actual process of collecting points while out in the field. For this the Exterior House Material was chosen and symbolized as shown in Figure 4.


Figure 4. Symbology of feature class for importation


From here the Layer had to be shared via ArcGIS online in order to bring in the compatibility with ArcCollector. Signing into your account on ArcMap with Esri allows one to share their feature class as a layer online. The layers was shared by going to under File--> Share as Service--> Publish a service--> the author of this blog selected My Hosted Services as their disclosed group and then set the parameters, capabilities, feature access, item description, and sharing settings. The author of this blog create a separate private folder within their account with ArcGIS online to import their layer to for easy access. Once uploaded within the UWEC group and private individual folder of the author of this blog the data was opened in Web Map. It was then saved within the same folder and the settings were changed to allow appropriate adjusting of the data by the author. Here the mobile device was used with the ArcCollector app to open up and edit/create data points pertaining to the data. Figure 5. and Figure 6. shows screenshots of the ArcCollector Mobile App when collecting data. All of the data was collected on Sunday 11/12/2017 from 10:00am-1:00pm.



Figure 5. Map on ArcCollector App
Figure 6. Attributes for data points collected


In order to grasp an idea of where all the historic houses were in Eau Claire's Third Ward, rather than walk around endlessly looking for them, they were mapped out first via google maps. The historic society of Eau Claire has a website with all of the historic houses in Eau Claire. From this website (http://www.ci.eau-claire.wi.us/home/showdocument?id=17572) addresses were obtained for the Third Ward and inputted into the author of this blog's google maps account. From there the map was printed off and a viable path was created from where the author of this blog resides as the starting point. Some of the historic houses locations did not show up in google maps at the scale it was printed at so the author of this blog manually wrote them in. Figure 7. Shows the field map used to locate the houses.


Figure 7. Make shift map of the area (N arrow indicated sun's location)

While using this maps points circled indicated that there were no plaques outside the homes of these addresses that could be seen; however they still came up on the website as being historical houses. For this project they were not mapped. Points crossed out meant that a data point was collected there
along with a picture. Figure 8. Is an example of the one of the plaques.


Figure 8 . Example of plaque 

Once the data was all gathered via mobile phones, the WebMap was opened on a desktop. The data was then exported as a FGDB (Feature Geodatabase) this allowed for attachments to be exported with the file. It was then opened in ArcMap to be editable.

Results/Discussion
In total 23 data points were collected in the Third Ward. Out of those 23, 22 were houses and 1 was a building (Free Masonry). Figure 9. Shows the attribute data of all the fields created and gathered.


Figure 8. Attribute Table of Data


The Title of each house was collected as a general label. Company was chosen for an attribute to see out of how many house owners were part of a company in the Third Ward. The Year of the house was included to give some idea of the time period this person was and house was built and occupied. The number of Storey each house had relates to the house design and Style in that time period and could correlate to wealthiness of the neighborhood. The Exterior Material is interesting considered the area and weather that Northern WI gets and what was a viable material to use for your house. The Condition and Notes were visual commentary on the house and not related to the plaques. This provided a present description of the house, this attribute was also bias based on the author's own thoughts.
Figure 9. Historic House's Title and Homeowner affiliation w/Companies

Figure 9. Is a map that shows the Title of the house and the original homeowner's occupation if it had any affiliation with a Company. The Title of each house was based on the original homeowner of the house. The owner of the blog decided to have Company as an attribute to see if there were a lot of people affiliated with them in the Third Ward. For the most part there were quite a few and it was interesting seeing what types of companies there were in the area. It would be interesting to juxtapose this historical data with current to see the occupation of current historical landowners.

Figure 10. Historic House's Year, Style, and Storeys

Figure 10. Depicts a map of the Year, Style and Storeys of Historical Houses. In this map the houses of smaller sizes are 1 storey, medium houses are 2 storeys, and large houses are 3 storeys. In a lot of cases the houses that were 3 or even 2 had the upper floor added. This could be seen by the change in exterior material of the house. For the purpose of deciding what counted has a storey neither the basement nor attic was counted. The houses styles/architecture were mapped to see if they had any correlation of the year they were built and the impact of global travel and commerce. For the most part many of the Queen Anne style houses were built in the 1880's when their was a revival of the architecture. In many cases the style of houses came up with having architectural features that barrow from other styles. Regardless seeing even areas of Eau Claire take on architectural styles like Queen Anne and Georgian Revival. It was surprising to find quite a few houses built in the 1800's and that bears the question of whether the house has been updated to health code with lead paint and radon. Especially since a lot of Historical Houses are college rented.


Figure 11. Historic House's Exterior Material and Condition

Figure 11. Shows the Historic House's Exterior Material as in Brick, Cement, Stone ect. and the condition the house looked like it was in. For the most part all houses had stone foundation and then some wood paneling for upper attic level. The majority of houses contained brick as their outside material. From all the data gathered the exterior material showed the greatest spatial relationship of areas with the same material. There wasn't any correlation with any exterior material having a greater durability for the condition of the outside house compared to others and since their are a range of years that the houses were built it's hard to say the deterioration of each individual one. 

Provided is a link to the WebMap on ArcGIS that is interactive. All the attributes and images attached to each data point can be seen as well as analysis run on the data.

http://uwec.maps.arcgis.com/home/webmap/viewer.html?webmap=7f62e89100ff41fdbfdcded56de47808




Conclusion
In response to the author of this blog's spatial question, "Where and what correlations do historic houses have in the Third Ward of Eau Claire, WI?"  There were two that were evident amoung houses, they were the same exterior material being congregated in the same area of the Third Ward and Queen Anne Style Architectures being located in the middle of the Third Ward. In reflection of this field activity the use of ArcCollector in any field of study is invaluable. That being said there comes some heavy responsibility with it like any process of gathering data out in the field of individual privacy. For this specific field activity all of the data gathered is public knowledge except the Notes attributes, that's the author of the blog's personal opinion on the Historical House. Overall, This app is very handy and well accessible to anyone wanting to collect data and not knowing a whole lot about GIS or creating maps. 

Reference

http://doc.arcgis.com/en/collector/

http://www.ci.eau-claire.wi.us/home/showdocument?id=17572


http://uwec.maps.arcgis.com/home/webmap/viewer.html?webmap=7f62e89100ff41fdbfdcded56de47808