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 have some difficulties on network analysis,I want to run shortest path algorithm, I don't know how to use ArcGIS to reveal the shortest route between the appointed points on the map, and if it's possible, can I also use this software to record and calculate the number of the real road be taken as shortest route? thanks!

I have about 200 point to be the origins and destinations on the map, and I need the shortest route between these appointed points (200*200) and let them revealed on the map And then,record and calculate the number of the real road be taken as shortest route.

thanks a lot!

but i can only have one shortest route between two points once a time if i use the toolbar, i am wondering how can i make all the shortest routes between 200 points one time? do i have to use any progamming method?

share|improve this question
    
You need to have Network Analyst extension to have the full power of ArcGIS Network Analysis. Basic routing can also be done using Utility Network toolbar. –  ujjwalesri Aug 1 '11 at 10:34
add comment

2 Answers 2

There are two choose for you on NAServer. The NAServer is a MapServer object extension that can be used to perform network analysis in a stateless environment using ArcGIS Server.

For publishing a network analysis service you can check out this tutorial...

1.Closest Facility Analysis: displays the best routes between incidents and facilities.

Closest Facility Analysis

2.OD Cost Matrix: (origin–destination (OD) cost matrix) a table that contains the network impedance from each origin to each destination.

od1

od2

and showing them in a map as openlayers, you can use ArcGIS Server Service.

1.Go to Home > Network(NAServer) > Route
2.Select Solve Route
3.Define your points and barriers
4.Get format as JSON
5.Read json features and add them to vector layer.

example NAServer is here. beside this you have to define stops as following structure:

{ 
"features"  : [
{
  "geometry" : {"x" : -122.4079, "y" : 37.78356},
  "attributes" : {"Name" : "From", "RouteName" : "Route A"}
},
{
  "geometry" : {"x" : -122.404, "y" : 37.782},
  "attributes" : {"Name" : "To", "RouteName" : "Route A"}
}
]
}

you can check out this example:

you should know this the link is so long:

_http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Network/USA/NAServer/Route/solve?stops={+%0D%0A%22features%22++%3A+[%0D%0A{%0D%0A++%22geometry%22+%3A+{%22x%22+%3A+-122.4079%2C+%22y%22+%3A+37.78356}%2C%0D%0A++%22attributes%22+%3A+{%22Name%22+%3A+%22From%22%2C+%22RouteName%22+%3A+%22Route+A%22}%0D%0A}%2C%0D%0A{%0D%0A++%22geometry%22+%3A+{%22x%22+%3A+-122.404%2C+%22y%22+%3A+37.782}%2C%0D%0A++%22attributes%22+%3A+{%22Name%22+%3A+%22To%22%2C+%22RouteName%22+%3A+%22Route+A%22}%0D%0A}%0D%0A]%0D%0A}%0D%0A&barriers=&polylineBarriers=&polygonBarriers=&outSR=4326&ignoreInvalidLocations=true&accumulateAttributeNames=&impedanceAttributeName=Time&restrictionAttributeNames=OneWay%2CTurnRestriction%2CAvoid+passenger+ferries%2CNon-routeable+segments&attributeParameterValues=&restrictUTurns=esriNFSBAllowBacktrack&useHierarchy=true&returnDirections=true&returnRoutes=true&returnStops=false&returnBarriers=false&returnPolylineBarriers=false&returnPolygonBarriers=false&directionsLanguage=en-US&directionsStyleName=NA+Desktop&outputLines=esriNAOutputLineTrueShape&findBestSequence=false&preserveFirstStop=true&preserveLastStop=true&useTimeWindows=true&startTime=1227663551096&outputGeometryPrecision=&outputGeometryPrecisionUnits=esriUnknownUnits&directionsTimeAttributeName=Time&directionsLengthUnits=esriNAUMiles&f=html

i hope it helps you...

share|improve this answer
add comment

You need to use OD Cost Matrix tool of the Network Analyst extension. It calculates 200*200 lines follwing the shortest path, but I do not know how to show them on the map nor how to calculate the number of the real road be taken as shortest route.

share|improve this answer
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.