I think if you want the closest line to each point, the points need to be your base and the lines the candidate
I agree with @egomm.
It may be easier to understand if you think of the "Matched" port as "MatchedBase", meaning that it's the BASE feature that will exit if it's found a CANDIDATE within the maximum distance.
I think if you want the closest line to each point, the points need to be your base and the lines the candidate
If i do so, the match output is the points as my input data
If i do so, the match output is the points as my input data
If you want to get the lines there are a couple of options you could consider
1) extract the line geometry as an attribute, merge the attributes with in the NeighborFinder and rebuild your line from the merged attribute
2) each point should have a line id of the line closest to it, use this line id as a supplier in a featuremerger with the requestor being the original lines
The best approach will depend on which attributes you wish to keep from each line/point
I agree with @egomm.
It may be easier to understand if you think of the "Matched" port as "MatchedBase", meaning that it's the BASE feature that will exit if it's found a CANDIDATE within the maximum distance.
I want closest lines to exits as matched. The lines that are the closest to points. If I set the point as base, the matched output is points themselves.
If you want to get the lines there are a couple of options you could consider
1) extract the line geometry as an attribute, merge the attributes with in the NeighborFinder and rebuild your line from the merged attribute
2) each point should have a line id of the line closest to it, use this line id as a supplier in a featuremerger with the requestor being the original lines
The best approach will depend on which attributes you wish to keep from each line/point
Thanks a lot for the options. I have used the geometry extractor before neigborfinder. And the output points have the lines geometry as you describe. However, I could not fine the way to rebuild the lines from the merged feature. Is there any transformer you could think of?
Thanks a lot for the options. I have used the geometry extractor before neigborfinder. And the output points have the lines geometry as you describe. However, I could not fine the way to rebuild the lines from the merged feature. Is there any transformer you could think of?
@jugoslaviaa you want to use a geometryreplacer to rebuild the lines from the geometry attribute
@jugoslaviaa you want to use a geometryreplacer to rebuild the lines from the geometry attribute
Works! Thank you very much!