MAP_OUTLINE__DEFINE Name
MAP_OUTLINE__DEFINE
Purpose
This object is a wrapper for either MAP_CONTINENTS or MAP_GSHHS_SHORELINE.
It provides a simple way to allow map overlays on images which use a MAPCOORD
object to set up the map projection space. A map coordinate space must be in
effect at the time the Draw method of this object is used. Map outlines can be
provided from built-in IDL continental databases, or the GSHHS Shoreline
data base can be used. (For information on the GSHHS Shoreline data base, see
http://www.dfanning.com/map_tips/gshhs.html.)
Author
FANNING SOFTWARE CONSULTING
David Fanning, Ph.D.
1645 Sheely Drive
Fort Collins, CO 80526 USA
Phone: 970-221-0438
E-mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com
Category
Graphics Calling Sequence
mapCoord = Obj_New('MapCoord', 111, CENTER_LON=0, CENTER_LAT=90)
outlineObject = Obj_New('Map_Outline', MAP_OBJECT=mapCoord)
outlineObject -> Draw
Obj_Destroy, mapCoord, outlineObject
Auguments
parent: The parent object. Optional.
mapCoordObj: A map coordinate object which can return a map structure for converting coordinates
to/from XY coordinates to lon/lat coordinates. Typically, a MAPCOORD object. An
alternative way of specifying a map coordinate object is to use the MAP_OBJECT
keyword. But don't do both. Note, this object is *not* destroyed when the MAP_OUTLINE
object is destroyed. You are responsible for destroying the map coordinate object.
A map coordinate object is REQUIRED. So, if you don't specify a parent, use the
MAP_OBJECT keyword to pass this object into the program.
COMMON KEYWORDS (used with either MAP_CONTINENTS of MAP_GSHHS_SHORELINE):
COLOR: The name of a color (used with cgColor) to draw the output in.
FILL: Set this keyword to create a filled polygon output, rather than an outline.
HIRES: If this keyword is set, the high resolution dataset supplied with IDL is used
with MAP_CONTINENTS. If this keyword is set, and the GSHHS keyword is set, and
the FILENAME keyword is NOT used, then the default filename is "gshhs_h.b". Note
that the high resolution dataset must be installed to be used.
MAP_OBJECT: A MAPCOORD object or equivalent which had the ability to provide a map
structure with a GetMapStructure method. Don't use this keyword if you have
passed a map coordinate object as a positional parameter. This keyword should
be used ONLY if you are not specifying a parent parameter.
MAP_CONTINENTS KEYWORDS (apply only if you are using MAP_CONTINENTS to draw outlines):
COASTS: Set this keyword if you want coasts to be drawn.
CONTINENTS: Set this keyword if you want continental outlines to be drawn. This will be
set automatically if COASTS, COUNTRIES, RIVERS, AND USA keywords are all set
to zero.
LINESTYLE: Set to the type of linestyle in drawing outlines. Set to 0 or solid lines by default.
RIVERS: Set this keyword if you wish to draw rivers.
T3D: Set this graphics keyword if you wish to draw outlines use the T3D transformation matrix.
USA: Set this keyword if you wish do draw United States state boundaries.
ZVALUE: Set this keyword to the ZVALUE where the outlines should be drawn. Set to 0 by default.
MAP_GSHHS_SHORELINE KEYWORDS (apply only if you are using MAP_GSHHS_SHORELINE to draw outlines):
FILENAME: The root name of the GSHHS file to open. By default, "gshhs_l.b" unless the HIRES
keyword is selected, in which case it will be "gshhs_h.b". The GSHHS file must be
in a "resource" directory or in one of the directories on your IDL path, or it
must be an absolute path to the file.
GSHHS: Set this keyword to use the GSHHS Shoreline data. The default is to use IDL's
built-in database.
LAND_COLOR: The name of a color to be used for "land". Used with filled polygons
(e.g., the FILL keyword). By default, 'INDIAN RED'.
LEVEL: The polygon LEVEL. All polygons less than or equal to this value
are drawn. 1-land, 2-lakes, 3-island in lake, 4-pond in island.
By default, 2 (land and lake outlines).
MINAREA: The minimum feature area. By default, 500 km^2. Polygons with areas less
than this are not drawn.
OUTLINE: Set this keyword to draw shorelines. Set by default if FILL=0.
WATER_COLOR: The name of the water color. By default, "SKY BLUE".
Dependencies
The following programs (at least) are required from the Coyote Library:
http://www.dfanning.com/programs/error_message.pro
http://www.dfanning.com/programs/find_resource_file.pro
http://www.dfanning.com/programs/cgColor.pro
http://www.dfanning.com/programs/map_gshhs_shoreline.pro
Modification History
Written by David W. Fanning, 3 January 2009.
Fixed a problem in setting MAP_OBJECT in SetProperty method. 12 June 2009. DWF.
Fixed a problem when drawing filled outlines using IDL's map database when the
LAND_COLOR is different from the outline COLOR. 30 July 2009. DWF.
Previous problem introduced another. If LAND_COLOR is undefined, it is now set
to the same color as COLOR. 10 August 2009. DWF.
Circular parent references when passed a MAP_OBJECT was fixed, preventing memory
leakage. 30 August 2009. DWF.
Removed the MAP_STRUCTURE keyword, which caused MASSIVE problems and added a mapCoordObj
parameter. 9 November 2009. DWF.
Made a change that allows the GSHHS filename to be an absolute path to the
gshhs_*.b file. 4 June 2010. DWF.