span8

span4

span8

span4

- Home /
- *FME Desktop /

I used the ShortestPathFinder to generate the shortest path from a start point through a set of > 1,000 intermediate points to an end point. Therefore, the "From-To" line that is used as input to the ShortestPathFinder connects all of these points/stops. Only the intermediate points on the From-To line were set to be re-ordered and not the Start and End point. The ShortestPathFinder did output a "Path" line. Now, I simply want to figure out the sequence/order of these intermediate stops on the shortest path.

I have allowed for U-turns in the shortest path and there are many segments in the path that overlap one another as U-turns are allowed. Therefore, two points/stops at a very close geographic location can be at completely different orders/sequences along the shortest path from one another.

I tried several approaches already:

1) Use Chopper to convert all the vertices of the ShortestPath line to points, then Counter to order the points in a 'Count' attribute. This gives me the proper order/sequence of points along the shortest path. Now, I need to get the information from the attributes of the From-To line vertices (which are my actual stops along the route) - such as address or zip codes- onto these ordered points. For that I used both Spatial Filter/Spatial Relator to relate the shortest path points to the From-To line vertices but that did not carry over all the values in the 'Count' attribute and hence did not work.

2) Use measures. Use MeasureGenerator on the shortest path, then Point on Line Overlayer to spatially overlay the points of the From-To line to the shortest path and Measure Extractor to extract the measures of these points on the shortest path, and Sorter to sort by the _point_measure attribute. However, I am not sure whether this would work, as two points at very close geographic locations might get assigned the same or similar measure but be at completely different orders/sequences along the shortest path since U-turns are allowed. In this case they should be assigned completely different measures but sine they are very close spatially they would get assigned the same or a very close measure.

It's surprising why the ShortestPathFinder does not output the re-ordered sequence of stops on the From-To line as well in addition to the shortest path.

Any help would be greatly appreciated.

Comment

*Therefore, two points/stops at the exact same or a very close geographic location can be at completely different orders/sequences along the shortest path from one another.*

I'm not sure i can understand how the shortest path can visit the same geographic location twice at different points. Surely the shortest path would always visit two points in the same location at the same time?

Yes, that's correct- the shortest path would always visit two points at the same location at the same time. I should rephrase my statement- its visiting the same geographic location (containing only 1 stop) at different times- not sure why.

This is an example of its traversal with x,y coordinates. It is going from south to north in the screenshot below, until it gets to node #132, after which it goes back south to the previous point again, and then goes north again. It has already visited the same node in step 130. Not sure why this would happen.

Two points at very close (but not the same) geographic locations to one another can, however, be at different orders/sequences along the shortest path due to U-turns.

shortestpath.png
(11.1 kB)

Seems like a good suggestion (adding the sequenced points as output).

Please create a new Idea for this as it looks like a useful addition.

© 2019 Safe Software Inc | Legal

- Anonymous
- Sign in
- Create
- New Question
- New Article
- New Idea
- Spaces
- 3D (and BIM)
- Attribute Handling
- Automations (FME Server)
- CAD
- Cloud
- Coordinate Systems
- Custom Transformers
- Database
- Dynamic Workspaces
- FME Cloud API
- FME Cloud Administration
- FME Cloud Getting Started
- FME Desktop 3rd Party Integrations
- FME Desktop Administration
- FME Desktop Administration & Configuration
- FME Desktop Development
- FME Desktop Getting Started
- FME Desktop Installation
- FME Desktop Licensing
- FME Desktop Plug-In SDK
- FME Desktop Workbench Scripting
- FME Server 3rd Party Integrations
- FME Server Administration
- FME Server Administration & Configuration
- FME Server Development
- FME Server Getting Started
- FME Server Installation
- FME Server Licensing
- Fanouts
- Ideas FME Cloud
- Ideas FME Desktop: Data Inspector
- Ideas FME Desktop: Formats & Systems
- Ideas FME Desktop: Transformers
- Ideas FME Desktop: Workbench
- Ideas FME Server
- Indoor Mapping
- KML
- Lists
- Performance Tuning
- Point Cloud
- Published Parameters
- Raster
- Real-Time
- Running Multiple Workspaces
- Tabular
- Troubleshooting Techniques
- Vector / GIS
- Web
- Workflow Design
- XML / GML
- Zip Files
- *FME Desktop
- *FME Server
- *FME Cloud
- *Other
- Explore
- Topics
- Questions
- Articles
- Ideas
- Users
- Badges