Printing Scale Problem when using POS files

From Fs_wiki

Jump to: navigation, search

Printing Scale Problem when using POS files

When I am using a POS file to supply centreline coordinates, Tunnel seems to get the scale for my survey wrong. I notice this when I try to print, and it tells me that my survey is 456950 x 808908 m in area. This appears to be because my POS file coordinates are all in this order of magnitude. In other words, my entrance is fixed in my Survex file at a position using meters from a GPS fix. So the entrance is at 451900 800490, but my cave does not extend to the origin of this area! It is all located around the 451900 800490 point. The printing appears to assume the cave extends to 0 0.

This probably explains why Tunnel then crashes when I try to print with a huge scale factor 1:2500000 in order to prevent the print job extending over 1000s of pages.

(This problem appears to be fixed now. I've moved it to the fixed issues page) --Footleg 11:10, 29 March 2007 (BST)


julian: Other contributors have written that code, so I can't take the credit for this horribleness. It should be superceded by the frame areas soon.

Martin: I think that might have been my hack. I also used a script to insert an offset into the pos file. The follwoing python script ought to do it. If there is a desire I will have it added to sourceforge.

from re import match
from sys import argv

if len(argv) < 6:
    print """Usage
    posmod inputFile outputFile xOffset yOffset zOffset
    """
else:
  infilename = argv[1]
  outfilename = argv[2]
  xoffset = float(argv[3])
  yoffset = float(argv[4])
  zoffset = float(argv[5])

  infile = open(infilename, "r")
  outfile = open(outfilename, "w")
  outfile.write("""( Easting, Northing, Altitude )\n""")

  for sline in infile.readlines():
    match = match("\( *([0-9\-\.]+), *([0-9\-\.]+), *([0-9\-\.]+) *\)(.*)\s*$", sline)
    if match:
        outfile.write("("+str(float(match.group(1))-xoffset)+", "+str(float(match.group(2))-yoffset)+", "+str(float(match.group(3))-zoffset)+" ) "+match.group(4)+"\n")

  outfile.flush()
  outfile.close()

No Cancel from Print scale Dialog

When you get as far as the print scale dialog, you cannot cancel the print job. Clicking the cross to close the window still sends something to the printer.


julian haven't reproduced. I've cancelled an awful lot of print jobs in my time by using the close window. Printing is very temperamental, so I can believe things going differently on your setup.