[mapguide-users] Shortest path between two points

Maksim Sestic max at geoinova.com
Sat Dec 15 06:37:39 EST 2007


Hi Dhirendra,

Please visit  http://code.google.com/p/tf-net/ Topology Framework .NET 
project hosted on Google Code. It's free, licensed under LGPL, source
included. Be sure to get the latest core and reader/writer binaries (version
1.x). When you unpack the binaries ZIP archive you wiill need Topology.dll
and Topology.IO.MapGuide.dll libraries (for both MGOS and MGE). Also take a
look at included CHM API help file, there are two namespaces of interest:

- Topology.IO.MapGuide which contains reader/writer for MG/JTS geometry
definitions
- Topology.Graph which contains necessary algorithms and generic classes for
building graphs

Several shorthest path algos are supported, depending on your experience,
expectations and graph topology itself:
- DijkstraShortestPathAlgorithm Generic Class
- UndirectedDijkstraShortestPathAlgorithm Generic Class 
- BellmanFordShortestPathAlgorithm Generic Class 
- DagShortestPathAlgorithm Generic Class 

I recommend you to start with AdjacencyGraph generic class first. Generic
nature of implemented classes make it a bit hard for grasping at first, but
things get much easier once you're used to them :-) You will also need .NET
2.0 and higher to be able to use generics. I.e. creating an instance of
bidirectional AdjacencyGraph goes like:

Dim graph As New AdjacencyGraph(Of Point, Edge(Of Point))(True)

where Point type represents a graph node (vertex), while Edge type
represents a graph edge. In this example Edge generic class may implement
only types inherited from Point type (whatever the Point type is, it's not
necessarily geometric point, think of it as of an abstract network node).

Regards,
Maksim Sestic



Dhirendra Kumar wrote:
> 
> Hi All,
> 
> I want to find out shortest path between two given points, Please anyone
> give me idea about it. Thankyou in Advance.
> 
> 
> Regards,
> 
>  Dhirendra Kumar 
> 

-- 
View this message in context: http://www.nabble.com/Shortest-path-between-two-points-tp11188505s16610p14349999.html
Sent from the MapGuide Users mailing list archive at Nabble.com.



More information about the mapguide-users mailing list