5

I'm working on creating a map where I'm trying to create a line between one point and all other points using FME. The points represent the center of a building on a campus, and I'm trying to create a line between one building and all other buildings on campus. For example, if the buildings on campus include Buildings A, B, and C, I'm trying to create a line between Buildings A and B, Buildings B and C, and Buildings A and C.

I'm interested in creating this information so that I can identify the shortest possible route between two buildings based on a pedestrian network layer that runs throughout campus. After creating this information, my idea is to use the lines between all possible buildings as input into the From-To port in the ShortestPathFinder tool. However, I'm open to other suggestions on how to approach this problem/suggestions on other tools to use.

Also, it might be worth noting that there are 300+ buildings on the campus, so I'm uncertain whether the methodology that I devised above would not work since there would be so many possible building combinations.

My preliminary FME workspace is below.

enter image description here

5

Funnily enough I did exactly the same thing, except this was for British football (soccer) teams. I wanted to figure out the shortest distance between each of them to see which team's supporters had the longest journey.

I wrote it up as a blog post.

There are only 20 teams rather than 300+ so you might find it takes a bit longer for you to run. But I don't why it shouldn't work.

Basically what I do is merge the features onto each other, so that each object has a list of the other objects. Then I just explode the list and turn it into a line feature:

enter image description here

The output I then send into the ShortestPathFinder, using Ordnance Survey roads data as the network.

So, download the workspace from that blog article (or a direct link here) and give it a try. Just run it first (the data is included) and see if it's producing what you want.

At best you might then be able to just feed your building centre points directly into the workspace. At worst you'll need to do a small bit of editing, but I don't see much work involved.

NB: If there are any football fans interested, in the 2015 season, Aston Villa fans had the shortest accumulated journey over the season. Newcastle fans had the longest. The output looked like this:

enter image description here

  • 1
    This was one of my favourite blog post of yours. – Fezter Jan 30 '18 at 23:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.