Skip to main content
Solved

Drive time zones with multiple starting points

  • November 30, 2018
  • 4 replies
  • 107 views

magnus
Participant
Forum|alt.badge.img+2

Hi

I am trying to create drive time zones for a data set with 2-5 starting points, much like image #2 here, http://desktop.arcgis.com/en/arcmap/latest/extensions/network-analyst/what-is-network-analyst-.htm. I read https://knowledge.safe.com/articles/30048/creating-time-and-distance-isolines-using-the-netw.html and I managed to create drive time zones for a single starting point:

Each zone is 3 minutes of travel. However, I am looking for a solution for using multiple starting points. The idea is to see what happens to drive time when adding or removing points (clinics, in my case). Any suggestions on how to achieve that?

Currently, the workspace looks like this:

Regards,

Magnnus

Best answer by mark2atsafe

Hi Magnnus

The NetworkCostCalculator only works with one source feature per group. So the way to get multiple outputs is to send all of the source points to the NetworkCostCalculator, but with a separate set of network lines for each.

Say you have 5 point features. Add a Counter to the point features to number them 0,1,2,3,4. Then add a Cloner to the line network. Create 5 clones. Set the Copy Number Attribute to be the same attribute name as the Counter created.

Then you can pass them into the NetworkCostCalculator and set Group By to be that attribute. It's inefficient because you are creating multiple copies of the network, but it's the only way I see to do it.

So, that will create you multiple sets of results.

However, I'm guessing that you want to see the effect of having X starting points on the same network. I don't see a way to do that with just the NetworkCostCalculator. I think you will have to create multiple results (as described above) and then post-process them.

For example, use a Chopper transformer on the NetworkCostCalculator output to create points (set Max Vertices = 1). The Z value of each point will be the distance. So look for matching points and keep the ones with the lowest Z value. To do that I'd use the CoordinateExtractor to get x,y,z; a Sorter to sort in Z value order (low to high); then a DuplicateFilter to filter out duplicate x,y values.

Then you have the results as if there were one network with multiple sources, and can send it to the SurfaceModeller as required.

For example, here's what I get when I use the City of Vancouver roads/firehalls:

 

Here's the workspace thatcreated this. I hope it's what you are looking for.

View original
Did this help you find an answer to your question?

4 replies

mark2atsafe
Safer
Forum|alt.badge.img+44
  • Safer
  • Best Answer
  • December 5, 2018

Hi Magnnus

The NetworkCostCalculator only works with one source feature per group. So the way to get multiple outputs is to send all of the source points to the NetworkCostCalculator, but with a separate set of network lines for each.

Say you have 5 point features. Add a Counter to the point features to number them 0,1,2,3,4. Then add a Cloner to the line network. Create 5 clones. Set the Copy Number Attribute to be the same attribute name as the Counter created.

Then you can pass them into the NetworkCostCalculator and set Group By to be that attribute. It's inefficient because you are creating multiple copies of the network, but it's the only way I see to do it.

So, that will create you multiple sets of results.

However, I'm guessing that you want to see the effect of having X starting points on the same network. I don't see a way to do that with just the NetworkCostCalculator. I think you will have to create multiple results (as described above) and then post-process them.

For example, use a Chopper transformer on the NetworkCostCalculator output to create points (set Max Vertices = 1). The Z value of each point will be the distance. So look for matching points and keep the ones with the lowest Z value. To do that I'd use the CoordinateExtractor to get x,y,z; a Sorter to sort in Z value order (low to high); then a DuplicateFilter to filter out duplicate x,y values.

Then you have the results as if there were one network with multiple sources, and can send it to the SurfaceModeller as required.

For example, here's what I get when I use the City of Vancouver roads/firehalls:

 

Here's the workspace thatcreated this. I hope it's what you are looking for.


magnus
Participant
Forum|alt.badge.img+2
  • Author
  • Participant
  • December 7, 2018
mark2atsafe wrote:

Hi Magnnus

The NetworkCostCalculator only works with one source feature per group. So the way to get multiple outputs is to send all of the source points to the NetworkCostCalculator, but with a separate set of network lines for each.

Say you have 5 point features. Add a Counter to the point features to number them 0,1,2,3,4. Then add a Cloner to the line network. Create 5 clones. Set the Copy Number Attribute to be the same attribute name as the Counter created.

Then you can pass them into the NetworkCostCalculator and set Group By to be that attribute. It's inefficient because you are creating multiple copies of the network, but it's the only way I see to do it.

So, that will create you multiple sets of results.

However, I'm guessing that you want to see the effect of having X starting points on the same network. I don't see a way to do that with just the NetworkCostCalculator. I think you will have to create multiple results (as described above) and then post-process them.

For example, use a Chopper transformer on the NetworkCostCalculator output to create points (set Max Vertices = 1). The Z value of each point will be the distance. So look for matching points and keep the ones with the lowest Z value. To do that I'd use the CoordinateExtractor to get x,y,z; a Sorter to sort in Z value order (low to high); then a DuplicateFilter to filter out duplicate x,y values.

Then you have the results as if there were one network with multiple sources, and can send it to the SurfaceModeller as required.

For example, here's what I get when I use the City of Vancouver roads/firehalls:

 

Here's the workspace thatcreated this. I hope it's what you are looking for.

Thank you, this is exactly what I was looking for.


magnus
Participant
Forum|alt.badge.img+2
  • Author
  • Participant
  • December 9, 2018

OK, maybe this solution is not optimal in my case, after all. It works fine for smaller areas, but when I run it with the whole data set (the western part of Sweden), it seems to be very time consuming. After some 72 hours, 1 out of 5 starting points has been processed. I´m using FME 2017.1, perhaps it is faster in later versions of FME.


mark2atsafe
Safer
Forum|alt.badge.img+44
  • Safer
  • December 15, 2018
magnus wrote:

OK, maybe this solution is not optimal in my case, after all. It works fine for smaller areas, but when I run it with the whole data set (the western part of Sweden), it seems to be very time consuming. After some 72 hours, 1 out of 5 starting points has been processed. I´m using FME 2017.1, perhaps it is faster in later versions of FME.

Hi @magnus

I think what you'll perhaps need to do is parallel process this in some way. I would suggest doing it as a batch. So... create one workspace that reads the network and a single dataset of points. Then create a second workspace. In that second workspace add a File/Directory/Path reader and a WorkspaceRunner transformer. The Directory/Path reader reads a list of point files to process, and passes each of them to the WorkspaceRunner. The WorkspaceRunner calls the first workspace, passing the name of the point file to process. That way you are still creating multiple copies of the network, but they aren't all taking place at the same time. Then... you can post-process the data as described. You might even be able to put it all into the same workspace using FeatureReader and FeatureWriter transformers, or just write it all out and use a new workspace to do the post-process part.

Hope this helps

Mark


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