2 sets of point data, i need the difference

3013
12
Jump to solution
05-03-2016 02:18 PM
MikeHenson
Occasional Contributor


I have 2 sets of point data. (shape files)  1 file has about 500 points, and the 2nd file has about 800 points (but this 2nd file has the exact ones the first file has).  SO, I need to figure a way to select the points in the 2nd file that are not included in the 1st file.  (approx 300).  Any help with this would be greatly appreciated.

0 Kudos
1 Solution

Accepted Solutions
ChrisDonohue__GISP
MVP Frequent Contributor

There are several ways to do this.  A big constraint, though, will be if there are multiple points in the same dataset that overlap.  If they don't, the easiest way is to use "Select By Location", then reverse the selected set to come up with the ones that don't match.

Using Select By Location—Help | ArcGIS for Desktop

If there are overlapping points in the same dataset, there are other ways, but we will need to know more about how the data is related.  For example, are there unique ID's that match between both datasets.  If so, a Join By Attribute can be done to find the ones in common between both datasets.

Joining attributes in one table to another—Help | ArcGIS for Desktop

Chris Donohue, GISP

View solution in original post

12 Replies
ChrisDonohue__GISP
MVP Frequent Contributor

There are several ways to do this.  A big constraint, though, will be if there are multiple points in the same dataset that overlap.  If they don't, the easiest way is to use "Select By Location", then reverse the selected set to come up with the ones that don't match.

Using Select By Location—Help | ArcGIS for Desktop

If there are overlapping points in the same dataset, there are other ways, but we will need to know more about how the data is related.  For example, are there unique ID's that match between both datasets.  If so, a Join By Attribute can be done to find the ones in common between both datasets.

Joining attributes in one table to another—Help | ArcGIS for Desktop

Chris Donohue, GISP

MikeHenson
Occasional Contributor

thanks Chris...

the only duplicates are those from the first set to the 2nd set.  Nothing in the 1st set is duplicated in the 1st set, and nothing in the 2nd set is duplicated in the 2nd set.  (hope it makes sense)

MKH

0 Kudos
ChrisDonohue__GISP
MVP Frequent Contributor

TheSelect By Location as mentioned above will do it.

Once caveat - this assumes the point data you have is fairly accurate / coincident - i.e. a point that matches in both datasets is not spatially in a slightly different location in each dataset.  If it varies between the two, it will be more challenging.

Chris Donohue, GISP

RebeccaStrauch__GISP
MVP Esteemed Contributor

Are the locations (x/y) the only thing that marks them as a duplicate? Or is it attributes?  As Chris mention, if attributes you could do a join on the common attribtes.   I would suggest creating a temporary field to flag those that are duplicated (based on the join), leaving those without the flag as your unique points.

if attributes join doesn't work, try the spatial join....or add the xy cords as attributes to both and use that as the attribute join.  Many ways to do the same thing...some just are a few more steps.

AbdullahAnter
Regular Contributor II

select by location and make the target layer is 2nd shape file that have 800 point

and make the source layer is the 1st shape file(500 point).

use method "are identical to the source layer feature"

then switch selection for 2nd shape file. that will be the difference points.

Notice

make sure that you are clear all selection for all layers before you make the previous steps.

the previous steps will give you the difference points if the 500 points in 1st shape file are identical (x,y) to the 2nd shape file.

0 Kudos
AbdullahAnter
Regular Contributor II

if the 1st shape file has not identical points to the 2nd shape file .so you should use spatial join. That if the closest points in the twice shape files are same.

if the closest points in the twice shape files are difference, so you should try to make attribute join with similarly field .

and do that only for similarly records and select those records. then delete that join and switch selection . you will have the difference points .

0 Kudos
DanPatterson_Retired
MVP Esteemed Contributor

have you explored Feature Compare—Help | ArcGIS for Desktop or did I miss an arcmap version number.  This is available in 10.3 and 10.4 permitting geometry and attribute comparisons.  You should see if any of the combinations are appropriate.

If you just need to compare geometry, you indicate that there are matching points... exact and similar will require a tolerance since it is difficult to do exact matches with floating point numbers (aka coordinates) if the origins of construction are not the same.  Geometry comparisons can be readily done using methods accessed through python and arcpy, should all other avenues fail.

ModyBuchbinder
Esri Regular Contributor

What about moving the problem into the sql world (since it is points only).

Use Add XY to create a coordinate field. You can then round this field to the closest 1 meter or any other value that you like.

Then concat the values into one field and use simple SQL to find the differences.

It will work very quick.

MikeHenson
Occasional Contributor

thanks everyone for the replies. I CAN tell you that the duplicate data from each file is exact.  Points were brought in from a  survey data collector (file 1).  A month later, they were brought in again (all points, file 2) so this is where the additional points came from.

0 Kudos