Skip to main content
Hi All,

 

         I'm currently trying to execute a procedure in FME which I thought was quite simple. I have two files:

 

 

(1) a map of points (with coordinates) which I exported from my GIS tool, each point has its own coordinates and specific attributes attached to it, and 

 

(2) a map of polylines which I also exported from my GIS tool, each polyline has its own coordinates and specific attributes attached to it.

 

 

When I overlay the two maps, the points spatially intersect with the lines. I would like to create a buffer around the points (15 m or so) and have the attributes of all the lines within that buffer merged with the attributes of that specific point.

 

 

Ideally, I would have one row  for each point and an array of all the line segments that are within that buffer, or a row for each line segment with its corresponding point. 

 

 

I tried using PointOnLineOverlayer, and FeatureMerger and ListExploder but I never receive all the information I would like. Any thoughts?

 

 

Thanks!

 

Hi,

 

 

I think the SpatialRelator transformer can do what you need.

 

Send the lines to BASE port, send the polygons (i.e. buffered points) to CANDIDATE port of the SpatialRelator, and specify INTERSECTS to "Tests to Perform" parameter.

 

Then, it appends list attribute (named "_relationships" by default) which contain the attributes of spatially related CANDIDATE geometries to BASE lines, and outputs them.

 

If send the polygons to BASE and send lines to CANDIDATE, it will output the polygons with the attributes of related lines.

 

Takashi
yes, spatialrelator is the one u need.

 

relationships list holds the data of all the related candidates.

 

 

If u  would explode it u get number of sigma( related canidates x base)

 

 

U can use ListConcatenator to create attributes consisting of the elements relevant to your query. As u cant put the list in a attribute.

 

 


btw line on area can do it too

 

 

SpatialRelator gives u more control of spatial querying tho.
Hi All, thanks for your responses! I'm trying the Spatial Relator right now but it's not outputing the "relationship" attributes for me. I would like to have the output as an excel file so I've added the "Writer" with:

 

 

* Static Schema

 

* When prompted to add a new feature type, I click on "Yes"

 

* OK

 

* Right click on the Writer and select "Copy Attributes From Transformer"

 

* Select the "Spatial Relator" transformer

 

* When I click on the arrow to show all the attributes, everything is green except for the "_relationships" 

 

 

Even when I make the connection mannually, (add an arrow between each attribute from the output of the 'Spatial Relator' and the 'Writer'), it still outputs nothing in the excel file. 

 

 

However, when I add an inspector, I can see the values there!

 

 

Any thoughts?
_relationships is a list attribute, cannot be written into any dataset directly. But you can see its values with Data Inspector or Universal Viewer.

 

 

To write values of list elements into the destination dataset, you have to transform them to non-list attributes beforehand.

 

Some transformers in "Lists" category will help you; e.g. ListConcatenator, ListExploder and so on.

 

Appropriate transformer should be selected depending on your purpose and the actual situation. See related documentations:

 

FMEpedia:  List Attributes

 

FME Transformers > Category: Lists

 

 > ListConcatenator

 

 > ListExploder

 

etc.

Reply