Class Plan (10/08)

Monday, November 1, 2010

:: Shortest Path (least cost) analysis will be done in Spatial Analyst.

:: Each team will turn in a KML file, not ArcGIS files. We will discuss ArcGIS 3D Analyst and Google Earth next week.

:: Least Cost Procedure Background

  1. Run through Military Path demo
    1. Down data here
    2. Download guide here (incorrect version, will post corrected version after class)

  2. Each team will create a new (and unique) military terrain in the San Juan Mountains.
    1. Create, by hand:
      1. Mission Points
      2. Known/suspected mine fields
      3. Known/suspected enemy locations
      4. Edited highway layer
    2. Please make it possible for other teams to generate a path
      1. Take into consideration that the path cannot traverse over:
        1. Water Bodies
        2. Highways (delete segments to create a passable terrain)
    3. Teams will then trade these created terrain scenarios.
    4. Shortest path project will be based on:
      1. Traverse through the military terrain provided to each team, taking into consideration any of the datasets provided in the San Juan Mountain geodatabase (download from UTA server). The more datasets included in the generated path, the better. The best projects will make unique and creative uses of the various datasets available.
      2. Why San Juan Mountains and not here in Texas? Our topography is boring.

Turn in a .ZIP file via MavSpace or CD

In the .ZIP:

  • + Instructions for me. (I assume you will want me to install the data directly to the c:/ DRIVE)
  • + Data
  • + MXD (bonus if you create a toolbar with buttons that work)
  • + Toolbox

Seems there were some issues with the Erase tool, which is actually a very powerful analysis tool.

I heard over the weekend that it is not available on the student license. Oops, this is correct and I forgot.

I heard right before class that there were SQL errorsd when run. I will investigate this over the week.

Bottom line? Forget about the homework. I appreciate all efforts to complete it and I am sure the frustrations just make you all like me *even more*! Everyone gets full credit and I will investigate.

Class Plan (10/01)

  1. Reminder about GIS Day
  2. Go over exam
  3. Add a custom toolbar in ArcMap and add a button referencing a geoprocessing tool
  4. Review Pizza Demo model as a reference
  5. Open session to work on projects

Code to call a geoprocessing tool from VBA button:

Private Sub UIButtonControl1_Click()
Dim pApp As IApplication
Set pApp = Application

Dim pUID As New UID
pUID = "esriGeoprocessingUI.ArcToolboxExtension"

Dim pATBExt As IArcToolboxExtension
Set pATBExt = Application.FindExtensionByCLSID(pUID)

Dim pAtb As IArcToolbox
Set pAtb = pATBExt.ArcToolbox

Dim pTool As IGPTool
Set pTool = pAtb.GetToolbyNameString("buffer_analysis")

Dim pParams As IArray
Set pParams = pTool.ParameterInfo

Dim pParameter As IGPParameter
Dim pParamEdit As IGPParameterEdit
Dim pDataType As IGPDataType
Dim sValue As String

'First Parameter
Set pParameter = pParams.Element(0)
Set pParamEdit = pParameter
Set pDataType = pParameter.DataType
sValue = "D:\workspace\Newfoundland.mdb\roads"
Set pParamEdit.Value = pDataType.CreateValue(sValue)

'Second Parameter
Set pParameter = pParams.Element(1)
Set pParamEdit = pParameter
Set pDataType = pParameter.DataType
sValue = "D:\workspace\Newfoundland.mdb\roads_buf"
Set pParamEdit.Value = pDataType.CreateValue(sValue)

'Third Parameter
Set pParameter = pParams.Element(2)
Set pParamEdit = pParameter
Set pDataType = pParameter.DataType
sValue = "500 Meters"
Set pParamEdit.Value = pDataType.CreateValue(sValue)

Dim pCommand As IGPToolCommandHelper
Set pCommand = New GPToolCommandHelper
pCommand.SetTool pTool
pCommand.Invoke pParams
End Sub
Also need to ensure the ESRI GeoprocessingUI Libraries is referenced.