Skip to main content

Hi,

I have used the aggregator after a lineOnAreaOverlayer to merge the lines with the same Id back together but now te beginvertex from te line (the red) is in the middle of te line (when you start editing in ArcMap or QGIS. Is there a way to set this right in FME again because the lines are giving problems.

Thx!

Nathalie

Hi,

Seems attachment is missed out


Just to set things straight, the Aggregator won't merge (join) lines, it will create a multi-part geometry out of the line segments that were intersected by the LineOnAreaOverlayer. Could this possibly be the issue here?

Could you perhaps tell us a bit about what you're trying to accomplish, that way we might give you some pointers.


I have to determine the area where the line is located in as an attribute, for this i use the lineOneAreaOverlayer, but the lines are split by the boundaries of those areas. But in my results i need to merge those lines and maintain the attributes off the part of the line with the longest length. So i use first the linOnAreaOverlayer, lengthcalculator, Aggregator, ListSorter and Listindexer.


zcartografiewerkmappenaalstnathalie2016fmeaggegato.png


An easier way might be to

  • Before the LineOnAreaOverlayer, insert a GeometryExtractor to save the geometry as an attribute
  • After the LengthCalculator, insert a GeometryReplacer to "restore" the geometry from that attribute.

That way you can skip the ListSorter and ListIndexer and you won't have to deal with reconstructing the multipart geometries.


For finding relationships without splitting the linework, I'd suggest using either the SpatialFilter or SpatialRelator. If there are multiple areas a line might pass through, the use the SpatialRelator because it allows you to create a list of matches.

Other methods: 1) As David suggests - save the geometry beforehand with the GeometryExtractor so that you can replace the split version with the original 2) Put a FeatureMerger down to merge the information from the split features back on to the origianl


Thx, it has fixed the problem off the multip-part geometry but now i have other problems because he creates duplicates. Now i have to figure out why and howe to solve this :-)


Reply