Re: [mapguide-users] Shortest path between two points

2007-12-15 Thread Techswami

can you guys share code here so we can get detail idea how you used it, i
think this will be great to have routing in MGOS , please provide code and
some instrctions that would be great help

tony


Jorge Rubio wrote:
 
 Hi Dhirendra
 
 years ago we wrote some code for shortest path using MG4. We used Dijkstra
 procedures.
 I will try to describe briefly what we did.
 
 We generated network topology using Autocad Map.
 We wrote lisp routines to store topology info on a data base.
 We wrote lisp routines to get nodes coordinates and perform distance
 calculations between them in order to fill Dijkstra arrays (and store them
 on a data base).
 We wrote routines to get closest nodes from starting and ending adresses.
 We uses Dijkstra algorithm to calculate shortest path.
 Once we got the nodes ordered form startng to ending points, we queried
 the
 topology to get the liks between the nodes.
 Then we displayed them on MG.
 
 You can find Dijkstra algorithm in internet written in many languajes like
 c, c++ an so on.
 
 
 
 
 
 2007/6/18, Dhirendra Kumar [EMAIL PROTECTED]:


 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-tf3944291s16610.html#a11188505
 Sent from the MapGuide Users mailing list archive at Nabble.com.

 ___
 mapguide-users mailing list
 mapguide-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapguide-users

 
 
 
 -- 
 Lic. Jorge Rubio
 
 ___
 mapguide-users mailing list
 mapguide-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapguide-users
 
 

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

___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users


Re: [mapguide-users] Shortest path between two points

2007-12-15 Thread Maksim Sestic

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-tp11188505s16610p1434.html
Sent from the MapGuide Users mailing list archive at Nabble.com.

___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users


RE: [mapguide-users] Shortest path between two points

2007-12-14 Thread ruivilanova

I all,

I understood the way to find the shortest path between two points and I also
have the  http://en.giswiki.net/wiki/Dijkstra's_algorithm#PHP php code of
dijkstra algorithm , but I don't know how to fill that array of nodes. 

Any ideias of how to get the nodes from a linestring feature source?

Thanks in advance,


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

___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users


Re: [mapguide-users] Shortest path between two points

2007-12-14 Thread Kenneth, GEOGRAF A/S

You can do a select on the featuresource to get all data for the resource.
You can choose only to select the geometry column.
When you itterate over the records, you can extract the geometry from 
the record.

This involves converting AGF data to GML (or whatever you prefer).
The basis for query to a featuresource, and extraction of geometry is 
documented with an example in the developer guide (PDF version at least).

If you get stuck on the examples, please ask again.

Regards, Kenneth, GEOGRAF A/S



ruivilanova skrev:

I all,

I understood the way to find the shortest path between two points and I also
have the  http://en.giswiki.net/wiki/Dijkstra's_algorithm#PHP php code of
dijkstra algorithm , but I don't know how to fill that array of nodes. 


Any ideias of how to get the nodes from a linestring feature source?

Thanks in advance,


Rui
  

___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users