Thursday, May 28, 2009

ArcGIS Explorer - Color Coding Shapefile Data

I’ve been working on an ArcGIS Explorer stand-alone application that needs to let users select buildings inside of a buffer that is created around a user defined point. The attributes of the selected buildings and their colors need to be changed to indicate their status. The user will also be able to click on a building to select it, and then be able to change the status of the building (by changing the color/attribute of the selected building).

Using shapefiles, a file based personal geodatabase, or an ArcSDE geodatabase won’t work, because it does not look like you can have an attribute based coloring scheme. There also does not appear to by any way to extrude the shapefiles, and the building need to be 3D.
I can use KML to extrude buildings and change the color of individual features, but I cannot run any of the spatial operations on a KML file.

I am getting around this by using both shapefiles and KML. I’m using the ArcGIS Explorer API to generate KML form the shapefiles on the fly. Each KML Placemark has an ID that is equal to the shapefile FeatureID. I’m using the API to select features from the shapefile based on a point (for selecting an individual building) or by area (to select t group of buildings from a buffer). I can then open the XML/KML file, get the associated Placemarks by matching their Id to the FID, change their style to reflect the change in attribution, and then reload to view the change.

This seems to be a nice way to get around some of the limitations in ArcGIS Explorer to make it quite a bit more useful for my application requirements. This method also seems to work with file based personal geodatabases and ArcSDE.

1 comment:

  1. Anonymous7:04 AM

    Interesting! I am trying to do something similar. Is this still the best way to deal with the issue?

    ReplyDelete