> Script Details
Compare two feature classes in a file geodatabase
report inappropriate content
Mar 16 2010
Status of work
ESRI Attribution and Licensing Agreement
ArcScripts is intended for the free exchange of scripts and tools related to ESRI software products. Please alert the moderator if this script is a demo, trial-version, or an advertisement for a retail product.
This tool compares two "before and after" feature classes in a file geodatabase to determine where geometries and specific attributes have changed. The output is a third feature class containing just the changed features.
This tool works by comparing feature coordinates (for points), lengths (for polylines), and areas (for polygons). It handles feature reshape, move, add, and delete operations. It can also detect modified attributes. The two feature classes must have the same shape type (point, line, or polygon).
This tool was created to address a challenge with ArcGIS Server map cache updates. A successful cache update requires re-creating all the tiles where the source data has changed. For caches that don't cover a large area, such as a city or small county, the cache can often be completely re-created overnight or on a weekend. A full update is also feasible for caches that exist at small scales only, such as weather radar.
Sometimes the cache is too big for the server administrator to regularly complete a full update. In these situations, a full update might take too long or exhaust too many server resources to be useful. A better strategy is to only update tiles in places where the data has changed. To target your cache updates, you need a "delta feature class" of areas where the source data has changed. This is easy enough to get with ArcSDE when you have versioning at work (see the script Show Edits Since Reconcile by Tom Brenneman), but it's a little trickier for file geodatabases. That's where this tool becomes useful.
You can use the output from this tool to derive a feature class that specifies a map cache update area. However, you shouldn't use this tool output to directly define cache update boundaries. If comparing polygons, first run a Dissolve on the output of this tool. If comparing points or polylines, run Buffer on the output of this tool with a very small buffer distance, then run Dissolve. This will make your cache update run more efficiently. (The Manage Map Server Cache Tiles Tool restarts on each feature, so running Dissolve to create one feature eliminates that overhead.)