Monday, December 15, 2014

Raster Modeling and Analysis

Intro

The goal of this lab was to build models showing sand mining suitability and risk in Trempealeau County, WI. To build these models many raster geoprocessing tools were used. After making both the suitability model and the risk model for Trempealeau County, they can be combined to figure out the best locations for sand mining with the smallest impacts on the environment and on the people residing there.

Methods

To make the models for this exercise numerous raster tools and criteria were established. Most commonly the first step would be to convert the feature to a raster so analysis could be performed. If the feature was already a raster then I could skip right to the reclassify step, where the variables were set on classification for that raster. A couple of the other steps required further analysis with tools such as project raster, slope, block statistics, and topo to raster. The combination of all these tools with raster calculator at the end, resulted in the final product for this exercise.
Figure 1. This is the model for the first half of part one of the exercise it consists of making the suitability model for sand mining in Trempealeau County, WI.

Figure 2. The model from the second half of part one shows the workflow for creating a risk model for sand mining in Trempealeau County, WI.
Each objective of the exercise involved working with one different criteria for sand mining. For the suitability model geologic, land use/land cover, distance to railroads, slope, and water-table depth were the criteria looked at to come to the results of the model. This really narrows down the possible locations and allows accurate advice to sand mine owners on where they should operate. It should be noted that the classifications were individually and personally assigned so this shouldn't be used for actual interpretation.
In the second half of the exercise proximity to streams, farmland, residential areas, schools, and the flood plain, and the view from prime recreational areas were the criteria used as a basis for the risk model.

Figure 3. A weighted index model used to weight one of the factors in modeling
For part two of the exercise a weighted index model was used to weigh one of the variables in our models. The variable chosen was supposed to be one that we thought was the most significant and had the biggest effect on sand mining. I chose streams as my largest factor because of the significance of keeping sand mining pollutants out the water.


Results and Discussion

The nine maps below are objectives that were completed in order to find out the risk and suitability of sand mining in Trempealeau County, WI. Each map has either two or three classifications. The classifications are

Green = Suitable
Yellow = Somewhat Suitable
Red = Not Suitable

These colors also allude to the risk of sand mining in the maps that that idea pertains to.
By looking at these maps it becomes clear that the best place for possible sand mining is west central Trempealeau County, although this isn't the only place, just the largest area. Based on my on interpretation it seems the biggest factors in this are the distance to railroad terminals, because there is only one and it is on the far western side. The other big factor I feel is zoning in the county. By looking at the zoning map you can see a large green swathe through the west central part of the county.




             



             




             





Conclusion

Using the knowledge and tools acquired throughout my experience in GIS to complete an exercise like this makes me feel more confident entering the workforce. The advanced raster analysis tools in ArcGIS are very powerful and are a very helpful way to show what needs to be shown. Even though this exercise doesn't hold any real weight as far as classifications, I still feel like it is somewhat accurate to where sand mines would need to be located. It goes to show how much thought can be put into building one of these mines and the implications if all criteria are not met. I think one interesting thing to do would be to use our geocoded mines to see if they follow our suitability and risk models.

Friday, November 21, 2014

Network Analysis for Sand Mines and Rail Terminals

Intro

The goal of this lab was to use network analysis, python scripting, and data flow modeling to carry out the steps of the lab automatically.  This does require some time to set up and get running properly, but after everything runs on its own.  Network analysis is a powerful tool that allows for many different types of routing, in this case to the nearest facility.  Network analysis is a key tool for logistics in many companies and is a smart way to figure out the most efficient route.  Python scripting is another great way to save yourself some time and let the scripts run the tools and create things for you.  Lastly data flow modeling is another piece of the same pie that allows the displaying of a process and then streamlines it.  In this instance we created a python script which narrowed our data by the criteria provided, and created some feature classes.  We then made a data flow model, which we used to run network analysis and provide us with some statistics on the effects of sand trucks on roads.

Methods

First the script was written in python to scale down our data based on criteria.  The criteria were that we didn't want to include any mines that have a railroad loading station, or ones that are within 1.5km of a railroad, because if that's the case they would have built a spur.  Those criteria were met with the script and new feature classes were made based on those criteria.  More information on this part of the lab can be found in my last post.

