Skip to content

Instantly share code, notes, and snippets.

@jarvist
Created May 27, 2013 13:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jarvist/5657022 to your computer and use it in GitHub Desktop.
Save jarvist/5657022 to your computer and use it in GitHub Desktop.
What are the distances to the furthest reaches of Draenen?
# Requires: https://github.com/speleo3/inkscape-speleo/blob/master/extensions/survex.py by Thomas Holder
from survex import Survex3D
#This is the Oxford Draenen data:
# http://www.oucc.org.uk/DraenenSurvey/
mig=Survex3D('OD2.3d')
for destination in 'wiggly2.1','luck3.19','rifleman.1','pow.44':
print "OD2 entrance.20 <> ",destination
length, path = mig.shortestpath('entrance.20',destination)
print "Shortest Path (m):", length / 100.0
print "Shots in Path: ", len(path)
#print "PATH: ",path
print
OD2 entrance.20 <> wiggly2.1
Shortest Path (m): 2507.04096711
Shots in Path: 210
OD2 entrance.20 <> luck3.19
Shortest Path (m): 5325.59207671
Shots in Path: 494
OD2 entrance.20 <> rifleman.1
Shortest Path (m): 3375.00161578
Shots in Path: 281
OD2 entrance.20 <> pow.44
Shortest Path (m): 4702.71359757
Shots in Path: 445
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment