Skip to main content
Solved

Finding related points.


juliarozema
Contributor
Forum|alt.badge.img+7

We have some Annotation points all in one feature class. We are looking to find duplicated annotation text that are close to each other.

We used the NeighbourFinder and attached the attributes from the neighbouring annotation to the base annotation. This allows us to see that, for example, record OD=1 is close to OD=2. Then a Test Filter is used to check if the TextString is the same on the base annotation when compared to the neighbour.

 

From the results of the TestFilter we have a list of annotations that can be reviewed as it looks like they are close to each other and have the same text string (which may not be needed).

 

So, for an example, say there are 100 annotation points that come out of the TestFilter. For each of these points, one of the other points in that selection of 100 points is the point it is related to/neighbouring. So, we don't actually need a list of all 100 points, just 1 of the points from each relationship, resulting in 50 points.

 

Currently we are missing a relationship_id that relates the two points. WIth this, I can then use the Matcher or DuplicateFinder to reduce the selection of 100 points down to 1 instance of each relationship, equaling 50 points. I know that some transformers produce a relationship-type-id, but I am not sure what to use for this scenario. As mentioned, we are currently using the NeighbourFinder. Is there a way to have a relationship_id also added in the output from the NeighbourhoodFinder? Or is there a different transformer that can be used?

 

Thank you for your time and thoughts.

 

Using FME 2022.2

Best answer by DanAtSafe

Hi @juliarozema​ You could make the group with a Counter, based on the text string and _distance (from the NeighborFinder). To get just one of the pair, use a Sampler and group by those same two attributes - or group by the new Group ID (from the Counter).

View original
Did this help you find an answer to your question?

5 replies

dustin
Influencer
Forum|alt.badge.img+30
  • Influencer
  • January 10, 2024

If you use the Group By processing in the NeighborFinder set to the annotation text string, it will only return neighbors with matching annotation. I think this will help in your workflow.


juliarozema
Contributor
Forum|alt.badge.img+7
  • Author
  • Contributor
  • January 11, 2024
dustin wrote:

If you use the Group By processing in the NeighborFinder set to the annotation text string, it will only return neighbors with matching annotation. I think this will help in your workflow.

Thank-you @dustin​ .

I see what you're saying. I will give that a try. And confirm tomorrow.


juliarozema
Contributor
Forum|alt.badge.img+7
  • Author
  • Contributor
  • January 12, 2024
juliarozema wrote:

Thank-you @dustin​ .

I see what you're saying. I will give that a try. And confirm tomorrow.

Hey @dustin​, this isn't producing the results I am expecting. I still have both records that are neighbours in the output. I would like to end up with only one instance of each pair. Is there a way for an ID value to be assigned to each related group? Meaning, Object_ID = 1 is a closest neighbour to Object_ID = 73. Both records will have a new field with an ID value that shows they are neighbours to each other. Then I can pick which one I want to keep in the output.


DanAtSafe
Safer
Forum|alt.badge.img+18
  • Safer
  • Best Answer
  • January 12, 2024

Hi @juliarozema​ You could make the group with a Counter, based on the text string and _distance (from the NeighborFinder). To get just one of the pair, use a Sampler and group by those same two attributes - or group by the new Group ID (from the Counter).


juliarozema
Contributor
Forum|alt.badge.img+7
  • Author
  • Contributor
  • January 18, 2024
DanAtSafe wrote:

Hi @juliarozema​ You could make the group with a Counter, based on the text string and _distance (from the NeighborFinder). To get just one of the pair, use a Sampler and group by those same two attributes - or group by the new Group ID (from the Counter).

Thank you so much @danatsafe​. This was just want was needed.


Reply


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