Shortest path from all points to all other points in my dataset
I am trying to find shortest distance from all points in red to all other points in green using network connecting all of them.
The point feature has only types (A,B). Is it possible to have the short path finder to search the path always staring from point A to pint B.
Page 1 / 1
Create a topologically correct network from your lines, and input it to the Network port of the ShortestpathFinder.
Create lines from every point of Type A to every point of Type B, and input them to the From-To port.
The results should give you the paths from every point of Type A to every point of Type B.
See the attached workspace for a working example.
@geomancer
Thank you very much indeed.
I ran the attached workspace. As shown on the image I got 63 paths. although I have only 9 destinations.
I was expecting to get only short path 9.
The workspace above returns a line between every point A and every point B. As there are 7 points A and 9 points B, 7*9=63 lines are returned.
If you want to know what point A is nearest to a point B, you can get that information by adding (and setting) a Sorter and a Sampler.
Note: when there are several points A at the same distance from a point B, only one point A is shown in the results.
Thanks,
Is there is anything preventing workspace output to be written to (gdb or CAD).
I have tried but get no feature written.
That shouldn't be a problem.
Are any features entering the export file in FME?
Do you get any error messages?
At the log file 0 feature is written.
Does FME show there are features entering the writer?
Yes, 9 features, but when adding them to arcmap no records found and it exit directly.
I tried your workspace and the same workspace with my own data.
Thaks for your follow, appreciated!
@geomancer ..Thanks
So it may be a problem with how the features are wrtten to the geodatabase.
What happens when you write the resulting lines to a shapefile? Can that be opened in ArcMap?
I am out of office.I will try later..but what about your machine, do you have any issues.
The other workspace you send early about adjacent attributes works fine.
From my workspaces in this question I can export to DWG without any problems, the DWG file contains the features I exported.
For the geodatabase I exported to 'ESRI Geodatabase (File Geodb Open API)’ and set the Geometry type to geodb_polyline. When I open this geodatabase-folder with FME Data Inspector (I don't use ArcMap) I see all the features I exported with their attributes.
So no problems on my side.
@geomancer
Thank you very much.you input is remarkable.
Although the workspace shows features are written inside gdb. Unfortunately ,nothing is written when exploring data at arcmap.,however in cad and shape file no problem.every thing is there.
I have created a small polygons with an ID.
Can l limit the shortpath to searched within each polygon.
BR.
@geomancer
I am certain it is possible. What have you tried?
I have given all polygons unique ID. Joining all points (A,B) have their unique polygon ID.
I stuck with setting the approprate parameters to limit the search condition.
@geomancer
Sir
Any thoughts or ideas will help.
It took me some time to think this through.
I think you just need to remove the lines (after intersecting) that cross a polygon boundary, and you can limit the From-To lines to points within the same polygon.