.\
cgmapgrid__define.pro
Graphics, Map Projections
This object is a wrapper for the cgMap_Grid routine in IDL. It provides a simple way to allow map grids on images which use a cgMAP 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.
Class description for cgMapGrid
Inheritance
All ancestor classes: cgContainer IDL_OBJECT IDL_CONTAINER
Properties
Properties in cgContainer
- UVALUE get set init
- NAME get set init
- COUNT get
- _REF_EXTRA get set
Properties in cgMapGrid
- LATS get set init
- BOX_AXES get set init
- LATALIGN get set init
- LATLAB get set init
- CHARSIZE get set init
- _EXTRA set init
- MAP_STRUCTURE get
- LATDEL get set init
- ADDCMD init
- HORIZON get set init
- LONNAMES get set init
- FILL_HORIZON get set init
- DRAW set
- FORMAT get set init
- AUTODRAWGRID get set init
- BCOLOR init
- LATNAMES get set init
- MAP_OBJECT get
- LONS get set init
- LINESTYLE get set init
- LONLAB get set init
- _REF_EXTRA get
- LABEL get set init
- CLIP_TEXT get set init
- COLOR get set init
- INCREMENT get set init
- LONDEL get set init
- LONALIGN get set init
- FUZZY init
- THICK get set init
- LCOLOR get set init
- FIXED_cgMapGrid get set
Fields
Fields in cgContainer
- _CG_TRASH obj_new()
- _CG_NAME ''
- _CG_UVALUE ptr_new()
Fields in IDL_OBJECT
- IDL_OBJECT_BOTTOM 0LL
- __OBJ__ obj_new()
- IDL_OBJECT_TOP 0LL
Fields in IDL_CONTAINER
- IDLCONTAINERVERSION 0S
- IDL_CONTAINER_TOP 0LL
- NLIST 0L
- PTAIL ptr_new()
- PHEAD ptr_new()
- IDL_CONTAINER_BOTTOM 0LL
Fields in cgMapGrid
- _CG_AUTODRAWGRID 0B
- _CG_FORMAT ''
- _CG_LONALIGN 0.000000
- _CG_LINESTYLE 0S
- _CG_BCOLOR ''
- _CG_LATS ptr_new()
- _CG_MAP_OBJECT obj_new()
- _CG_LATNAMES ptr_new()
- _CG_CLIP_TEXT 0B
- _CG_INCREMENT ptr_new()
- _CG_LONLAB ptr_new()
- _CG_HORIZON 0B
- _CG_BOX_AXES 0B
- _CG_LONDEL ptr_new()
- _CG_LCOLOR ''
- _CG_LONNAMES ptr_new()
- _CG_LABEL 0S
- _CG_COLOR ''
- _CG_LATALIGN 0.000000
- _CG_LATLAB ptr_new()
- _CG_CHARSIZE 0.000000
- _CG_LONS ptr_new()
- _CG_FUZZY 0.000000
- _CG_THICK 0S
- _CG_LATDEL ptr_new()
- _CG_FILL_HORIZON 0B
Author information
- Author
FANNING SOFTWARE CONSULTING:
David W. Fanning 1645 Sheely Drive Fort Collins, CO 80526 USA Phone: 970-221-0438 E-mail: david@idlcoyote.com Coyote's Guide to IDL Programming: http://www.idlcoyote.com
- Copyright
Copyright (c) 2011, Fanning Software Consulting, Inc.
- History
Change History:
Written by David W. Fanning, 7 November 2011. Modified AutoDrawGrid method to update, better-working method in cgMap_Grid. 28 Dec 2011. DWF.
Routines
result = cgMapGrid::INIT(mapCoord [, /ADDCMD] [, /AUTODRAWGRID] [, BCOLOR=string] [, /BOX_AXES] [, /CLIP_TEXT] [, CHARSIZE=float] [, COLOR=string] [, /FILL_HORIZON] [, FORMAT=string] [, FUZZY=float] [, LINESTYLE=integer] [, /HORIZON] [, INCREMENT=float] [, LABEL=integer] [, LATALIGN=float] [, LATDEL=float] [, LATLAB=float] [, LATNAMES=varies] [, LATS=float] [, LCOLOR=string] [, LONALIGN=float] [, LONDEL=integer] [, LONLAB=float] [, LONNAMES=varies] [, LONS=float] [, THICK=integer], _EXTRA=_EXTRA)
The initialization method for the object.
cgMapGrid::AddCmd
Adds the object as a command (the DRAW method is called) in a cgWindow resizeable graphics window.
cgMapGrid::AutoDrawGrid [, /SUCCESS]
Calculates suitable latitude and longitude lines that run through the map range and suggests a default position for labeling such lines.
cgMapGrid::Draw
Draws the map grid by calling cgMap_Grid.
cgMapGrid::GetProperty, AUTODRAWGRID=AUTODRAWGRID, BOX_AXES=BOX_AXES, CLIP_TEXT=CLIP_TEXT, CHARSIZE=CHARSIZE, COLOR=COLOR, FILL_HORIZON=FILL_HORIZON, FIXED_cgMapGrid=FIXED_cgMapGrid, FORMAT=FORMAT, LCOLOR=LCOLOR, LINESTYLE=LINESTYLE, THICK=THICK, HORIZON=HORIZON, INCREMENT=INCREMENT, LABEL=LABEL, LATALIGN=LATALIGN, LATDEL=LATDEL, LATLAB=LATLAB, LATNAMES=LATNAMES, LATS=LATS, LONALIGN=LONALIGN, LONDEL=LONDEL, LONLAB=LONLAB, LONNAMES=LONNAMES, LONS=LONS, MAP_OBJECT=MAP_OBJECT, MAP_STRUCTURE=MAP_STRUCTURE, _REF_EXTRA=_REF_EXTRA
This method allows the user to get various properties of the object.
cgMapGrid::SetProperty, AUTODRAWGRID=AUTODRAWGRID, BOX_AXES=BOX_AXES, CLIP_TEXT=CLIP_TEXT, CHARSIZE=CHARSIZE, COLOR=COLOR, DRAW=DRAW, FILL_HORIZON=FILL_HORIZON, FIXED_cgMapGrid=FIXED_cgMapGrid, FORMAT=FORMAT, LINESTYLE=LINESTYLE, HORIZON=HORIZON, INCREMENT=INCREMENT, LABEL=LABEL, LATALIGN=LATALIGN, LATDEL=LATDEL, LATLAB=LATLAB, LATNAMES=LATNAMES, LATS=LATS, LCOLOR=LCOLOR, LONALIGN=LONALIGN, LONDEL=LONDEL, LONLAB=LONLAB, LONNAMES=LONNAMES, LONS=LONS, THICK=THICK, _EXTRA=_EXTRA
This method allows the user to set various properties of the object.
cgMapGrid::CLEANUP
This is the clean-up routine for the object.
cgMapGrid__DEFINE [, class]
This is the class definition module.
Routine details
top cgMapGrid::INIT
result = cgMapGrid::INIT(mapCoord [, /ADDCMD] [, /AUTODRAWGRID] [, BCOLOR=string] [, /BOX_AXES] [, /CLIP_TEXT] [, CHARSIZE=float] [, COLOR=string] [, /FILL_HORIZON] [, FORMAT=string] [, FUZZY=float] [, LINESTYLE=integer] [, /HORIZON] [, INCREMENT=float] [, LABEL=integer] [, LATALIGN=float] [, LATDEL=float] [, LATLAB=float] [, LATNAMES=varies] [, LATS=float] [, LCOLOR=string] [, LONALIGN=float] [, LONDEL=integer] [, LONLAB=float] [, LONNAMES=varies] [, LONS=float] [, THICK=integer], _EXTRA=_EXTRA)
The initialization method for the object.
Parameters
- mapCoord in required type=object
A map coordinate object that will set up a map coordinate data space. Required to convert lat/lon values to projected meter space. A cgMap object.
Keywords
- ADDCMD in optional type=boolean default=0
If this keyword is set, the object is added to the resizeable graphics window, cgWindow. The DRAW method of the object is called in cgWindow.
- AUTODRAWGRID in optional type=boolean default=0
If this keyword is set, the grid latitude and longitude values are automatically calculated from the mapCoord object ranges and drawn appropriately. Most keywords are ignored when auto drawing the grid.
- BCOLOR optional type=string default=opposite
The name of the color to draw box axes with.
- BOX_AXES in optional type=boolean default=0
Set this keyword to draw a box-style axes around the map.
- CLIP_TEXT in optional type=boolean default=1
Set this keyword to a zero value to turn off clipping of text labels. By default, text labels are clipped. This keyword is ignored if the BOX_AXES keyword is set.
- CHARSIZE in optional type=float default=1.0
Set this keyword to the size of characters used for the labels.
- COLOR in optional type=string default=opposite
The name of the color to draw the grid lines in.
- FILL_HORIZON in optional type=boolean default=0
Set this keyword to fill the current map horizon.
- FORMAT in optional type=string
Set this keyword to a string format for formatting the grid labels (e.g., '(F0.2)')
- FUZZY in optional type=float default=0.0
This keyword applies only if the MAP_STRUCTURE keyword is used. Set the keyword to a value that is a percentage of the current data range. This percentage of the range is added to or subtracted from the values used to determine if the label is "inside" the boundary. It allows you to be a little less exact when selecting inside points. There are occasional aesthetic reasons for allowing fuzzy boundaries. A reasonable value for fuzziness might be 0.0125.
- LINESTYLE in optional type=integer default=1
Set this keyword to the type of linestyle desired. See Graphics Keywords in the on-line help for additional information.
- HORIZON in optional type=boolean default=0
Set this keyword to draw the current map horizon.
- INCREMENT in optional type=float
Set this keyword to the spacing between the graticle points.
- LABEL in optional type=integer default=1
Set this keyword to an integer, n, that labels every n parallels and meridians. For example, LABEL=3 will label every 3rd line. Default is 1.
- LATALIGN in optional type=float default=0.5
This keyword controls the alignment of the text baseline for latitude labels. A value of 0.0 left justifies the label, 1.0 right justifies it, and 0.5 centers it. This keyword is ignored if the BOX_AXES keyword is set.
- LATDEL in optional type=float
Set this keyword equal to the spacing (in degrees) between parallels of latitude in the grid. If this keyword is not set, a default value of 5 is used.
- LATLAB in optional type=float
The longitude at which to place latitude labels. The default is the center longitude on the map. This keyword is ignored if the BOX_AXES keyword is set.
- LATNAMES in optional type=varies
Set this keyword equal to an array specifying the names to be used for the latitude labels. By default, this array is automatically generated in units of degrees. The LATNAMES array can be either type string or any single numeric type, but should not be of mixed type.When LATNAMES is specified, the LATS keyword must also be specified.
- LATS in optional type=float
Set this keyword equal to a one or more element vector of latitudes for which lines will be drawn (and optionally labeled). If LATS is omitted, appropriate latitudes will be generated based on the value of the (optional) LATDEL keyword. If LATS is set to a single value, that latitude and a series of automatically generated latitudes will be drawn (and optionally labeled).
- LCOLOR in optional type=string
Set this to the name of the label color to use in labeling grid lines. By default, the same as COLOR, or if BOX_AXIS is set, then same as BCOLOR.
- LONALIGN in optional type=float default=0.5
This keyword controls the alignment of the text baseline for longitude labels. A value of 0.0 left justifies the label, 1.0 right justifies it, and 0.5 centers it. This keyword is ignored if the BOX_AXES keyword is set.
- LONDEL in optional type=integer default=10
Set this keyword equal to the spacing (in degrees) between parallels of longitude in the grid. If this keyword is not set, a default value of 10 is used.
- LONLAB in optional type=float
The latitude at which to place longitude labels. The default is the center latitude on the map. This keyword is ignored if the BOX_AXES keyword is set.
- LONNAMES in optional type=varies
Set this keyword equal to an array specifying the names to be used for the longitude labels. By default, this array is automatically generated in units of degrees. The LONNAMES array can be either type string or any single numeric type, but should not be of mixed type.When LONNAMES is specified, the LONS keyword must also be specified.
- LONS in optional type=float
Set this keyword equal to a one or more element vector of longitudes for which lines will be drawn (and optionally labeled). If LONS is omitted, appropriate longitudes will be generated based on the value of the (optional) LONDEL keyword. If LONS is set to a single value, that longitudes and a series of automatically generated longitudes will be drawn (and optionally labeled).
- THICK in optional type=integer default=1
Set this keyword to the thickness of the line used to draw the grid.
- _EXTRA
top cgMapGrid::AddCmd
cgMapGrid::AddCmd
Adds the object as a command (the DRAW method is called) in a cgWindow resizeable graphics window.
top cgMapGrid::AutoDrawGrid
cgMapGrid::AutoDrawGrid [, /SUCCESS]
Calculates suitable latitude and longitude lines that run through the map range and suggests a default position for labeling such lines.
Keywords
- SUCCESS out optional type=boolean
Will be set to 1 on return, if the operation was successful. Otherwise, this value is set to 0.
top cgMapGrid::GetProperty
cgMapGrid::GetProperty, AUTODRAWGRID=AUTODRAWGRID, BOX_AXES=BOX_AXES, CLIP_TEXT=CLIP_TEXT, CHARSIZE=CHARSIZE, COLOR=COLOR, FILL_HORIZON=FILL_HORIZON, FIXED_cgMapGrid=FIXED_cgMapGrid, FORMAT=FORMAT, LCOLOR=LCOLOR, LINESTYLE=LINESTYLE, THICK=THICK, HORIZON=HORIZON, INCREMENT=INCREMENT, LABEL=LABEL, LATALIGN=LATALIGN, LATDEL=LATDEL, LATLAB=LATLAB, LATNAMES=LATNAMES, LATS=LATS, LONALIGN=LONALIGN, LONDEL=LONDEL, LONLAB=LONLAB, LONNAMES=LONNAMES, LONS=LONS, MAP_OBJECT=MAP_OBJECT, MAP_STRUCTURE=MAP_STRUCTURE, _REF_EXTRA=_REF_EXTRA
This method allows the user to get various properties of the object. In general, the same keywords that are used for the INIT method can be used here.
Keywords
- AUTODRAWGRID
- BOX_AXES
- CLIP_TEXT
- CHARSIZE
- COLOR
- FILL_HORIZON
- FIXED_cgMapGrid
- FORMAT
- LCOLOR
- LINESTYLE
- THICK
- HORIZON
- INCREMENT
- LABEL
- LATALIGN
- LATDEL
- LATLAB
- LATNAMES
- LATS
- LONALIGN
- LONDEL
- LONLAB
- LONNAMES
- LONS
- MAP_OBJECT
- MAP_STRUCTURE
- _REF_EXTRA
top cgMapGrid::SetProperty
cgMapGrid::SetProperty, AUTODRAWGRID=AUTODRAWGRID, BOX_AXES=BOX_AXES, CLIP_TEXT=CLIP_TEXT, CHARSIZE=CHARSIZE, COLOR=COLOR, DRAW=DRAW, FILL_HORIZON=FILL_HORIZON, FIXED_cgMapGrid=FIXED_cgMapGrid, FORMAT=FORMAT, LINESTYLE=LINESTYLE, HORIZON=HORIZON, INCREMENT=INCREMENT, LABEL=LABEL, LATALIGN=LATALIGN, LATDEL=LATDEL, LATLAB=LATLAB, LATNAMES=LATNAMES, LATS=LATS, LCOLOR=LCOLOR, LONALIGN=LONALIGN, LONDEL=LONDEL, LONLAB=LONLAB, LONNAMES=LONNAMES, LONS=LONS, THICK=THICK, _EXTRA=_EXTRA
This method allows the user to set various properties of the object. In general, the same keywords that are used for the INIT method can be used here.
Keywords
- AUTODRAWGRID
- BOX_AXES
- CLIP_TEXT
- CHARSIZE
- COLOR
- DRAW
- FILL_HORIZON
- FIXED_cgMapGrid
- FORMAT
- LINESTYLE
- HORIZON
- INCREMENT
- LABEL
- LATALIGN
- LATDEL
- LATLAB
- LATNAMES
- LATS
- LCOLOR
- LONALIGN
- LONDEL
- LONLAB
- LONNAMES
- LONS
- THICK
- _EXTRA
top cgMapGrid__DEFINE
cgMapGrid__DEFINE [, class]
This is the class definition module. Structures used to manipulate map projection and map datum information are also created here.
Parameters
- class out optional type=structure
Occasionally, it is useful to have an object class definition as a structure variable. Using this output keyword will allow that.
File attributes
Modification date: | Fri Mar 27 11:07:37 2015 |
Lines: | 776 |
Docformat: | rst rst |