Question

Search Point near start and end of a line ?


Hello,

I have a pipe table (Polylines) and a manhole table (Points). I would like to spatially join the point located at each pipe start, to link the attributes of each entity.

 

I manage without problem to find the point for the beginning of the line thanks to a NeighborFinder, but impossible for the end point.

 

How to do ? Possible ? Thank you in advance.


8 replies

Badge +2

@jbboschung​ can you reverse the inputs on the NeighborFinder so the points are the base and the pies the candidates?

imageIn fact, I am looking to take the altitude of the 'Start' point and the altitude of the 'End' point, of the two points linked to the line, which are stored in the 2nd table.

 

excuse me for my English

Badge +2

@jbboschung​ can you share a small example of the data?

image652 / 5 000

 

I will try to explain a little better.

 

I have a city sewer system. Approximately 2500 sewer section (line) and 2200 inspection chambers (points).

At each start and end of the section, I have an inspection chamber.

I seek to spatially link the chamber which is at the beginning of the section (starting point) and the one which is at the end of the section (end point). With the elevations stored in my point table (chamber), I will be able to calculate the slope of the section, with the length.

 

By taking the 'NeighborFinder' transformer, and setting the section (line) as 'Base' and the chambers (points) as 'Candidate', I find the starting chamber without any problem. But impossible to find the arrival chamber.

 

The question is: how to configure the 'NeighborFinder' transformer to take the coordinates of the end point instead of the start point.

 

Userlevel 4

What I usually do is to use two CoordinateExtractors + VertexCreators to get the start and end vertices of each line as points, then feed those into the NeighborFinder to find the closest manholes.

What I usually do is to use two CoordinateExtractors + VertexCreators to get the start and end vertices of each line as points, then feed those into the NeighborFinder to find the closest manholes.

Hello,

Thanks for the feedback, yes I finally found it this afternoon.

I already had these transformers, but it didn't work.

I have since found that it is also necessary to memorize the geometry of the line (GeometryExtractor), then proceed to the extraction of the coordinates of the start/endpoints and to create the latter (with the option 'Replace with point') to do the spatial research (NeighborFinder), and at the end I put back the geometry of the line (GeometryReplace) and everything works perfectly.

 

imageimage

Userlevel 2
Badge +17

Hello,

Thanks for the feedback, yes I finally found it this afternoon.

I already had these transformers, but it didn't work.

I have since found that it is also necessary to memorize the geometry of the line (GeometryExtractor), then proceed to the extraction of the coordinates of the start/endpoints and to create the latter (with the option 'Replace with point') to do the spatial research (NeighborFinder), and at the end I put back the geometry of the line (GeometryReplace) and everything works perfectly.

 

imageimage

you can also use the VertexRemover transformer to transform line to start/end points.

This screenshot is a workflow example, for your reference.

merge-attributes-of-closest-point

Hello,

Thanks for the feedback, yes I finally found it this afternoon.

I already had these transformers, but it didn't work.

I have since found that it is also necessary to memorize the geometry of the line (GeometryExtractor), then proceed to the extraction of the coordinates of the start/endpoints and to create the latter (with the option 'Replace with point') to do the spatial research (NeighborFinder), and at the end I put back the geometry of the line (GeometryReplace) and everything works perfectly.

 

imageimage

Hello, thank you for this tip which I did not know. I will test this.

Reply