Project 4
GEOG 485
Brian Buchanan
Project 4 was concerned with controlled adding of feature and raster data to a map. I added two tools to a new tool menu called Index which added ortho photos and road shapefiles. I programmed the tools to only work when the ortho and roads indices were within the table of contents. Otherwise, the Index tools were programmed to be invisible. An example of this is shown in Figure 1. Figure 2 shows the usuable Index tools once the two indices were added.
Figure 1: View of the map showing the Index Menu with the Ortho and Roads tools unable to be used because the two indices are not located within the table of contents. This map was created using ArcView 9.2 on September 2, 2008.
Figure 2: Index Menu showing the Add Ortho and Add Roads Tools that are visible after the ortho and roads indices are added to the table of contents. This map was created on September 3, 2008 using ArcView 9.2
The add roads tool was programmed with an error message if the user clicked outside of the indexed road area. This is shown in Figure 3. If the user clicked within the indexed area, then a message box stated the road id, and then the map zoomed into the added road shapefiles. This is shown in Figure 4.
Figure 3: Error message that appears when a user clicks outside of the indexed road areas. This map was created on September 3, 2008 using ArcView 9.2.
Figure 4: Zoomed in portion of hte map showing the added road shapefiles after clicking within an indexed area using the Add Roads tool. This map was created on September 3, 2008 using ArcView 9.2.
The add ortho tools was programmed in a similar way as the add roads tool, but adjusted to add a raster image vs. a feature shapefile. I adjusted the error message to point the user to the indexed ortho areas, which is shown in Figure 5. Figure 6 shows a zoomed in portion of the map showing the ortho background and road shapefiles.
Figure 5: Error message shown when user clicks Add Ortho tool outside of the indexed ortho photo areas. The map was created on September 3, 2008 using ArcView 9.2
Figure 6: Zoomed in portion of the map showing the added roads and background ortho photo. The map was created on September 3, 2008 using ArcView 9.2.
I am finally starting to understand the unique logic of the OMDs. After struggling for weeks, I purchased a textbook on ArcObjects. Combined with the class lessons, I was able to better navigate my way through the OMDs. Even still, finding my way involved a lot of trial and error. Luckily, the majority of the code for this project was made available through the lesson. I found that the overall length of the code required for this project was my largest problem. I spent hours agonizing over my code and wondering why my ortho photos would not load. After consulting the communications board and other websites I was officially stuck and frustrated. Finally, I realized that I was missing a " \ " at the end of the file path. After I corrected this, the code worked correctly!





