Skip to main content
I am trying to calculate angle and distance to a point feature class that share a common attribute. Naturally, the neighborfinder transformer comes to mind. 

 

 

However, it only generates it to the closest candidate. I need to find the distance and direction to all points that have a common attribute I specify.

 

 

Is there a way to do this?

 

 

Second question, is there a way to generate a line from a single point in question to points that also share a common attribute.  Essentially, there would be a central point with individual lines radiating out to points that are within a certain distance as specified by the attribute that has already been processed in.

 

 

Sounds a little confusing but if anyone can help I would be happy to clarify further.

 

 

Thanks

 

 

 

Matthew Brucker
Hi Matthew,   1) If you specify 'Close Candidate List Name' parameter of the NeighborFinder, each output feature from MATCHED port will have a list attribute containing information about all candidate features within the specified distance, the information includes distance, angle, (x, y) etc.   2) When you need to create lines between a question point and every neighbor points after the NeighborFinder processing, applying ListExploder and 2DPointAdder would be a simple solution.   I put a sample workspace here:

 

https://www.dropbox.com/s/xhwmzrvvcyqsdnt/130425NeighborFinderSample.fmw Hope this helps.   Takashi  
Hey Takashi,

 

 

I ended up "figuring out" a solution granted yours is a bit simpler than mine. 

 

 

I did a PointonAreaOverlayer then exposed the list. This brought the number of features up 500 (from 100). I then did a neighborfinder back to the original 100 using the 500 (exposed from the list) and using a GroupBy to help keep it organized.

 

 

Essentially I belive we got the same result, which is one of the awesome things about FME. 

 

 

However, I am still stumped on how to generate the lines. I tried the point connector but it is not the result I want. I think I'm close but missing something.

 

 

https://www.dropbox.com/s/xae7777r4g6a0eg/Radius%20Example.jpg

 

This dropbox link shows an example of what I'm trying to accomplish. 

 

 

You've been a huge help so far and I do appreciate it a lot.

 

 

Regards,

 

 

 

Matt
How about the 2DPointAdder instead of the PointConnector? For a 2-point line it should work just fine.
Hi Matthew,

 

 

When using PointConnecter, think about the order of input features and 'Connection Break Attributes' parameter. If you need to create lines between center of a circular area and each point inside of the area, the next sample might help you.

 

https://www.dropbox.com/s/69dyigkjpo8wy2w/130426RadiationalLines.fmw

 

 

Takashi  
Would you be able to email me at matthew@geoetl.com... I want to send you the workbench and files and don't know how to Private Message you here.

 

 

I must be missing one tiny piece because I'm getting very close. I've got a dropbox link with the workbench and the mockup shapefile that I'll send over to you.
To connect a point to a surrounding set of points.

 

 

Central point coordinate extracted need to be merged unconditionally to all other points. Call it ie Cx, Cy.

 

Extract coordinates from all other points named ie TargetX,TargetY

 

Now all u need is a 2d pointreplacer on Cx,Cy followed by a 2Dpointadders on TargetX,TargetY.

 

 

Thats all.

Reply