Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I'm totally new to stackexchange and i'm in this beautiful informative place for one problem. I'm a .net programmer and i need to write a program that reads a shapefile and performs routing operation. I'm looking for an open source solution. Is there any idea?

Thanks in advance Best Regards

share|improve this question
    
Does the shapefile already have from-nodes and to-nodes assigned to it? –  Kirk Kuykendall Aug 4 '11 at 15:35
    
unfortunately not. Is it possible to make it in ArcGIS? –  Saka Royban Aug 5 '11 at 13:46
    
Are the ends of the polylines snapped to each other? If so you could calculate FNODEID and TNODEID fields based on concatenation of x and y of the polyline's from point and to point respectively. You should also consider an ID for the polyline itself, since the FID could change as a result of editing. Once you have the necessary IDs, you can handle it as a graph theory problem. See resources. –  Kirk Kuykendall Aug 5 '11 at 14:17
    
yes. How to create these fields in ArcGIs or any other software? Does it need programming? Could u explain more, Plz? –  Saka Royban Aug 5 '11 at 18:52
add comment

3 Answers

up vote 1 down vote accepted

If the open source requirement isn't too strict (you already seem to accept Arcgis as part of the solution), you can also look at our RW Net solution (www.routeware.dk). It is a .NET component, which will import SHP files and let you do routing calculations. No need for adding fnode/tnode fields, since the component handles that internally.

share|improve this answer
    
Thanks a lot. Yes, i have arcgis but i can't pay anymore. It Sounds Route Net 2.43 free version performs the job. Also i found TF.Net useful i.e reading shapefile and calculates shortest path, as described in documentation –  Saka Royban Aug 6 '11 at 11:25
add comment

I would start by looking at this implementation in C# along with the DotSpatial libraries maybe?

share|improve this answer
    
It sounds i have to make graphs out of shapefile myself. Am i right? I was looking for a more direct way, not to handle this dirty things. –  Saka Royban Aug 5 '11 at 13:55
add comment

Small advice: use A* algorithm instead of Dijkstra, with a decent heuristic you'll get much better performance.

http://stackoverflow.com/questions/1332466/how-does-dijkstras-algorithm-and-a-star-compare

share|improve this answer
    
You are extremely right :) –  Ragi Yaser Burhum Aug 5 '11 at 6:26
    
Thanks. but is there any implementation for that in .net using shapefile? –  Saka Royban Aug 5 '11 at 13:52
    
You should treat reading shapefiles and A* algorithm routing as two separate things. A* is usually implemented in a generic way so it can be reused for different purposes. As for reading shapefiles, take a look at SharpMap. –  Igor Brejc Aug 5 '11 at 14:16
    
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.