Polygon to Region

Create a Region framework for a polygon feature class. Region framework is similar to that in the coverage model. It consists of 1) a polygon feature class (with no overlapping polygons), 2) a region feature class (this is the input polygon feature class and may contain overlapping polygons), and 3) the Region X Polygon (RXP) table that links 1) and 2).

Usage Tips

The Input Feature Class can be either a shapefile or a geodatabase. The Output Feature Class must be of the same data type.

This tool is susceptible to failure due to a SCHEMA LOCK, especially when the feature classes are geodatabases. If the feature classes are geodatabases, the tool will fail if a schema lock is in place on the database. First remove all layers from ArcMap that reference the database. Next delete the schema lock file if it still exists. In the case of a personal geodatabase the schema lock file bears the same name as the database, but has a .ldb extension. If the schema lock file can not be deleted, exit ArcMap. Again try to delete it. (You may have to wait up to a minute before the file can be deleted.) If all else fails, reboot the computer, and try to delete the schema lock file.

Command line syntax

PolygonRegion <Input_Feature_Class> <Output_Feature_Class>

Parameters

Expression Explanation
<Input_Feature_Class>

The input feature class that contains region polygons.

This feature class is made up of polygons that represent regions. They can be overlapping.

ArcMap Layers may not be used as the Input Feature Class.

<Output_Feature_Class>

The name for the output polygon feature class.

Two outputs are created by this tool: 1) the Output Feature Class, and 2) an output table that links the input regions to the output polygons (the RXP table.)

1) The Output Feature Class contains all of the linework from the Input Feature Class, but none of the polygons overlap. For example, if there three identical polygons in the Input Feature Class, each bearing different attributes, then only one copy of this polygon is written to the Output Feature Class. The Output Feature Class retains none of the attributes of the Input Feature Class.

2) The RXP Table. It is named the same as the Output Feature Class with an '_RXP' extension. It is used to link the region polygons of the Input Feature Class to the polygons of the Output Feature Class. It contains three fields:

  • SUBCLASSNO - Links to the Object ID of the Input Feature Class.
  • POLYNO - Links to the Object ID of the Output Feature Class.
  • SUBCLASS - The full pathname of the Input Feature Class.

Command Line Example

workspace c:/workspace/test.mdb
Set c:/workspace/test.mdb into workspace

PolygonRegion activity_region activity_poly 
Executing (PolygonRegion_1): PolygonRegion activity_region activity_poly
Start Time: Thu May 25 21:18:27 2006
Running script PolygonRegion...
Completed script PolygonRegion...
Executed (PolygonRegion_1) successfully.
End Time: Thu May 25 21:19:43 2006 (Elapsed Time: 76.00 secs)

Scripting syntax

PolygonRegion (Input_Feature_Class, Output_Feature_Class)

Parameters

Expression Explanation
Input Feature Class (Required)

The input feature class that contains region polygons.

This feature class is made up of polygons that represent regions. They can be overlapping.

ArcMap Layers may not be used as the Input Feature Class.

Output Feature Class (Required)

The name for the output polygon feature class.

Two outputs are created by this tool: 1) the Output Feature Class, and 2) an output table that links the input regions to the output polygons (the RXP table.)

1) The Output Feature Class contains all of the linework from the Input Feature Class, but none of the polygons overlap. For example, if there three identical polygons in the Input Feature Class, each bearing different attributes, then only one copy of this polygon is written to the Output Feature Class. The Output Feature Class retains none of the attributes of the Input Feature Class.

2) The RXP Table. It is named the same as the Output Feature Class with an '_RXP' extension. It is used to link the region polygons of the Input Feature Class to the polygons of the Output Feature Class. It contains three fields:

  • SUBCLASSNO - Links to the Object ID of the Input Feature Class.
  • POLYNO - Links to the Object ID of the Output Feature Class.
  • SUBCLASS - The full pathname of the Input Feature Class.

Script Example

# Import modules.
import sys, string, os, win32com.client

# Create the Geoprocessor object
gp = win32com.client.Dispatch('esriGeoprocessing.GpDispatch.1')

# Load DV Region toolbox.
gp.AddToolbox('C:/Documents and Settings/dchatfie/Application Data/ESRI/ArcToolbox/My Toolboxes/' + \
                         'DV Region Tools.tbx')

# Set workspace.
gp.workspace = 'c:/workspace/test'

# Create Region framework from overlapping activities polygons.
gp.polygonregion('activity_region', 'activity_poly')