[svn r6985] More prospecting guide work. Also I could have sworn I added in coords for 174-6 but I must have forgotten to commit, oops.

This commit is contained in:
dave
2005-06-25 00:17:41 +02:00
parent 89fde4cf48
commit 68bf1b5f17
10 changed files with 1277 additions and 848 deletions

View File

@@ -20,7 +20,7 @@ h3 {text-align: center}
<p>This page lists the lengths, depths and horizontal extents of those caves on <p>This page lists the lengths, depths and horizontal extents of those caves on
the plateau for which we have survey centerline data. At present, that's only the plateau for which we have survey centerline data. At present, that's only
79 out of 250 or so, but the missing ones are mostly very small and obscure; 81 out of 250 or so, but the missing ones are mostly very small and obscure;
the notable exceptions are some caves explored by other groups (35, LA25, the notable exceptions are some caves explored by other groups (35, LA25,
BS17), and CUCC caves 71, 76, 92, 96 and 97. Of the latter 76 (by far the most BS17), and CUCC caves 71, 76, 92, 96 and 97. Of the latter 76 (by far the most
significant of these) is in the process of being re-explored, and the figures significant of these) is in the process of being re-explored, and the figures
@@ -54,7 +54,9 @@ caves</a></p>
<tr><td>88</td><td class="name"><a href="noinfo/smkridge/88.htm">L&auml;rchenschacht</a></td><td>1775.0</td><td>211.0</td><td>400.7</td></tr> <tr><td>88</td><td class="name"><a href="noinfo/smkridge/88.htm">L&auml;rchenschacht</a></td><td>1775.0</td><td>211.0</td><td>400.7</td></tr>
<tr><td>90</td><td class="name"><a href="plateau/90/90.html">Br&auml;u Schacht 90</a></td><td>13.0</td><td>12.6</td><td>3.4</td></tr> <tr><td>90</td><td class="name"><a href="plateau/90/90.html">Br&auml;u Schacht 90</a></td><td>13.0</td><td>12.6</td><td>3.4</td></tr>
<tr><td>91</td><td class="name"><a href="plateau/91/91.html">Br&auml;u Schacht 91</a></td><td>15.0</td><td>14.5</td><td>3.9</td></tr> <tr><td>91</td><td class="name"><a href="plateau/91/91.html">Br&auml;u Schacht 91</a></td><td>15.0</td><td>14.5</td><td>3.9</td></tr>
<tr><td>105</td><td class="name"><a href="plateau/105/105.html">Plateau Schacht 105</a></td><td>40.0</td><td>38.8</td><td>4.5</td></tr>
<tr><td>107</td><td class="name"><a href="plateau/107.htm">Gemsh&ouml;hle</a></td><td>593.1</td><td>283.4</td><td>76.5</td></tr> <tr><td>107</td><td class="name"><a href="plateau/107.htm">Gemsh&ouml;hle</a></td><td>593.1</td><td>283.4</td><td>76.5</td></tr>
<tr><td>108</td><td class="name"><a href="plateau/108/108.html">Schwa-H&ouml;hle 108</a></td><td>27.0</td><td>26.2</td><td>6.5</td></tr>
<tr><td>113</td><td class="name"><a href="smkridge/113.htm">Sonnenstrahlh&ouml;hle</a></td><td>520.9</td><td>205.6</td><td>90.9</td></tr> <tr><td>113</td><td class="name"><a href="smkridge/113.htm">Sonnenstrahlh&ouml;hle</a></td><td>520.9</td><td>205.6</td><td>90.9</td></tr>
<tr><td>115</td><td class="name"><a href="smkridge/115.htm">Schnellzugh&ouml;hle</a></td><td>4720.2</td><td>738.6</td><td>1047.2</td></tr> <tr><td>115</td><td class="name"><a href="smkridge/115.htm">Schnellzugh&ouml;hle</a></td><td>4720.2</td><td>738.6</td><td>1047.2</td></tr>
<tr><td>116</td><td class="name"><a href="noinfo/smkridge/116.htm">Kleine Eish&ouml;hle</a></td><td>221.9</td><td>39.5</td><td>60.6</td></tr> <tr><td>116</td><td class="name"><a href="noinfo/smkridge/116.htm">Kleine Eish&ouml;hle</a></td><td>221.9</td><td>39.5</td><td>60.6</td></tr>
@@ -76,7 +78,7 @@ caves</a></p>
<tr><td>172</td><td class="name"><a href="plateau/172.htm">Plateau H&ouml;hle 90/2</a></td><td>20.9</td><td>2.4</td><td>19.4</td></tr> <tr><td>172</td><td class="name"><a href="plateau/172.htm">Plateau H&ouml;hle 90/2</a></td><td>20.9</td><td>2.4</td><td>19.4</td></tr>
<tr><td>182</td><td class="name"><a href="plateau/182/182.html">Bovistundpuderzuckerh&ouml;hle</a></td><td>1176.7</td><td>292.3</td><td>301.9</td></tr> <tr><td>182</td><td class="name"><a href="plateau/182/182.html">Bovistundpuderzuckerh&ouml;hle</a></td><td>1176.7</td><td>292.3</td><td>301.9</td></tr>
<tr><td>183</td><td class="name"><a href="plateau/183.htm">Elchfalle</a></td><td>106.1</td><td>70.0</td><td>19.1</td></tr> <tr><td>183</td><td class="name"><a href="plateau/183.htm">Elchfalle</a></td><td>106.1</td><td>70.0</td><td>19.1</td></tr>
<tr><td>185</td><td class="name"><a href="smkridge/185/185.html">Zweijahreentstehungsh&ouml;hle</a></td><td>94.7</td><td>63.5</td><td>20.1</td></tr> <tr><td>185</td><td class="name"><a href="smkridge/185.htm">Zweijahreentstehungsh&ouml;hle</a></td><td>94.7</td><td>63.5</td><td>20.1</td></tr>
<tr><td>193</td><td class="name"><a href="smkridge/193.htm">Schwa Schacht 193</a></td><td>20.3</td><td>9.5</td><td>8.4</td></tr> <tr><td>193</td><td class="name"><a href="smkridge/193.htm">Schwa Schacht 193</a></td><td>20.3</td><td>9.5</td><td>8.4</td></tr>
<tr><td>195</td><td class="name"><a href="smkridge/195.htm">Schwa Schacht 195</a></td><td>44.2</td><td>37.3</td><td>7.5</td></tr> <tr><td>195</td><td class="name"><a href="smkridge/195.htm">Schwa Schacht 195</a></td><td>44.2</td><td>37.3</td><td>7.5</td></tr>
<tr><td>196</td><td class="name"><a href="smkridge/196.htm">Schwa H&ouml;hle 196</a></td><td>27.2</td><td>13.4</td><td>14.6</td></tr> <tr><td>196</td><td class="name"><a href="smkridge/196.htm">Schwa H&ouml;hle 196</a></td><td>27.2</td><td>13.4</td><td>14.6</td></tr>
@@ -89,7 +91,7 @@ caves</a></p>
<tr><td>206</td><td class="name"><a href="noinfo/smkridge/206.html">7-Eingangsh&ouml;hle</a></td><td>54.0</td><td>16.2</td><td>43.1</td></tr> <tr><td>206</td><td class="name"><a href="noinfo/smkridge/206.html">7-Eingangsh&ouml;hle</a></td><td>54.0</td><td>16.2</td><td>43.1</td></tr>
<tr><td>207</td><td class="name"><a href="plateau/207/207.html">Plumpskloh&ouml;hle</a></td><td>8.3</td><td>1.2</td><td>7.0</td></tr> <tr><td>207</td><td class="name"><a href="plateau/207/207.html">Plumpskloh&ouml;hle</a></td><td>8.3</td><td>1.2</td><td>7.0</td></tr>
<tr><td>208</td><td class="name"><a href="plateau/208/208.html">Quallenh&ouml;hle</a></td><td>15.6</td><td>9.7</td><td>6.4</td></tr> <tr><td>208</td><td class="name"><a href="plateau/208/208.html">Quallenh&ouml;hle</a></td><td>15.6</td><td>9.7</td><td>6.4</td></tr>
<tr><td>209</td><td class="name"><a href="smkridge/209/209.html">Schistock-Absturzschacht</a></td><td>16.5</td><td>16.0</td><td>3.8</td></tr> <tr><td>209</td><td class="name"><a href="smkridge/209.htm">Schistock-Absturzschacht</a></td><td>16.5</td><td>16.0</td><td>3.8</td></tr>
<tr><td>215</td><td class="name"><a href="smkridge/215/215.html">Rufverbindungsh&ouml;hle</a></td><td>48.7</td><td>10.8</td><td>21.9</td></tr> <tr><td>215</td><td class="name"><a href="smkridge/215/215.html">Rufverbindungsh&ouml;hle</a></td><td>48.7</td><td>10.8</td><td>21.9</td></tr>
<tr><td>216</td><td class="name"><a href="smkridge/216.html">Nichts 50</a></td><td>104.9</td><td>27.0</td><td>59.1</td></tr> <tr><td>216</td><td class="name"><a href="smkridge/216.html">Nichts 50</a></td><td>104.9</td><td>27.0</td><td>59.1</td></tr>
<tr><td>220</td><td class="name"><a href="smkridge/220.html">Kennedy Alternative</a></td><td>8.3</td><td>5.5</td><td>6.3</td></tr> <tr><td>220</td><td class="name"><a href="smkridge/220.html">Kennedy Alternative</a></td><td>8.3</td><td>5.5</td><td>6.3</td></tr>
@@ -152,7 +154,7 @@ caves</a></p>
<tr><td>158</td><td class="name"><a href="smkridge/158.htm">Donner und Blitzen H&ouml;hle</a></td><td>255.3</td><td>118.0</td><td>47.7</td></tr> <tr><td>158</td><td class="name"><a href="smkridge/158.htm">Donner und Blitzen H&ouml;hle</a></td><td>255.3</td><td>118.0</td><td>47.7</td></tr>
<tr><td>2003-02</td><td class="name"><a href="smkridge/2003-02/2003-02.html">Blaudrachenschacht</a></td><td>132.8</td><td>109.2</td><td>28.2</td></tr> <tr><td>2003-02</td><td class="name"><a href="smkridge/2003-02/2003-02.html">Blaudrachenschacht</a></td><td>132.8</td><td>109.2</td><td>28.2</td></tr>
<tr><td>183</td><td class="name"><a href="plateau/183.htm">Elchfalle</a></td><td>106.1</td><td>70.0</td><td>19.1</td></tr> <tr><td>183</td><td class="name"><a href="plateau/183.htm">Elchfalle</a></td><td>106.1</td><td>70.0</td><td>19.1</td></tr>
<tr><td>185</td><td class="name"><a href="smkridge/185/185.html">Zweijahreentstehungsh&ouml;hle</a></td><td>94.7</td><td>63.5</td><td>20.1</td></tr> <tr><td>185</td><td class="name"><a href="smkridge/185.htm">Zweijahreentstehungsh&ouml;hle</a></td><td>94.7</td><td>63.5</td><td>20.1</td></tr>
<tr><td>234</td><td class="name"><a href="smkridge/234/234.html">Hauchh&ouml;hle</a></td><td>618.7</td><td>61.1</td><td>126.6</td></tr> <tr><td>234</td><td class="name"><a href="smkridge/234/234.html">Hauchh&ouml;hle</a></td><td>618.7</td><td>61.1</td><td>126.6</td></tr>
<tr><td>202</td><td class="name"><a href="noinfo/smkridge/202.html">Dominoschacht</a></td><td>69.2</td><td>51.7</td><td>25.7</td></tr> <tr><td>202</td><td class="name"><a href="noinfo/smkridge/202.html">Dominoschacht</a></td><td>69.2</td><td>51.7</td><td>25.7</td></tr>
<tr><td>2003-10</td><td class="name"><a href="smkridge/2003-10/2003-10.html">D&uuml;nne Faulpelz H&ouml;hle</a></td><td>156.4</td><td>51.1</td><td>50.7</td></tr> <tr><td>2003-10</td><td class="name"><a href="smkridge/2003-10/2003-10.html">D&uuml;nne Faulpelz H&ouml;hle</a></td><td>156.4</td><td>51.1</td><td>50.7</td></tr>

