Skip to main content

Hello,

I have been looking for ways to convert multi-point geometries to lines but havent been 100% successful so far. Given is a data set consisting of multi-point geometries identified by a unique key and various attributes.

Its a straightforward matter when the sequence of points forms a linear shape:
Deaggregate the multi-point geometries and feed the single points to a line builder which groups the lines by the unique key.

 

However it is not so straightforward when the points form an arc.
In these cases the line builder creates shapes resembling spider webs rather than arcs.
I tried various ways to sort the points spatially (e.g. with the spatial sorter) to better set up the line builder but so far without much success.

Can you think of other ways to deal with this kind of case?

 

Kind regards
Ricky

 

Can you share some example geometry?


Hello,

here it comes, a sample shapefile containing the geometries that were described.

 

Thanks for looking into it and kind regards
Ricky


It sounds like there’s something going wrong with how you are grouping. With your example data if i deaggregate a multipoint that looks like this

 then use a linebuilder, i get no spiderwebs

 


Hmm, interesting - will it be just as fine with this second data sample?
 

Thanks for checking so far

Ricky


I see the issue there. I may have an example somewhere of using the NeighborFinder and some python to sort the points.


Would you like to share your approach when time allows it? :)


The process I’ve used before involves using networkx in python. I don’t have access to this currently so not sure it will work for this data.

This is the outcome of a pure FME approach, it’s not perfect because the distance between points in the multipoint geometries varies quite a bit

 


Thinking about network x got me thinking about the shortest path finder and it does a good job

Cost Type is By Straight Line Distance, Reorder From-To Line = Advanced, Reorder Points = All Points


oh wow - thanks so much, I´m gonna check it out!