Is there a way to tell if a feature class includes multipart geometry?

10165
8
Jump to solution
02-02-2017 07:29 AM
berniejconnors
Occasional Contributor III

I have two feature classes of ~500,000 polygons each.  Other than finding a single record that is linked to several polygons is there a way to tell if my feature class includes multipart geometry?

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
ChrisDonohue__GISP
MVP Alum

There are probably other ways, but here's the first thing I could think of:

Save off a copy of the layer and then check the number of records.  Then start an Editing session on that saved layer, "Select All" records, turn on the "Advanced Editing toolbar", and hit the "Explode Multipart Features" button.  Then check the number of records.  If the number has increased, you have multipart features.  And if you want to find them, Save the edits, then do a Select by Location with the Identical option versus your original layer, then Switch Selection the records.

Chris Donohue, GISP

View solution in original post

8 Replies
IanMurray
Frequent Contributor

Using Python you could check each Polygon Geometry and check to see if it is multipart or not.  I don't think in a feature class property  or layer property itself there is any way to access whether the feature is multipart or not(Someone correct me if I'm wrong here).

http://pro.arcgis.com/en/pro-app/arcpy/classes/polygon.htm

http://gis.stackexchange.com/questions/43943/how-to-filter-out-multipart-polygons-and-then-buffer

ChrisDonohue__GISP
MVP Alum

There are probably other ways, but here's the first thing I could think of:

Save off a copy of the layer and then check the number of records.  Then start an Editing session on that saved layer, "Select All" records, turn on the "Advanced Editing toolbar", and hit the "Explode Multipart Features" button.  Then check the number of records.  If the number has increased, you have multipart features.  And if you want to find them, Save the edits, then do a Select by Location with the Identical option versus your original layer, then Switch Selection the records.

Chris Donohue, GISP

AdamZiegler1
Esri Contributor

Hi Bernie - Are you working against an Enterprise Geodatabase? I have ran SQL queries in the past directly against an Oracle Enterprise Geodatabase using ST_Geometry functions (geometry was stored using ST_Geometry).

ST_NumGeometries 

If you have the Data Reviewer extension there are tools for this type of check.

Finding multipart polygons—Help | ArcGIS Desktop 

You could also use a Python Field calculator to calculate Is Multipart or part count based off the shape (would require adding fields...)

Calculate Field—Help | ArcGIS for Desktop 

-Adam Z

berniejconnors
Occasional Contributor III

Adam - I am using a file geodatabase and I don't have the Data Reviewer extension but thanks for the suggestions.

Bernie.

0 Kudos
ChrisDonohue__GISP
MVP Alum

Another idea (as the caffeine finally kicks in )

An slightly easier option than using Explode in the workflow I posted above is to substitute in the Multipart to Singlepart (Data Management) geoprocesssing tool instead of going into an Editing session and using Explode.  Same workflow otherwise.

Multipart To Singlepart—Help | ArcGIS for Desktop 

Chris Donohue, GISP

PaulLohr
Occasional Contributor III

In QGIS, we can use the expression "num_geometries($geometry)" in the Field Calculator to return a count of geometry parts.

Isn't there an expression which could be used in the Field Calculator to either detect or count multipart geometry?

Thanks for any help.

Bud
by
Notable Contributor

You can use the Number of Parts property in Calculate Geometry:

Bud_0-1701966304171.png

 

PaulLohr
Occasional Contributor III

Bud,

I should have mentioned that we are not using Pro. Although your answer will be helpful to others.