Extracting the Data from Shape File for Data Comparison

11-12-2021 03:58 AM
New Contributor

Dear All,

I have 2 shape files called Existing.shp and Updated.shp with following columns ObjectID,DateTime,X,Y,Location,AOIName,CreatedBy,EditedBy

Existing.shp will be in the Web applications and Updated.shp will be udated once in 10 days from various persons. I have to compare the data with Existing.shp and Updated.shp to identify the duplicate data.

Means Comparing Existing.shp to Updated.shp and remove the duplicate data in Updated.shp, Because Existing.shp is clean and processed by the application.


1. Download the Existing.shp from the Application and Store it in my local folder [D:\DataCompare\Existing.shp].

2.Receive the Updated.shp from various persons and store it in[D:\DataCompare\Updated.shp].

3.Compare Existing.shp and Updated.shp and Remove Duplicate Data in Updated.shp

4.Insert the new Data to Existing.shp and Upload to Application.


1. Visual Studio 2017 Community/C#/Windows Desktop Forms

2. Installed ESRI.ArcGISRunTime


1.How to read the data in C# from the Existing.shp and Updated.shp like CreatedBy,Date.

If Possible Code Snippets please.

2.  How to load in store it in C#/Dictionary with specific Coulmns. So I can Compare with Date/CreatedBy

Once the data are loaded in Dictionary, I can perform other conditions.

I tried :

// Open the shapefile
ShapefileFeatureTable myShapefile = await ShapefileFeatureTable.OpenAsync(filepath);

// Create a feature layer to display the shapefile
FeatureLayer newFeatureLayer = new FeatureLayer(myShapefile);

But I am unable to access the data Row wise. Am I doing right?




0 Kudos
1 Reply
Esri Notable Contributor

You can use QueryAsync on myShapefile to query all the features. Use the ObjectID column to compare attributes.

If you're just trying to "sync" data however, you might want to consider using ArcGIS Server and a local  mobile geodatabase, since you can perform a simple sync operation to bring your local data in sync with the server.

0 Kudos