GIS5103: Lab 11 -- Sharing Custom Tools

To finish up the semester of python, we learned how to share the custom tools that we made.

The first part of the lab required some setting changes to allow python files to be seen in the ArcCatalog.  After that, it was a tiny bit of editing of the script and then importing (embedding) and protecting the script.

Below is a screenshot of the tool dialog box and the final output
Overall, this semester was very informative and educational.  I quite like editing scripts and making something and watch it work (although quite frustrating when it doesn't actually work ... but worth it when it does).

When asked what was the most memorable or interesting part of the semester, I said the creating custom tools lab.  This made me realize how versatile and customizable GIS is with python.  I didn't realize that there were so many other things that can be done, and really the possibilities are (almost) endless.

Now to work on the final project.......

GIS5103 -- Module10: Creating Custom Tools

This week we refreshed on some topics we learned previously in the course and built a toolbox with a script tool that functioned as a tool to clip multiple layers at once.

The first step was creating the actual toolbox within ArcCatalog, and then adding the provided script.
The second step required defining the parameters of the tool within the tool properties > parameters tab.  We added four fields and a screenshot of my tool parameters is shown below:

The four parameters we added were: 
1) Input file location (workspace) which was listed as our data folder
2) Clip boundary input (feature class) which would be used as what we will clip the input features to
3) Input features (feature class) these are the features that are to be clipped (MUST make sure to set MultiValue to Yes to allow the script/tool to work with lists (or multiple input features)
4) Output file location (workspace) Listed as the results folder

We then edited the script to allow for the parameters by using the arc…

GIS 5103: Lab 9 -- Peer Review # 2

I based my second peer review participation assignment on the article by Thomas R. Etherington titled Python based GIS tools for landscape genetics: visualizing genetic relatedness and measuring landscape connectivity (link attached at bottom). The article discusses the importance of customization in landscape genetics to help understand many spatial ecological processes as well as the development of an ArcToolbox that contains scripts that convert files, visualize genetic relatedness, and measure landscape connectivity using least-cost path analysis.  This allows the analyst to save time, and obtain better analysis. This article does a great job in explaining the background of landscape genetics and the importance in ecological research.  It also explains the need for the toolbox they are creating.  Coming from a marine biology background and having taken multiple ecology courses, I never knew how important GIS could be in ecological analysis. I also never realized how complex it c…

GIS5103: Module 9 - working with rasters

This week we learned how to manipulate rasters within python.  We actually did something very similar to a couple of labs we did in the applications course (5100). I have to admit, this was MUCH quicker than clicking through all of the buttons and having multiple files of everything and every step saved.

For the assignment we had to create a final raster of "suitable areas" that met the following criteria:
- Forest Land Cover
- Slope between 5 and 20 degrees
- Aspect between 150 and 270 degrees

To begin, we had to use the .RemapValue() and the .Reclassify() to select those areas in the landcover raster that were covered in forest (land cover code: 41, 42, 43)

After this we created temporary files for the slope and aspect requirements.  Using the & we combined all 5 rasters into one that showed areas coded as 1 as those areas that met all the requirements. All other areas were coded as 0.

Overall, a relatively straightforward lab.

Below is the output of the final raster t…

GIS 5100: Lab 8 - Damage Assessment

This lab was a build on coastal flooding and was actually pretty interesting and informative to see how damage assessment professionals analyze damage after a natural disaster, such as hurricane sandy.
In part B/C and D of the lab, we were to assess some homes on the coast of New Jersey for damage and rank this damage on a scale of: - No Damage - Affected - Minor Damage - Major Damage - Destroyed 
We then digitized the coastline and determined the distance between the different ranks of damage and the coastline in order to determine if the manual process of assessing the damage could be slightly more automated (using the near analysis tool)
Below are my results from the manual damage assessment categorized by structural damage as well as a table summarizing the distance to the coastline analysis:
Structural Damage Category Count of structures within distance from the coastline
0-100m (0-328ft) 100-200m (328–656ft) 200-300m (656-984ft) No Damage 0 0 2 Affected 0 0 6 Minor Damage

GIS 5103 - Module 8: Working with Geometries

This lab was slightly difficult for me, and as usual, very time consuming.

We were tasked with creating a txt file of coordinates from a shapefile, which will be very useful in my career.

First, we had to create a search cursor to call the OID, XY Coordinates, as well as the NAME field. In order to work with geometries (the OID, and the XY coordinates are both part of the geometry) we created geometry tokens such as SHAPE@LENGTH or SHAPE@XY which would either just return the length of the specified shape or the XY coordinates of the shape. However, we wanted the full geometry of the objects, so we used OID@ as well as SHAPE@. Using a series of nested loops, we iterated over the rows, parts, and finally to the points which allowed us to derive the array of coordinates to write into our created text file.

Below is a screen capture of part of my created txt. file:

Each row contains the OID, then the Vertex ID number (useful for organization and knowing how many vertices each point has),…

GIS 5100: Lab 7 - Coastal Sea Level Rise

This week was about analyzing the impact of sea level rise on coastal areas. The first task involved calculating the area that was impacted by the sea level rise in the district of Honolulu, Hawai'i. This required processing LIDAR data and selecting only the cells that were in the 3ft flood zone and those that were in a 6ft flood zone. After we found the overall area that would be impacted by 3ft and 6ft sea level rise, we were to find the depth of the flood within the locations. For this, we used the extract by attribute tool, and then the minus tool.

The second task involved the map of sea level rise vs. population density to visualize the relationship between sea level rise and the impacted population.  The map is below:

This map shows the census tracts and the population density per sq. kilometer for a sea level rise of 6ft.  It also shows the flooded zone with the depths.  As you can visualize, there are quite a few high population areas that were impacted.  Further analysis …