Network analyst is used to do efficient route modeling.  The network analyst tools were used in this lab to find the nearest facility, the facilities being the rail terminals in Wisconsin, as well as in Winona, MN.  The incidents in the network analyst tool were labeled as incidents.  The data used in the network analysis were from a couple sources.  The network dataset that contains the roads came from ESRI streetmap data, the mine data came from the Wisconsin DNR, and the rail terminal data was provided by the Department of Transportation.

The data flow model used in this lab allowed the automation of the routes, creation of new fields, and also the calculation and summarizing of said fields.  The two fields that were added were "Miles" and "Cost".  To calculate the miles field I took the shape length of each route, which is in meters because of the projection, and divided it by 1,609 (how many meters are in a mile). This equation gave me the number of miles.  In the second calculate field box I calculated the impact in dollars of having sand trucks drive on roads in Wisconsin by county.  The trucks took 50 trips there and back, meaning 100 total trips.  The impact on roads per mile was 2.2 cents. The equation for this calculation was ((100*[Miles])*2.2/100). By dividing the total by 100 I got the number in dollars instead of cents.

Figure 1. The model used in exercise 7 to calculate the impact in dollars on Wisconsin roads.

Results and Discussion

The results shown below are all hypothetical and should not be used to make any decisions regarding policymaking, and should also not be shown in any publications.

Figure 2. Below shows a map of the quickest routes from sand mines to rail terminals.  An observation can be made that some of the routes go into Minnesota and use their roads.  This means there are no impacts on Wisconsin roads, as long as the mine uses the most efficient route.  In these cases it makes more sense economically to use a highway, then stay in Wisconsin and take back roads. As you can see the rail terminals in Wood, Trempealeau, and Chippewa counties have numerous mines that utilize them.  This can be seen in the frequency field of figure 3. What figure 3. also shows is that those three counties mentioned are not the highest on the cost field ranking.  This is due in part to how short the routes are for most of the mines in the counties.  In counties like Burnett and Barron the frequency is lower, but the trips are a lot longer.  Should frac sand mines have to pay for the impacts they have on Wisconsin roads? Should more rail spurs be made to prevent the impact on roads? These are questions that the Wisconsin DOT and the state government will have to ponder as more and more mines become active in the state.


Figure 2. Map of routes from sand mines to rail terminals.

Figure 3. Table of frequency of routes per county as well as cost of trucking on roads by county.

Conclusions

After doing this analysis many questions come to mind on how the state plans to deal with the sand mines, especially since in the coming years there will only be more and more becoming active.  Just by doing this hypothetical exercise one can see the impacts are happening to some degree.  Not to mention the other effects the excessive trucking has like air pollution and noise pollution. network analyst can play a big role in answering some of these questions and will most likely be used when the state does decide to make a decision on this topic.

Wednesday, November 12, 2014

Python Script for Network Analysis Exercise

Making this python script was part one of exercise seven. In exercise seven we are looking at the effect commercial trucking has on roads from mines to rail stations. To do an analyze of this question we first need to get rid of the mines that have rail spurs and the mines that are not active.  To do this we used python to make a query and acquire our specified results.

The first step was to set the environments for the script and import the system modules.  The workspace was set to our individual exercise seven geodatabase.  The next step was set the variables we would be using in the script, which were just existing feature classes in the geodatabase, as well as some new ones that we would be creating.  The third step was to create three SQL statements that would query out the mines that we wanted.  The first SQL statement selected the active mines, the second statement selected all of the facilities with "Mine" as a type, and lastly the third statement kept out any mines with the word "Rail" in them. The SQL statements were then ran with the addition of the variables created earlier.  The last step was to remove active mines that were within 1.5km of a railroad.  Any closer distance and they likely would have had a spur built to the railroad. To do this the arcpy.SelectLayerByLocation_Management tool was used.  After those parts of the script were done and the script successfully ran, the result was a point feature class containing 41 mines.



Figure 1. The python script used to query active mines with no railroads in a 1.5km radius.

Friday, November 7, 2014

Data Normalization, Geocoding, and Error Assessment

