[Therion] Get shortest route
Thomas Holder
thomas at thomas-holder.de
Sun Nov 28 18:49:27 CET 2021
Hi Benedikt and Olly,
I implemented such functionality (not the visualization) a while ago
as a little exercise in Python. If you know how to run a Python
script, then you might find this useful.
First download this file:
https://raw.githubusercontent.com/speleo3/inkscape-speleo/master/extensions/survex.py
Then run this code (replace the file name and station names):
filename = "smk-arge.3d"
station_from = "p87"
station_to = "115.commando.105"
from survex import Survex3D
survey = Survex3D(filename)
length, p = survey.shortestpath(station_from, station_to)
upwards = sum(max(0, t.z - f.z) for (f, t) in zip(p[:-1], p[1:]))
downwards = sum(min(0, t.z - f.z) for (f, t) in zip(p[:-1], p[1:]))
print("Shortest route length:", length / 100, "m")
print("Cumulated height going upwards:", upwards / 100, "m")
print("Cumulated depth going downwards:", downwards / 100, "m")
Cheers,
Thomas
On Sat, Nov 27, 2021 at 8:25 PM Olly Betts <olly at survex.com> wrote:
>
> On Fri, Nov 26, 2021 at 05:10:18PM +0100, Benedikt Hallinger wrote:
> > i would want to get some advanced statistics regarding lengths in a very big cave (130km/Hirlatz).
> >
> > Basicly i want to supply two stations and get the following data for the shortest path:
> > - length of shots
> > - cumulated height for shots going upwards
> > - cumulative depth for shots going downwards
> > - optionally it would be cool to be able to somehow visualize the route in aven/loch, or in a therion map output
> >
> > Is this possible already?
>
> I don't think so.
>
> Someone was working on it, but I guess it didn't come to anything as
> that was 2016:
>
> https://lists.survex.com/pipermail/survex/2016-October/002082.html
>
> Cheers,
> Olly
> _______________________________________________
> Therion mailing list
> Therion at speleo.sk
> https://mailman.speleo.sk/listinfo/therion
More information about the Therion
mailing list