Skip to main content
Solved

Distance between points with same IDs

  • January 21, 2013
  • 3 replies
  • 141 views

Forum|alt.badge.img
Hi All,

 

         After a long summer holiday (sorry to those in the northern latitudes:-) my brain has apparently turned to mush, think too much sun and beer! Anyways...

 

 

I have two point shapefiles, their is a common field between them (ID). I am trying to establish if the common points between the shapefiles have the same geom in  the two layers. (with a tolerance of 1m)

 

 

I have buffered one layer by 1m and then used a spatialfilter (CONTAINS) to establish if the points are within 1m of each other. I now want the distance between the points that dont satsfy the CONTAINS condition. ie >1m away. These come out of the SpatialFilter FAILED port. 

 

 

I have tried using a Neighborfinder to get the distance  if these FAILED records but i cant specify which IDs to compare. (ie the groupby clause = ID) doesnt work for me. 

 

 

Does anyone else have an idea on how to establish the distance between these points that have failed the CONTAINS test. 

 

 

 

 

Thanks Steve

 

 

 

Best answer by david_r

Unless I misunderstand something, you could probably drop the bufferer and replace everything with a NeighborFinder, group by ID, and with large maximum value. The output features will contain the attribute "_distance" (see the help) that you could then filter with a Tester.

 

 

Hope this helps.

 

 

David
View original
Did this help you find an answer to your question?
This post is closed to further activity.
It may be a question with a best answer, an implemented idea, or just a post needing no comment.
If you have a follow-up or related question, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

david_r
Celebrity
  • Best Answer
  • January 21, 2013
Unless I misunderstand something, you could probably drop the bufferer and replace everything with a NeighborFinder, group by ID, and with large maximum value. The output features will contain the attribute "_distance" (see the help) that you could then filter with a Tester.

 

 

Hope this helps.

 

 

David

  • January 21, 2013

I would try David's solution (using a NeighborFinder directly and Group By ID), but the PointConnector might also be worth trying, using the ID again as the break attribute. The sorting won't matter in this case.

 

After this, you can calculate the length of the lines and do some expression evaluating. You might even get the middle of the connecting line to replace the two 'identical' points geometry (if the line is shorter than 1 meter).

Forum|alt.badge.img
  • Author
  • January 24, 2013

Thanks for your input Dave and Sandman,

 

 

i went with the Neighbourhood finder and the test filter. 

 

 

Cheers for your input and help

 

 

Steve


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings