Skip to content

Instantly share code, notes, and snippets.

@adamabernathy
Created June 23, 2015 16:03
Show Gist options
  • Select an option

  • Save adamabernathy/326abb8d74ff656f325c to your computer and use it in GitHub Desktop.

Select an option

Save adamabernathy/326abb8d74ff656f325c to your computer and use it in GitHub Desktop.
Print a Lat/Lon box to a console window in IDL.
pro print_loi_box,nlat,slat,elon,wlon
; Box dimensions - Comment out for real use.
nlat=90.0
slat=-43.0
wlon=-70
elon=180.0
; Graphic parts
lg_offset = ' '
sm_offset = ' '
line = '|----------------------------|'
wall = '| |'
print,string(13b)
print,lg_offset+' Lat/Lon Boundry Box'
print,string(13b)
print,' ' + string(nlat,format='(F6.2)')+' [N] -' + line
print,lg_offset + wall
print,lg_offset + wall
print,lg_offset + wall
print,' ' + string(slat,format='(F6.2)')+' [N] -' + line
print,lg_offset + wall
print,sm_offset + string(wlon,format='(F7.2)') + ' [E]' + $
lg_offset + ' ' + string(elon,format='(F7.2)') + ' [E]'
print,string(13b)
end
@adamabernathy
Copy link
Author

The output is as such:

                  Lat/Lon Boundry Box

 -42.00 [N] -|----------------------------|
             |                            |
             |                            |
             |                            |
 -43.00 [N] -|----------------------------|
             |                            |
         -179.99 [E]                   179.99 [E]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment