MAPLATLONG Name
MAPLATLONG Purpose
Find complete lat/long range covered by map.
Category
Calling Sequence
maplatlong Inputs
Keyword Parameters
Keywords
RANGE=[long_min, long_max, lat_min, lat_max].
/QUIET means do not display range.
/NOEXPAND do not expand range using floor and ceil.
STEP=step Step size in pixels for lat/long search (def=3).
May need 1 for highly distorted maps like /ortho.
SPACE=spc Returned structure giving points off the map.
Structure elements are:
in = 1-d indices of points off map for image in window.
ix, iy = starting pixel of map window.
nx, ny = size of map window in pixels.
To use, after maplatlong,space=space do (example):
z = tvrd(space.ix, space.iy, space.nx, space.ny)
z(space.in) = 255
tv,z,space.ix, space.iy
Forces step=1.
ERROR=err Error flag: 0=no valid map points found.
Outputs
Common Blocks
Notes
Notes: An array of device coordinates covering the map
window is converted to lat/long. By default the
range found is expanded using floor and ceil, useful
when the map includes a pole or the -180/+180 long.
Modification History
R. Sterner, 2001 Feb 01
R. Sterner, 2001 Dec 27 --- Handled NaN. Also check more points.
R. Sterner, 2002 Jan 09 --- Tried to handle the -180/+180 break.
R. Sterner, 2002 Jan 22 --- Added SPACE keyword.
R. Sterner, 2005 Feb 21 --- Relaxed last plot restriction.
R. Sterner, 2008 Jun 24 --- Kept space nx, ny in range.
R. Sterner, 2010 May 23 --- Converted arrays from () to [].
Copyright (C) 2001, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.