Wednesday, November 27, 2013

Finding Lakeview Lots

I was just asked by an appraiser to make a map of a subdivision so that he could determine which lots have a view of a nearby reservoir.  This area was affected by the Rockport 5 Fire in August of 2013, so a re-appraisal is in order to assess the effects on properties in the area.

Rather than just make a map, I thought I could do some view-shed analysis to select the lots that have a view of the reservoir.

Observer Points

I started out by creating a fishnet grid of the reservoir with the label points option checked.  I used the resulting label points as my observer points for the viewshed tool in the 3D Analyst toolbox.  I exported the reservoir to a stand-alone feature class, then ran the fishnet tool using that feature class as my extent template.  On my first attempt I used a 40' x 40' grid, but I found this was too small - creating thousands of observer points.  My next attempt I used 300' x 300' and that resulted in a little over 500 observer points.
Create Fishnet Results
Points and polygons from Create Fishnet tool.
I then had to get rid of the points outside of the reservoir boundaries.  I did this by selecting the points that intersected with the reservoir, then switch the selection and deleted the selected points.

Smaller DEM

I didn't want to do viewshed analysis for the entire DEM, so I used the Extract by Mask tool in the Spatial Analyst - Extract toolbox.  For the mask, I just created a simple rectangle polygon in a stand-alone feature class.



I used the smaller DEM raster and the label points for input to the viewshed tool.  It took several minutes to process the viewshed even with a smaller DEM.  It would probably be faster with fewer observation points.  The result is another raster with two columns of data.  The VALUE field has the number of observer points visible from that cell.  The COUNT field has the number of cells that can also see that many observer points.

I converted the visibility raster to polygon features and deleted the polygons with a GRIDCODE of 0.  Then I selected the properties within the desired subdivisions that intersected the visibility polygons.  Then unselected those that just touched on the edge, or had the majority of the lot that wasn't inside the visibility layer.

Final Map

The final map showed the subdivisions color coded by each of the phases, the locations of existing buildings, the locations of buildings that burned in the fire, the fire perimeter, and the visibility raster.  All overlayed on recent aerial imagery.  I also created a spreadsheet of lots that were considered view lots.

Friday, November 22, 2013

X Ray for ArcCatalog - How Does That "Use Spatial Reference" Option Work?

X Ray for ArcCatalog

In my quest to implement the Local Government Information Model, I have struggled with the X Ray for AcrCatalog add-in.  The add-in takes an xml document defining the schema of a geodatabase and applies it to an empty file geodatabase.  It does a bunch of other stuff, but that is the only thing I wanted to use it for.

I got hung up on the needed step of changing the spatial reference before applying the xml schema to my geodatabase.  If I would have followed the steps here I would have not struggled at all.  I also found this video by Heather Eisan from Esri very helpful:


For some reason, I got as far as downloading and installing the add-in, but then got stuck because I was using the help document for X Ray under the X Ray Help menu to set the spatial reference:

I followed those steps again and again with no change.  The steps I should have followed are:
  1. Select the Local Government xml file in the contents window of ArcCatalog.
  2. Open the xml document in X Ray by clicking on the folder with an x on it- , or use the Open XML Workspace  choice in the X Ray menu on the X Ray window.
  3. Select a feature dataset or feature class with the desired spatial reference in the contents window in ArcCatalog.
  4. Select the Use Spatial Reference choice in the Options menu on the X Ray window.
  5. Click the save button or the Save choice from the X Ray menu on the X Ray window.
  6. Select the empty file geodatabase you want to apply the schema to in the contents window of ArcCatalog.
  7. Click the Import XML Workspace to selected GDB button, or the Import to Geodatabse choice in the X-Ray menu.
I was missing those two very important steps in bold print above.

You can actually skip X Ray altogether by editing the xml document in Notepad++ or some other xml editor.  You can search for the <WKT> tags and replace the text between them with text from another xml document you create by right clicking on a feature dataset or feature class and choosing Export - XML Workspace Document, making sure you select the schema only option.

After successfully importing the schema into your LGIM geodatabase, you can then use another set of custom tools written in python called Gizinta, (written by the same developer that wrote X-Ray) that also uses xml files to port your existing data into your LGIM geodatabase.  But that is for a future post.

Thursday, November 21, 2013

Upgrade Heartache

Upgrade Delay

I used to upgrade my version of ArcGIS for Desktop as soon as the box of media was delivered.  But ever since Esri started making the media available for download and shipped only by request, I have become a bit slower to implement the upgrade.  One of the reasons being the servers Esri uses are very slow, and another being it took half the day to uninstall the old version and install the new one.  I usually look through the new features and if there is something to make it worthwhile I will upgrade sooner rather than later.

With 10.2, I haven't been too eager for the upgrade - partly because of the very difficult time I had getting ArcGIS for Server back to an operational state after the last upgrade.  I finally bit the bullet today and upgraded from 10.1 to 10.2, if only to use the 10.2 version of the Local Government Information Model.  After doing the upgrade, I realized another reason why I delay the upgrade - all of my customizations of the interface are discarded with the new version.  

Getting Back What Once Was Mine

So if you like your toolbars where they are, and you don't want to rebuild ArcMap to the way you are used to using it, you need to copy some files from your 10.1 installation folders to the 10.2 folders.


All of your toolbar placements and other customizations like keyboard shortcuts etc. are stored in your Normal.mxt template.  The 10.1 version of the file is located at:


Just copy that file and paste it into:


Don't worry about keeping the Normal.mxt that is already in that folder, just pick the replace option when you paste it in there, that file is set to the install defaults and you don't want it.

If you can't find an AppData folder, your system is hiding system folders and files.  Go here to learn how to make Windows show them.


If you have created any custom toolboxes with models, scripts or geoprocessing tools in them, you can copy those over as well.  Toolboxes are located at:

C:\Users\<YourUsername>\AppData\Roaming\ESRI\Desktop10.1\ArcToolbox\My Toolboxes

Just copy those files to:

C:\Users\<YourUsername>\AppData\Roaming\ESRI\Desktop10.2\ArcToolbox\My Toolboxes


Style files are created when you create your own color ramps, symbols etc.  These files have a .style extension and they live at:


So put them in:



You can probably figure out the rest by browsing the folders in the Desktop10.1 directory.  There may be a folder like Coordinate Systems.  This folder has any coordinate systems you selected as favorites.  There is a Templates folder.  This folder stores, of all things - templates you have created.  There are also folders for ArcCatalog and Locators in the Desktop10.1 folder.

Get On the Stick, Esri

Copying these files over with every upgrade is a bit of a pain and, if you are like me, you forget where the files are located every time you do an upgrade and have to search for their location.  I'm surprised there isn't a part of the install package that searches for these types of files and asks if you would like to have the install copy them over.  How hard would that be Esri?