Goals and Objectives:
     The objective of this lab was to work with excel tables and get comfortable with normalizing data.  Having to normalize data can be very frustrating, because there is no set standards on the way tables, and there data, are displayed.  In GIS I every piece of data is normalized already.  In GIS II it is more like what one would experience in the working world, which involves table normalization.  Geocoding the mines was the next objective and then finding how accurate individuals geocoded by comparing the point distance of individuals mines against the rest of the class.  This gives an idea of how much error was involved in the geocoding process.  The outcome of this work is a shapefile with all of the sand mines in Wisconsin in it.  The mines in the shapefile are all geocoded and ready to be analyzed spatially.
Methods:

Normalizing the data was a time consuming task.  The addresses in the initial spreadsheet are in one of two forms.  The first being that the address is provided, which is good.  The second form is in PLSS, which doesn't really help when the data is moved to ArcMap.  To get the table into ArcMap the addresses had to be standardized. The un-normalized table can be seen in figure 1.  The difference between St. and Street makes a difference and so do capital letters.  The zip code and city also had to be pulled out of the table and separated into different columns.  Some difficulty was found in changing the address from PLSS to a regular address.  To accomplish this the address locator tool on the geocoding toolbar could be used in conjunction with the PLSS data layer, which could be found in the DNR database.  Once the table was normalized it could then be brought in to ArcMap and geocoding could begin. The normalized table is shown in figure 2. 
The first step was to log in to ArcGIS online so that it could connect with your computer and allow geocoding to be done.  Geocoding is relatively straightforward and painless as long as your data has its ducks in a row. For me it worked right away and all of my addresses were mapped with a high match rate.
Once geocoding was complete all of the geocoded addresses for the class needed to be collected so a comparison of accuracy could be done with the individuals who had the same mines as myself. First all of the classes shapfiles of mines needed to merged into one table on ArcMap.  This was frustrating, but after fixing a couple fields it ran successfully.  Before the comparison could be done the mines with the same id number as my own needed to be queried out from all the rest.  The query was long, but simple enough and I got the desired result.  With the selected results a new feature class was created.  Now by taking my geocoded mines and the same geocoded mines done by other classmates, I could run the point distance tool and discover just how accurate I had been during geocoding.  Figure 3 below shows the resulting table.
Results:



Figure 1. This shows the spreadsheet of mines before table normalization. As one can see nothing is really standardized and the address column has more than just the address in it.

Figure 2. This shows the result of table normalization.  Every column is neat and orderly, making the move to ArcMap possible and also making it easier to read.


Figure 3. After running the point distance tool one can see how far each individual mine is from all of the others. This is useful because it allows the interpretation of accuracy of geocoding.



Figure 4.
Discussion:

When it comes to the types of error that cause distance variation during geocoding there are a couple that are relevant.  The most common errors were systematic errors and operation errors.  These are caused by human influence.  An example that occurred during this assignment would be the placement of mines on the map when trying to come up with an address.  Everyone isn't going to pick the same spot therefore systematic error is present.  Another large contributor to error in the assignment was inherent errors.  This type of error spawns from attribute data input and digitizing.   When it comes to attribute data input it's obvious where the error came from.  Each one of us in the class normalized our own mines.  During that process no one did it exactly the same as the next person.  This results in inherent errors.  One way to fix this would be to have a standard set for normalizing data.  
When it comes to the question of how to tell which points are off and which ones are accurate the answer can be tricky.  To find the exact answer to this question we would have to have a very accurate version of this data that had the exact addresses for the mines.  Then we could compare that to the geocoded addresses we came up with and run a point distance tool.  
 Conclusion:

Data normalization is a very crucial, not just with this assignment, but anytime you work with spatial data and tables.  It is a good idea to have a standard laid out ahead of time for data normalization.  If we had that standard before the assignment the class would of probably had a few less headaches.  The problems of mislabeled fields is one that came up a few times during the assignment and also shapefiles projected differently from the rest.  Geocoding is a very helpful tool in GIS and it was very useful to brush up on that in this assignment.


Monday, October 20, 2014

Data Gathering and Preparation for Frac Sand Mining Project

Goals and Objectives

The goal of this assignment was to become familiar with the process of downloading data from different sources on the internet. After downloading the data the next step was to import it into ArcGIS, join the data, and then project the data from the different online sources into one coordinate system. Once that was accomplished the last task was to create and design a geodatabase to store the data.

General Methods

