Eliminate smallest polygon instead of biggest

479
2
09-07-2011 01:41 PM
USFS_AGOLAdministrator
New Contributor III
Hi All,

I have been asked to program a new tool that would imitate the Eliminate functionality of ArcToolbox.  However, they want me to eliminate the smallest polygon, instead of the largest one, as is the default functionality of ArcToolbox.  I need to program this is in Visual Studio 2008 using Visual Basic.Net.  Does anyone know if this is possible, to change the default functionality of Eliminate to delete the smallest sliver polygon, instead of eliminating the largest?  Any sample code would be greatly appreciated. 

Thanks in advance.
0 Kudos
2 Replies
JohnHauck
Occasional Contributor II
The documentation for this tool states:

Eliminates polygons by merging them with neighboring polygons that have the largest area or the longest shared border. Eliminate is often used to remove small sliver polygons that are the result of overlay operations, such as Intersect or Union.

So the tool is already designed to remove the smallest polygon. What is the question here?
0 Kudos
USFS_AGOLAdministrator
New Contributor III
From the documentation:

Eliminate_management (in_features, out_feature_class, {selection}, {ex_where_clause}, {ex_features})
Parameter Explanation Data Type
in_features The layer whose polygons will be merged into neighboring polygons.
Feature Layer
out_feature_class The feature class to be created.
Feature Class
selection
(Optional) These options specify which method will be used for eliminating features.

LENGTH �??Merges a selected polygon with a neighboring unselected polygon by dropping the shared border. The neighboring polygon is the one with the LONGEST shared border. This is the default.
AREA �??Merges a selected polygon with a neighboring unselected polygon by dropping the shared border. The neighboring polygon is the one with the LARGEST area.

There is no way to make it use the neighboring polygon with the SHORTEST length, or the SMALLEST area.  That is what I am looking to do.
0 Kudos