This project has moved. For the latest updates, please go here.

route problem

Topics: SharpMap Project
Aug 8, 2009 at 2:39 AM

Hi every body,

I want to find the route or path between two points with sharpmap.

can I get a help.

Aug 8, 2009 at 1:04 PM
Edited Aug 8, 2009 at 1:54 PM

Hi firash, you will need to look at routing algorithms such as "A Star", there are implementations in a few libraries such as QuickGraph and NGenerics.

You will need to convert your data into a directed network,

Find a way to snap the start and end points on the map to a node/edge end in the network

run the algorithm

hth jd

It may also be worth taking a look at NetTopologySuite as Diego Guidi was working in this area with it

Aug 13, 2009 at 9:54 AM

You can easily do it with a database such as postgreSQL/PostGIS and pgrouting. There are some built in functions in there for  A*, shooting star etc; which you can use with normal SQL queries. Data can be converted to directed network in the DB itself. Then it can be rendered using sharpmap.


Aug 13, 2009 at 2:30 PM

try SpatiaLite! Build a network via commandline, then do a select-statement, the recordset contains in the first row the route including the wkt; the other rows contain the parts of the route.