File diff suppressed because one or more lines are too long

View File

@@ -34,10 +34,12 @@ def print_caveline(number, l, d, w, cave):
if cave["Autogen file"]: # single caves if cave["Autogen file"]: # single caves
dplong.write("""<td class="name"><a href="%s">%s</a></td>""" % (cave["Autogen file"], find_name(cave))) dplong.write("""<td class="name"><a href="%s">%s</a></td>""" % (cave["Autogen file"], find_name(cave)))
dplong.write("""<td>%.1f</td><td>%.1f</td><td>%.1f</td></tr>\n""" % (l,d,w)) dplong.write("""<td>%.1f</td><td>%.1f</td><td>%.1f</td></tr>\n""" % (l,d,w))
dump.write("%s\t%d\t%d\n" % (number, l, d))
else: # virtual entries for cave systems else: # virtual entries for cave systems
dplong.write("""<td class="name">%s</td>""" % find_name(cave)) dplong.write("""<td class="name">%s</td>""" % find_name(cave))
dplong.write("""<td><i>%.1f</i></td><td><i>%.1f</td><td><i>%.1f</i></td></tr>\n""" % (l,d,w)) dplong.write("""<td><i>%.1f</i></td><td><i>%.1f</td><td><i>%.1f</i></td></tr>\n""" % (l,d,w))
def parse_csvfile(): def parse_csvfile():
caveslist = [] caveslist = []
print "Calculating SMK-system extent... ", print "Calculating SMK-system extent... ",
@@ -87,6 +89,7 @@ def parse_csvfile():
caveslist = parse_csvfile() caveslist = parse_csvfile()
dplong = file("dplong.htm", "w") dplong = file("dplong.htm", "w")
dump = file("noinfo/prospecting_guide_scripts/lengths.dat", "w")
dplong.write("""<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> dplong.write("""<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html> <html>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,13 @@
#(35598.62, 83226.82, 150) 174 1d# Calculated from bearings
#(35674.46, 83378.66, 150) 175 1d# Calculated from bearings
#(35773.08, 83466.00, 150) 176 1d# Calculated from bearings
(35975.37, 83018.21, 100) 177 1d# Calculated from bearings
(35350.00, 81630.00, 50) 71 4# From Auer map
(36025.00, 82475.00, 50) 146 1c# From mystery map
(35600.00, 82050.00, 50) 35 4# From Auer map
(35650.00, 82025.00, 50) 44 4# From Auer map
(35700.00, 82150.00, 50) 75 4# From Auer map
(36200.00, 82925.00, 50) 178 1d# Calculated from bearings
(35232.64, 82910.37, 25) 181 1b# Calculated from bearings
(36175.00, 82425.00, 50) 225 2c# Guessed!

View File

@@ -0,0 +1,80 @@
31 262 26
40 5257 262
41 8088 357
76 1180 189
78 7781 327
82 364 218
88 1775 210
90 13 12
91 14 14
105 39 38
107 593 283
108 27 26
113 520 205
115 4720 738
116 221 39
131 1016 192
135 21 20
136 3431 442
138 46 42
139 20 20
143 181 124
144 2280 309
145 1108 401
147 73 11
148 91 39
152 320 145
158 255 117
161 21594 524
162 159 32
163 57 17
172 20 2
182 1176 292
183 106 70
185 94 63
193 20 9
195 44 37
196 27 13
199 86 29
201 15 15
202 69 51
203 41 35
204 9147 540
205 90 38
206 53 16
207 8 1
208 15 9
209 16 16
215 48 10
216 104 26
220 8 5
228 29 9
229 55 15
231 226 26
234 618 61
238 49 24
239 503 40
240 50 43
241 53 13
242 17 10
243 52 30
"LA11" 642 375
"LA12" 341 331
"LA34" 533 425
"2000-AA-01" 10 6
"2001-MS-01" 31 11
"2002-W-02" 22 9
"2002-01" 63 6
"2002-07" 41 34
"2002-08" 21 14
"2002-XX" 15 12
"2003-01" 25 9
"2003-02" 132 109
"2003-05" 57 46
"2003-09" 134 18
"2003-10" 156 51
"2004-11" 169 36
"2004-14" 22 13
"2004-15" 43 9
"2004-19" 79 21
"2004-20" 9 9

View File

@@ -0,0 +1,331 @@
# Script to create a slightly more useful attempt
# at a prospecting guide.
areas = ['', '1a','1b','1c','1d', '2a', '2b', '2c', '2d', '3', '4', '5', '6','7', '8a', '8b', '8c', '8d', '9', '10', '11']
areanames = {
'': 'Location unclear',
'1a': '1a &ndash; Plateau: around Top Camp',
'1b': '1b &ndash; Western plateau near 182',
'1c': '1c &ndash; Eastern plateau near 204 walk-in path',
'1d': '1d &ndash; Further plateau around 76',
'2a': '2a &ndash; Southern Schwarzmooskogel near 201 path and the Nipple',
'2b': '2b &ndash; Eish&ouml;hle area',
'2c': '2c &ndash; Kaninchenh&ouml;hle area',
'2d': '2d &ndash; Steinbr&uuml;ckenh&ouml;hle area',
'3': '3 &ndash; Br&auml;ning Alm',
'4': '4 &ndash; Kratzer valley',
'5': '5 &ndash; Schwarzmoos-Wildensee',
'6': '6 &ndash; Far plateau',
'7': '7 &ndash; Egglgrube',
'8a': '8a &ndash; Loser south face',
'8b': '8b &ndash; Loser below Dimmelwand',
'8c': '8c &ndash; Augst See',
'8d': '8d &ndash; Loser-Hochganger ridge',
'9': '9 &ndash; Gschwandt Alm',
'10': '10 &ndash; Altaussee',
'11': '11 &ndash; Augstbach',
}
areacolours = {
'1a' : '#00ffff',
'1b' : '#ff00ff',
'1c' : '#ffff00',
'1d' : '#ffffff',
'2a' : '#ff0000',
'2b' : '#00ff00',
'2c' : '#008800',
'2d' : '#ff9900',
'4' : '#0000ff',
'6' : '#000000', # doubles for surface fixed pts
'7' : '#808080'
}
cavelists={}
for a in areas: cavelists[a]=[]
def chomp(s):
if(s[-1]=="\n"): return s[:-1]
else: return s
def find_effective_number(c):
"""Determine an appropriate number to use."""
if c["Kataster Number"]:
return c["Kataster Number"]
else:
return c["Unofficial number"]
def longnumber(c, number):
"""Both numbers"""
if (c["Unofficial number"] and c["Unofficial number"] != number):
return number + " (" + c["Unofficial number"] + ")"
else:
return number
def find_location(cave):
for fixtype in ["tag point in dataset", "other point in dataset", "exact entrance in dataset (drip line/highest enclosed contour)", "GPS post SA", "GPS pre SA"]:
if(cave[fixtype]):
return positions[cave[fixtype]]
return 0
def munge_allposline(line):
x, y, z, name = re.match(r'\(([0-9.]*?),\s*([0-9.]*?),\s*([0-9.]*?)\s*\)\s*(.*)\n', line).groups()
x,y, z = map(float, [x,y,z])
return (name, x,y,z)
def find_label(cave, number):
t = longnumber(cave, number) + " "
if(cave["Name"] and cave["Unofficial Name"]): t += cave["Name"] + " (" + cave["Unofficial Name"] + ")"
elif cave["Name"]: t += cave["Name"]
else: t += cave["Unofficial Name"]
try:
n = number
if(n[-1] in string.lowercase): n = n[:-1]
except:
n = "NONE"
if(lengths.has_key(n)): t += (" %sm long %sm deep" % (lengths[n][0], lengths[n][1]))
return t
import Image, ImageDraw, ImageFont, string
myImage = Image.open("pguidemap.jpg")
myDraw = ImageDraw.Draw(myImage)
my40Image = Image.open("pguidemap_40area.jpg")
my40Draw = ImageDraw.Draw(my40Image)
my204Image = Image.open("pguidemap_204area.jpg")
my204Draw = ImageDraw.Draw(my204Image)
FONT = "/usr/X11R6/lib/X11/fonts/truetype/arial.ttf"
SIZE = 8
myFont = ImageFont.truetype(FONT, SIZE)
myDraw.setfont(myFont)
my40Draw.setfont(myFont)
my204Draw.setfont(myFont)
def mungecoord(x, y, mapcode = ""):
# Top of Zinken is 73 1201 = dataset 34542 81967
# Top of Hinter is 1073 562 = dataset 36670 83317
# image is 1417 by 2201
# FACTOR1 = 1000.0 / (36670.0-34542.0)
# FACTOR2 = (1201.0-562.0) / (83317 - 81967)
# FACTOR = (FACTOR1 + FACTOR2)/2
# The factors aren't the same as the scanned map's at a slight angle. I
# can't be bothered to fix this. Since we zero on the Hinter it makes
# very little difference for caves in the areas round 76 or 204.
# xoffset = (x - 36670)*FACTOR
# yoffset = (y - 83317)*FACTOR
# return (1073 + xoffset, 562 - yoffset)
# Parameters for big map
MAP_LEFT_GK = 34394.9
MAP_TOP_GK = 84508.6
MAP_RIGHT_GK = 37399.4
MAP_BOTTOM_GK = 80895.6
MAP_WIDTH = 1417
MAP_HEIGHT = 1704
# Parameters for zoomed smaller maps
MAP40_LEFT_GK = 36275.6
MAP40_TOP_GK = 82392.5
MAP40_RIGHT_GK = 36780.3
MAP40_BOTTOM_GK = 81601.7
MAP40_WIDTH = 714
MAP40_HEIGHT = 1119
MAP204_LEFT_GK = 36354.1
MAP204_TOP_GK = 84154.5
MAP204_RIGHT_GK = 37047.4
MAP204_BOTTOM_GK = 83399.7
MAP204_WIDTH = 972
MAP204_HEIGHT = 1068
if(mapcode == "40"):
return (x - MAP40_LEFT_GK)/(MAP40_RIGHT_GK - MAP40_LEFT_GK) * MAP40_WIDTH, MAP40_HEIGHT - (y - MAP40_BOTTOM_GK)/(MAP40_TOP_GK - MAP40_BOTTOM_GK) * MAP40_HEIGHT
elif(mapcode == "204"):
return (x - MAP204_LEFT_GK)/(MAP204_RIGHT_GK - MAP204_LEFT_GK) * MAP204_WIDTH, MAP204_HEIGHT - (y - MAP204_BOTTOM_GK)/(MAP204_TOP_GK - MAP204_BOTTOM_GK) * MAP204_HEIGHT
else:
return (x - MAP_LEFT_GK)/(MAP_RIGHT_GK - MAP_LEFT_GK) * MAP_WIDTH, MAP_HEIGHT - (y - MAP_BOTTOM_GK)/(MAP_TOP_GK - MAP_BOTTOM_GK) * MAP_HEIGHT
def plot(loctuple, number, area, label):
shortnumber = number.replace("&mdash;","")
(x,y) = mungecoord(loctuple[0], loctuple[1])
x = int(x)
y = int(y)
imagemap_areas.append( [x-4, y-SIZE/2, x+4+myDraw.textsize(shortnumber)[0], y+SIZE/2, shortnumber, label] )
myDraw.ellipse([(x-4,y-4),(x+4,y+4)], fill=areacolours[area], outline="#000000")
myDraw.rectangle([(x+4, y-SIZE/2), (x+4+myDraw.textsize(shortnumber)[0], y+SIZE/2)], fill="#ffffff")
myDraw.text((x+6,y-SIZE/2), shortnumber, fill="#000000")
(x,y) = mungecoord(loctuple[0], loctuple[1], "40")
x = int(x)
y = int(y)
imagemap40_areas.append( [x-4, y-SIZE/2, x+4+myDraw.textsize(shortnumber)[0], y+SIZE/2, shortnumber, label] )
my40Draw.ellipse([(x-4,y-4),(x+4,y+4)], fill=areacolours[area], outline="#000000")
my40Draw.rectangle([(x+4, y-SIZE/2), (x+4+myDraw.textsize(shortnumber)[0], y+SIZE/2)], fill="#ffffff")
my40Draw.text((x+6,y-SIZE/2), shortnumber, fill="#000000")
(x,y) = mungecoord(loctuple[0], loctuple[1], "204")
x = int(x)
y = int(y)
imagemap204_areas.append( [x-4, y-SIZE/2, x+4+myDraw.textsize(shortnumber)[0], y+SIZE/2, shortnumber, label] )
my204Draw.ellipse([(x-4,y-4),(x+4,y+4)], fill=areacolours[area], outline="#000000")
my204Draw.rectangle([(x+4, y-SIZE/2), (x+4+myDraw.textsize(shortnumber)[0], y+SIZE/2)], fill="#ffffff")
my204Draw.text((x+6,y-SIZE/2), shortnumber, fill="#000000")
def writeout_imagemap(data, mapname):
# Munge the list of coordinates into a proper image map.
# There is a wrinkle here: the HTML spec gives priority
# to the _first_ defined elt, so we swap the order!
n = len(data)
htmlfile.write("<map id=\"%s\" name=\"%s\">" % (mapname, mapname))
for j in xrange(n):
try:
i = data[n-j-1]
htmlfile.write("<area shape=\"rect\" coords=\"%d, %d, %d, %d\" href=\"#id%s\" title=\"%s\" />\n" % (i[0],i[1],i[2],i[3],i[4],i[5]))
except:
print "Died on", repr( data[n-j-1] )
#raise
htmlfile.write("</map>")
import csv, re, time
cavetabfile = file("../CAVETAB2.CSV")
fieldnames=chomp(cavetabfile.next()).replace('"','').split(",")
cavetab = csv.DictReader(cavetabfile, fieldnames)
positionfile = file("../all.pos")
positionfile.next()
positions = {}
print "Munging all.pos"
for stn in positionfile:
t = munge_allposline(stn)
positions[t[0]] = (t[1],t[2],t[3])
print "Done"
print "Munging lengths.dat"
lengthsfile = file("lengths.dat")
lengths = {}
for l in lengthsfile:
t = l.replace("\"","").replace("\n", "").split("\t")
lengths[t[0]] = (t[1], t[2])
print "Done"
htmlfile = file("../prospecting_guide.html", "w")
htmlfile.write("<html><head><title>Prospecting Guide</title>\n")
htmlfile.write("<style type=\"text/css\">.locn { font-size: x-small }</style></head>\n")
htmlfile.write("<body><h1>Prospecting Guide</h1>")
htmlfile.write("<p>Generated " + time.strftime("%x %X") + "</p>\n")
htmlfile.write("<p><b>Notes:</b></p><ul><li>A marking status of \"Retag\" means a tag is in place but it carries a provisional number, or in some cases an incorrect number, and needs replacing with a new tag.</li>\n<li>Kataster status codes indicate the size of a cave, its character and its exploration status, as described <a href=\"../katast.htm\">here</a>.</li><li>For more info on each cave, see the links to detailed description pages.</li></ul><p><img src=\"prospecting_guide.jpg\" usemap=\"#map1\" ismap=\"ismap\" /></p><h3>Eish&ouml;hle area detail</h3><p><img src=\"prospecting_guide_40area.jpg\" usemap=\"#map40\" ismap=\"ismap\" /></p><h3>Steinbr&uuml;ckenh&ouml;hle area detail</h3><p><img src=\"prospecting_guide_204area.jpg\" usemap=\"#map204\" ismap=\"ismap\" /></p>\n")
cachednumber = ""
cachedarea = ""
cachedname = ""
imagemap_areas=[]
imagemap40_areas=[]
imagemap204_areas=[]
for cave in cavetab:
if cave["Link file"]: continue
number = find_effective_number(cave)
if(cave["Multiple entrances"] not in ["", "yes"]):
number = "&mdash;" + cachednumber + cave["Entrances"]
shortnumber = cachednumber
if not cave["Area"]: cave["Area"] = cachedarea
if not cave["Name"]: cave["Name"] = cachedname
else:
cachednumber = number
shortnumber = number
cachedname = cave["Name"] or cave["Unofficial Name"]
cachedarea = cave["Area"]
area = cave["Area"]
if area == '1626': continue
loctuple = find_location(cave)
label = find_label(cave, shortnumber)
if(cave["Multiple entrances"] == "yes"):
locn = "<td colspan=\"3\">&nbsp;</td>"
elif(loctuple):
locn = "<td>%d</td><td>%d</td><td>%d</td>" % loctuple
try:
plot(loctuple, number, area, label)
except:
plot(loctuple, number, "6", label)
else:
locn = "<td colspan=\"3\">"+ cave["Findability"] + "</td>"
try:#if(not cavelists.has_key(area)): cavelists[area]=[]
cavelists[area].append((number, cave, locn))
except:
print number, area
plot(positions["laser.0_7"], "BNase", "6", "Br&auml;uning N&auml;se laser point")
plot(positions["226-96"], "BZkn", "6", "Br&auml;uning Zinken trig point")
plot(positions["vd1"],"VD1","6", "VD1 laser point")
plot(positions["laser.kt114_96"],"HSK","6", "Hinterer Schwarzmooskogel trig point")
plot(positions["2000"],"Nipple","6", "Nipple (Wei&szlig;e Warze)")
plot(positions["3000"],"VSK","6", "Vorderer Schwarzmooskogel summit")
plot(positions["topcamp"], "TC", "6", "Top Camp")
plot(positions["laser.0_1"], "LSR1", "6", "Laser Point 0/1")
plot(positions["laser.0_5"], "LSR5", "6", "Laser Point 0/5")
for area in areas:
if area:
htmlfile.write("<h3><span style=\"background-color: %s; border: 1px solid black\">&nbsp;&nbsp;</span> %s</h3>" % (areacolours.get(area, "#ffffff"), areanames[area]))
else:
htmlfile.write("<h3>Location unclear</h3>")
htmlfile.write("<table border=\"1\">\n<tr><th>Cave Number</th><th>Name</th><th>E</th><th>N</th><th>Alt</th><th>Marking</th><th>Status</th>")
for (number, cave, locn) in cavelists[area]:
if cave["Autogen file"]:
htmlfile.write("<tr><td><a href=\"../%s\">%s</a></td><td><a id=\"id%s\">%s</a></td>" % (cave["Autogen file"], longnumber(cave, number), number.replace("&mdash;", ""), cave["Name"] or cave["Unofficial Name"]))
else:
htmlfile.write("<tr><td>%s</td><td><a id=\"id%s\">%s</a></td>" % (longnumber(cave, number), number.replace("&mdash;", ""), cave["Name"] or cave["Unofficial Name"]))
htmlfile.write(locn + "<td>%s</td><td>%s</td>" % (cave["Marking"], cave["Kat Status Code"]))
if(cave["Findability"] != "Surveyed" and cave["Multiple entrances"] != "yes"):
htmlfile.write("<td class=\"locn\">%s %s</td>" % (cave["Location"], cave["Bearings"]))
htmlfile.write("</tr>\n")
htmlfile.write("</table>\n")
fakedpositions = file("fakedpositions.dat")
for p in fakedpositions:
try:
(x,y,d,name, area) = re.match(r'\(([0-9.]*?),\t([0-9.]*?),\t([0-9.]*?)\)\t(.*)\t(.*)#', chomp(p)).groups()
except:
print "Couldn't understand" + repr(chomp(p))
continue
x,y,d = map(float, (x,y,d))
x,y,d = map(round, (x,y,d))
lo = mungecoord(x-d,y+d)
hi = mungecoord(x+d,y-d)
foo = mungecoord(x-d, y)
myDraw.ellipse([lo,hi], outline="#000000")
myDraw.ellipse([lo[0]+1, lo[1]+1,hi[0]-1, hi[1]-1], outline=areacolours[area])
myDraw.ellipse([lo[0]+2, lo[1]+2,hi[0]-2, hi[1]-2], outline=areacolours[area])
myDraw.rectangle([foo[0],foo[1]-SIZE/2, foo[0] + myDraw.textsize(name)[0], foo[1]+SIZE/2], fill="#ffffff")
imagemap_areas.append( [foo[0],foo[1]-SIZE/2, foo[0] + myDraw.textsize(name)[0], foo[1]+SIZE/2, name, "Approx position of %s" % name] )
myDraw.text((foo[0], foo[1]-SIZE/2), name, fill="#000000")
writeout_imagemap(imagemap_areas, "map1")
writeout_imagemap(imagemap40_areas, "map40")
writeout_imagemap(imagemap204_areas, "map204")
htmlfile.write("</body></html>")
htmlfile.close()
del myDraw
del my40Draw
del my204Draw
myImage.save("../prospecting_guide.jpg", "JPEG")
my40Image.save("../prospecting_guide_40area.jpg", "JPEG")
my204Image.save("../prospecting_guide_204area.jpg", "JPEG")

Binary file not shown.

After

Width:  |  Height:  |  Size: 708 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 131 KiB