%! 1 setlinejoin 1 setlinecap %% Data should be inserted between the square brackets %% as 'northing' 'easting' pairs separated by a tab. %% The resulting text file can be parsed by Illustrator %% as a postscript file or downloade to a PostScript %% printer. %% The file currently draws a grid of 1000 meters (UTM). %% If there is interest it can be reworked to deal more %% gracefully with decimal degrees also. %% The grid can be scaled down to 100 meters by removing %% the comment status '%%' of the three lines below %% beginning with .25 setlinewidth. %% %% -- Allory Deiss /data [ 4956420 0610477 4956383 0610384 4956370 0610348 4956379 0610285 4956402 0610218 4956404 0610197 4956416 0610126 4956421 0610080 4956437 0609996 4956467 0609919 4956483 0609803 4956500 0609786 4956507 0609767 4956519 0609704 4956500 0609642 4956507 0609619 4956516 0609596 4956562 0609495 4956494 0609416 4956411 0609317 4956313 0609183 4956277 0609160 4956257 0609121 4956228 0609108 4956226 0609089 4956192 0609076 4956161 0609075 4956144 0609067 4956144 0609051 4956141 0609009 4956112 0608992 4956112 0608984 4956083 0608964 4956085 0608954 4956078 0608925 4956089 0608899 4956088 0608855 4956087 0608772 4956111 0608708 4956118 0608627 ] def /minimumnorth {10000000} def /maximumnorth {0} def /minimumeast {10000000} def /maximumeast {0} def 0 2 data length 2 sub {/num exch def data num get dup minimumnorth lt {/minimumnorth exch def} if data num get dup maximumnorth gt {/maximumnorth exch def} if data num 1 add get dup minimumeast lt {/minimumeast exch def} if data num 1 add get dup maximumeast gt {/maximumeast exch def} if } for minimumnorth 1000 div floor 1000 mul /minimumnorth exch def minimumeast 1000 div floor 1000 mul /minimumeast exch def maximumnorth 1000 div ceiling 1000 mul /maximumnorth exch def maximumeast 1000 div ceiling 1000 mul /maximumeast exch def maximumnorth minimumnorth sub 10 div /ymax exch def maximumeast minimumeast sub 10 div /xmax exch def 120 120 translate .75 setlinewidth 0 0 moveto 0 ymax lineto xmax ymax lineto xmax 0 lineto closepath stroke .5 setlinewidth 100 100 ymax 100 sub {0 exch moveto xmax 0 rlineto stroke} for 100 100 xmax 100 sub {0 moveto 0 ymax rlineto stroke} for %% Un-comment the next three lines to get a 100 meter grid. %% .25 setlinewidth %% 10 10 ymax 10 sub {0 exch moveto xmax 0 rlineto stroke} for %% 10 10 xmax 10 sub {0 moveto 0 ymax rlineto stroke} for /istr 8 string def /Helvetica findfont 9 scalefont setfont /i minimumeast def 0 100 xmax {15 sub -10.5 moveto i cvi istr cvs show i 1000 add /i exch def} for /i minimumnorth def 0 100 ymax {2.5 sub -39 exch moveto i cvi istr cvs show i 1000 add /i exch def} for .75 setlinewidth data 1 get minimumeast sub 10 div data 0 get minimumnorth sub 10 div moveto 0 2 data length 2 sub {/num exch def data num get minimumnorth sub 10 div data num 1 add get minimumeast sub 10 div exch lineto} for stroke showpage