Tell me more ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

A friend and I (who more frequently than I posts on this board) are creating a walking network and we have run in to a snag. We would like to attribute a cost evaluator to our network dataset using a self determined safety metric. We have the equation set up so that all we need to do is divide a field value based on the length of a route to get our "safety value". We just need to know in the cost field how to write the vb script or other evaluator so that Cost Value=[FieldValue]/"total length of individual route". Each route length will be different once each analysis is run, but we have a length value for each line segment, so we know there should be a way that adds up these pieces for the route for a total route length that can be divided by our field value. It seems like it should be a simple script line or something to put in the field evaluator box. Any suggestions?

Thanks

share|improve this question
I was able to get this to work, but I lack the necessary programming skills to get it 100% correct. I calculated my value by multiplying the length of each segment by a designated number, where 1 was most desirable. Theoretically, when divided by the length, this would produce a value that, the closer to 1 would indicate a more desirable route. In the field evaluator value dialogue box, I was able divide my calculated value by the length of the segment. I was hoping that they would sum each field first and then divide the two values. – eric Nov 23 '10 at 5:51
However, when I ran the route analysis, the values were dividing each time, and summing all of the individually divided values at the end. I would like each field (my value and the length) to sum first, then divide the two summed fields to produce a value. What would be the VB sript or other relevant code to put in the Prelogic or VB function dialogue box to have them run in this order instead of the order they currently are? – eric Nov 23 '10 at 5:51
Is this still an issue at ArcGIS 10.1? If so, could you perhaps post your VB/Python code so far, please? – PolyGeo Jan 23 at 11:03

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.