mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2025-04-03 01:11:59 +01:00
preparing to clean up LoadPos
This commit is contained in:
parent
dfb7cc88cd
commit
c9657aeb8c
@ -505,16 +505,18 @@ def prospecting_image(request, name):
|
|||||||
img.save(response, "PNG")
|
img.save(response, "PNG")
|
||||||
return response
|
return response
|
||||||
|
|
||||||
STATIONS = {}
|
# Not used.
|
||||||
poslineregex = re.compile("^\(\s*([+-]?\d*\.\d*),\s*([+-]?\d*\.\d*),\s*([+-]?\d*\.\d*)\s*\)\s*([^\s]+)$")
|
# All imported using parsers.survex.LoadPos() now
|
||||||
def LoadPos():
|
# STATIONS = {}
|
||||||
call([settings.CAVERN, "--output=%s/all.3d" % settings.SURVEX_DATA, "%s/all.svx" % settings.SURVEX_DATA])
|
# poslineregex = re.compile("^\(\s*([+-]?\d*\.\d*),\s*([+-]?\d*\.\d*),\s*([+-]?\d*\.\d*)\s*\)\s*([^\s]+)$")
|
||||||
call([settings.THREEDTOPOS, '%sall.3d' % settings.SURVEX_DATA], cwd = settings.SURVEX_DATA)
|
# def LoadPos():
|
||||||
posfile = open("%sall.pos" % settings.SURVEX_DATA)
|
# call([settings.CAVERN, "--output=%s/all.3d" % settings.SURVEX_DATA, "%s/all.svx" % settings.SURVEX_DATA])
|
||||||
posfile.readline()#Drop header
|
# call([settings.THREEDTOPOS, '%sall.3d' % settings.SURVEX_DATA], cwd = settings.SURVEX_DATA)
|
||||||
for line in posfile.readlines():
|
# posfile = open("%sall.pos" % settings.SURVEX_DATA)
|
||||||
r = poslineregex.match(line)
|
# posfile.readline()#Drop header
|
||||||
if r:
|
# for line in posfile.readlines():
|
||||||
x, y, z, name = r.groups()
|
# r = poslineregex.match(line)
|
||||||
STATIONS[name] = (x, y, z)
|
# if r:
|
||||||
|
# x, y, z, name = r.groups()
|
||||||
|
# STATIONS[name] = (x, y, z)
|
||||||
|
|
||||||
|
@ -227,7 +227,7 @@ def RecursiveLoad(survexblock, survexfile, fin, textlines):
|
|||||||
# print(insp+'QM notes %s' % qm_notes)
|
# print(insp+'QM notes %s' % qm_notes)
|
||||||
|
|
||||||
# If the QM isn't resolved (has a resolving station) then load it
|
# If the QM isn't resolved (has a resolving station) then load it
|
||||||
if not qm_resolve_section or qm_resolve_section is not '-' or qm_resolve_section is not 'None':
|
if not qm_resolve_section or qm_resolve_section != '-' or qm_resolve_section is not 'None':
|
||||||
from_section = models.SurvexBlock.objects.filter(name=qm_from_section)
|
from_section = models.SurvexBlock.objects.filter(name=qm_from_section)
|
||||||
# If we can find a section (survex note chunck, named)
|
# If we can find a section (survex note chunck, named)
|
||||||
if len(from_section) > 0:
|
if len(from_section) > 0:
|
||||||
@ -480,6 +480,8 @@ def LoadPos():
|
|||||||
all survey point positions. Then lookup each position by name to see if we have it in the database
|
all survey point positions. Then lookup each position by name to see if we have it in the database
|
||||||
and if we do, then save the x/y/z coordinates.
|
and if we do, then save the x/y/z coordinates.
|
||||||
If we don't have it in the database, print an error message and discard it.
|
If we don't have it in the database, print an error message and discard it.
|
||||||
|
This is ONLY ever used for entrance and fixedpts locations for the prospecting map:
|
||||||
|
about 600 points out of 32,000.
|
||||||
"""
|
"""
|
||||||
topdata = settings.SURVEX_DATA + settings.SURVEX_TOPNAME
|
topdata = settings.SURVEX_DATA + settings.SURVEX_TOPNAME
|
||||||
print((' - Generating a list of Pos from %s.svx and then loading...' % (topdata)))
|
print((' - Generating a list of Pos from %s.svx and then loading...' % (topdata)))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user