Select By Location with condition "are identical to"

2496
2
08-11-2011 06:31 AM
FilippaFideria
New Contributor
Hi forum,

How can I do,with c# language, a "Select by location" between two shapefiles with the condition "are identical to"?
I would like to do a button tool for ArcMap tha compare two shapefile end select the polygon that are identical or would be fine even those who are different.

I hope you help me!
Thanks in advance.
0 Kudos
2 Replies
DubravkoAntonic
New Contributor III
There is my post with some code, please check it. I think it might help you.

http://forums.arcgis.com/threads/36660-Get-difference-between-two-shapefile
0 Kudos
FilippaFideria
New Contributor
Hi,
I have read your post and test your code, it works fine but is too slow for me.
I think that the problem is because I have more than 10000 record in the attribute table for each shape,
than I had to add the function "SelectByShapeAndCheckIfEqual" in a loop:
 List<int> fidList = GetFidList(Properties.Settings.Default._newFolderPath, nomeShape);
foreach (int fid in fidList)
{
    newFeature = newFeatureClass.GetFeature(Convert.ToInt32(fid));
    SelectByShapeAndCheckIfEqual(newFeature, oldFeatureLayer);
}

Maybe it's not what I need? I'll explain what I should do!
I have two shapefile refer to two different months, for example month_1 and month_2.
I should look for differences alphanumeric (attribute table) and geometric between shapefile of month_1 and shapefile of month_2 and vice versa, mont_2 vs month_1.
Than, save the new shapefile with the difference only.

Have you code to suggest me? Or link?
Please help me!

Tanks so much in advance!!!
0 Kudos