1 shapefile....duplicate features

991
8
Jump to solution
09-18-2013 10:17 AM
ShikoNjuno
Occasional Contributor
I created a shapefile by merging to other ones together but now some of the polygons have more than one feature....I'm guessing the merge somehow caused this:

[ATTACH=CONFIG]27552[/ATTACH]

Does anyone know how to delete the duplicate feature from the shapefile? It holds the exact same info so I don't really need it....plus it's messing up my computations using  Zonal Statistics tool :mad:

Any suggestions??
0 Kudos
1 Solution

Accepted Solutions
ShikoNjuno
Occasional Contributor
Thank you all for your input, but Iended up getting some help with a piece of code that I found online.See thread below:

http://forums.arcgis.com/threads/92924-10.1-code-that-populates-a-field-with-sequential-numbers

View solution in original post

0 Kudos
8 Replies
TimWitt
Frequent Contributor
Maybe the Dissolve tool will help you with that?

Or Delete Identical?
0 Kudos
ShikoNjuno
Occasional Contributor
Tim, thanks for your input.
However, I'm having trouble with that because I don't have a field that holds values unique to each polygon. The ID and FID fields are not unique to the polygons for whatever reason.
Do you know of a way to quickly create a field that has a unique ID for the polygons so that I can perform a DISSOLVE based on this unique value? Otherwise if not then I still get duplicate features.

I'm thinking maybe something like a code or script that I can type into the Field Calculator window so it can just fill the field with consecutive unique numbers?!
0 Kudos
DanielHall_Ballester
New Contributor III
This is a bit of a strange workaround, but you could calculate the area of all your polygons. probably in mm.  In theory, the only polygons with identical areas will be the duplicate polygons, so you should be able to use this area value to spot your duplicates and either delete them or dissolve them.
0 Kudos
TimWitt
Frequent Contributor
Shiko,

before you merge your polygons, as outlined here, create a Long Integer field named "UNIQID" in both of your files. Now follow the instructions for your first polygon layer.

Once you have done it for your first polygon, write down your highest number that was created in your "UNIQID" field (Sort the field descending).

Now go through the same process with your other polygon, but where it says "lStart = 1" put the number you wrote down +1 instead of the 1 (i.e. if the number you wrote down was 2000 add 1 and write 2001 in place of the 1).

Now you can merge your polygons and you will have a continuous UNIQID, which you can use to find duplicates.

Hope this makes sense!

Tim
0 Kudos
ShikoNjuno
Occasional Contributor
Thank you all for your input, but Iended up getting some help with a piece of code that I found online.See thread below:

http://forums.arcgis.com/threads/92924-10.1-code-that-populates-a-field-with-sequential-numbers
0 Kudos
TimWitt
Frequent Contributor
Did that take care of your duplicates or did you also have to use the dissolve tool? I'm confused, hehe.
0 Kudos
ShikoNjuno
Occasional Contributor
Did that take care of your duplicates or did you also have to use the dissolve tool? I'm confused, hehe.


Actually, what I ended up using was one of the original shapefiles (before the merge) and created a unique ID field using the code above.
But I will definitely refer back to your thread if I run into a similar duplicate feature issue that I can't get around.
Thanks :)
0 Kudos
TimWitt
Frequent Contributor
Ahh I see, sounds good!
0 Kudos