Feature Class Indexes Using Python and XML

Python
The Regulatory GIS Support System (RegGSS) is an ArcMap extension written in C# and managed by SFWMD Regulation GIS.

RegGSS Toolbar

It  that has numerous functions to load data including a number of “Find” functions that work by indexing the names of features in a feature class and then makes this available through a listbox from which users can select individual features.

One of these Finds indexes the ArcHydro feature class HydroEdge containing canal centerlines. Unfortunately, with over 210,000 features creating an index on the fly can take well over a minute and this can try a user’s patience.

Find Canal (AHED)

A solution to this issue is to create a list of feature names ahead of time and then just load it into a listbox. In the example below, this is being done using Python and a XML file.

You can view CreateFindIndex.py code through Github.

And here is what the XML looks like:
XML File

Louis Artola has a good post on using Python to write XML on his blog louisartola|software.

Let us know if you have any comments,

By Juan Tobar, Supervisor – Geographers, Regulation GIS, SFWMD

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s