mirror of
https://expo.survex.com/repositories/expoweb/.git/
synced 2025-12-09 15:24:31 +00:00
[svn r7108] DL: fettled to be able to find cavestats binary in this fucked-up directory structure
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
import sys,csv,os,cStringIO
|
import sys,csv,os,cStringIO
|
||||||
|
|
||||||
|
CS_BINARY = "/home/expo/build/survex-1.1-mark/src/cavestats"
|
||||||
N = 30
|
N = 30
|
||||||
|
|
||||||
# Utility functions
|
# Utility functions
|
||||||
@@ -44,7 +45,7 @@ def parse_csvfile():
|
|||||||
caveslist = []
|
caveslist = []
|
||||||
print "Calculating SMK-system extent... ",
|
print "Calculating SMK-system extent... ",
|
||||||
os.popen("cavern dataset/loser/smk-system -o noinfo/smk-system.3d")
|
os.popen("cavern dataset/loser/smk-system -o noinfo/smk-system.3d")
|
||||||
l,d,w = map(float, chomp(os.popen("cavestats noinfo/smk-system -c ").read()).split("\t"))
|
l,d,w = map(float, chomp(os.popen(CS_BINARY + " noinfo/smk-system -c ").read()).split("\t"))
|
||||||
caveslist.append(["", l,d,w, {"Name" : "<i>Schwarzmooskogelhöhlensystem</i>", "Autogen file" : ""}])
|
caveslist.append(["", l,d,w, {"Name" : "<i>Schwarzmooskogelhöhlensystem</i>", "Autogen file" : ""}])
|
||||||
print "done\nParsing CSV file"
|
print "done\nParsing CSV file"
|
||||||
cavetabfile = file("noinfo/CAVETAB2.CSV")
|
cavetabfile = file("noinfo/CAVETAB2.CSV")
|
||||||
@@ -68,7 +69,7 @@ def parse_csvfile():
|
|||||||
if((cave["Area"]=="1626") and (number not in ['LA11', 'LA12'])): continue
|
if((cave["Area"]=="1626") and (number not in ['LA11', 'LA12'])): continue
|
||||||
|
|
||||||
prefix = dataset_prefix(number.lower())
|
prefix = dataset_prefix(number.lower())
|
||||||
stats = os.popen("cavestats noinfo/all -cs " + prefix).read()
|
stats = os.popen(CS_BINARY + " noinfo/all -cs " + prefix).read()
|
||||||
if(stats.find("No") != -1):
|
if(stats.find("No") != -1):
|
||||||
continue # don't trust the rather erratic data in the table
|
continue # don't trust the rather erratic data in the table
|
||||||
#if(cave["Length"]): print number, "length:", cave["Length"]
|
#if(cave["Length"]): print number, "length:", cave["Length"]
|
||||||
|
|||||||
Reference in New Issue
Block a user