Friday, February 29, 2008 4:09 PM -
Code-Challenge-Team
ArcGIS Server Unique Value Generator Geoprocessing Tool
By Ed Clow, Programmer Analyst, Austin, Texas, USA
Download the script.
Code Summary
ColorTool is an ArcGIS Server 9.2 SP4 geoprocessing service that populates a field in a polygon feature layer with color indices in such a way that no adjacent polygons share the same color value. This color field can then be used as the value field for a unique value renderer to symbolize the feature layer in a cartographically effective manner. The user specifies a new or existing field along with a range of values to be used as color indices (a minimum of five values is required).
This tool addresses the issue of displaying a large number of contiguous polygons with a relatively small number of distinct colors. The tool works by analyzing each polygon in relation to adjacent polygons and assigning values so that no two adjacent polygons have the same value. Applying a unique value renderer to this field illustrates the resulting color scheme.
The core functionality of ColorTool resides in a C# DLL written with ArcObjects; the DLL is invoked from an ArcGIS Python 2.4 tool published as a geoprocessing service in ArcGIS Server. ColorTool demonstrates the flexibility of ArcGIS Server as a platform for distributing ArcObjects code in a server-based environment.
This tool will be especially useful for symbolizing spatial data such as parcels, school districts, political districts, and census geography.