The first part of this lab consisted of data downloading from online resources.  Before any downloading could be done it was first important to create a temporary file folder in the Q drive.  This allows large zip files to be downloaded only temporarily so they do not take up space on the server.  From the temp folder the zip files were extracted into a working folder where they can be manipulated and later put into a geodatabase. In figure 1 below are the sources where the data was gathered from, as well as what was downloaded from them.

Figure 1

When looking at the NRCS Soil Survey data alone it isn't as beneficial as one would like it to be.  To enhance it's usability the SSURGO data had to be imported and joined with the soils data, along with the drainage index and productivity index.  To do some of this we had to use Microsoft Access, ArcMap, and ArcCatalog.  Lastly we had to bring in railroad data from the DOT and clip it to the Trempealeau County border.

After all of the data was downloaded and the geodatabase was organized, the python script was written, which can be seen in my second blog post labeled "Python Scripting".  From the Python Script in post two the following maps were created:

Figure 2: Trempealeau County


Figure 3: Digital Elevation Model (DEM) of Trempealeau County

Figure 4: NASS Cropland Data for Trempealeau County

 Figure 5: Land Cover Data for Trempealeau County


Data Accuracy

By looking at the metadata one can learn more about the data and also about the data's limitations.  Figure 6 has all of the available metadata for the sources provided.  If the data couldn't be found then it it marked with N/A.


Conclusion

being able to download data from outside sources, join it, organize it in a geodatabase, and then manipulate it in ArcGIS is a valuable skill.  This exercise provided good practice on doing all of those things and also taught us how frustrating dealing with downloaded data can be.  Preparing the data for use in ArcGIS took a lot of time and effort because the people who created it didn't have a set metadata template to follow.  Using Python two set up our map layers was also frustrating but left one with a feeling of accomplishment when the code finally ran without errors.






Python Scripts

Python is a cross platform open source programming language.  Python is a very good language for accomplishing geoproccessing tools in GIS. This helped make it the language of choice for ESRI's ArcGIS, as well as many other GIS programs.  It's easy to learn compared to other languages and is also very widely used and well supported.  As programming grows in importance, future employers will expect prospective employees to know a programming language such as this.
   
For this lab the task was to write a script that would project the rasters, clip them to the county boundary, and load them into a geodatabase.

Sand Mining in Western Wisconsin

Frac sand mining in Wisconsin is something that has been around for a while, but has ramped up in quantity over the last couple years.  Wisconsin is one of the only locations in the country where sand of such a high quality can be found, because before it can be used in hydrofracking it must first meet very stringent standards.  Frac sand mining is basically the systematic removal of sand from mining locations.  That sand is then used in filter beds, well screen packing, glass making, dairy operations, but mostly and more recently for use in hydrofracking in the petroleum industries.  Hydrofracking is used to extract crude oil and natural gas from sand and rock deep under the surface.  The sand is specifically used to keep the fissures open that the pressure creates, allowing natural gas and crude oil to be extracted from the well.  The increase in Hydrofracking has greatly increased the demand for sand mines in Central and Western Wisconsin, where silica sand is very common.
Figure 1: the Hydrofracking Process

When it comes to the environmental impacts of frac sand mining the list goes on and on.  Air impacts, blasting, transportation burdens, employee health hazards, water pollution, noise pollution, etc.  It really is an exhausting list of impacts that frac sand mining can have.  but with these negative impacts there are some positives.  Numerous jobs are created every time a new mine is constructed.  The economy also improves when a mine is opened.

It's a tough question to answer whether these mines are positive or negative in Wisconsin. One way would be to weigh the economic gains against the environmental impacts.  In this GIS II class we will delve deeper into the impacts of frac sand mines on the environment and on the people that inhabit it.  By the end of the class the goal is to have a suitability and risk model for the mines, specifically in Trempealeau County Wisconsin.

Sources:

http://dnr.wi.gov/topic/Mines/Deposit.html

http://dnr.wi.gov/topic/mines/silica.html

http://dnr.wi.gov/topic/Mines/documents/SilicaSandMiningFinal.pdf

http://wcwrpc.org/frac-sand-factsheet.pdf

http://popularlogistics.com/2011/11/paul-krugman-on-fracking-and-renewable-energy/