Skip to main content
Question

I have a line & point shapefiles, I want to create a one-to-many spatial join so that the line would get all the point attribute information which are present in its surroundings, i tried some methods but no proper result, can someone please suggest


bhavyagandhi
Contributor
Forum|alt.badge.img+1
I have a line & point shapefiles, I want to create a one-to-many spatial join so that the line would get all the point attribute information which are present in its surroundings, i tried some methods but no proper result, can someone please suggest ?

2 replies

redgeographics
Celebrity
Forum|alt.badge.img+47

You can use a Bufferer to create a buffer with a specific width around the line, then a SpatialFilter to find all points within that buffer.


maayke
Contributor
Forum|alt.badge.img+6
  • Contributor
  • March 5, 2021

I would first take a look at the NeighborFinder transformer. This might be exactly what you need.

Your lines are your Base features, your points are your Candidate Features. Make sure to enable 'Generate list' on the attributes you need. After the NeighborFinder you can use a variety of transformers to put the information in an attribute (e.g. ListConcatenator).

NeighborFinder 

@Hans van der Maarel​'s suggestion might also work, but for that method I would use a SpatialRelator rather than a SpatialFilter. You could indeed use a Bufferer to create a polygon representing the 'surroundings' you're mentioning. Then use the SpatialRelator, with the lines as the Requestor and the points as the Supplier. Make sure to enable 'Generate list' on the attributes you need. After the SpatialRelator you can use a variety of transformers to put the information in an attribute (e.g. ListConcatenator). After that, you can use e.g. a FeatureMerger to merge the information back onto the line.

SpatialRelator 

Both methods require dedicated care/verification, since the definition of 'being in its surroundings' might vary, there might be overlap between 'surroundings' of different line features etc.


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