Ezmap(3NCARG)
okay so bestie, welcome to Ezmap(3NCARG) from NCAR GRAPHICS β it's giving lowkey legendary mapping utility, no cap, fr fr, and we're about to make it make sense. πβ¨
β¨ NAME β¨
EZMAP is the main character here: it allows one to plot maps of the earth according to any of ten different projections, with parallels, meridians, and continental, international, and/or U.S. state outlines. ππ
EZMAPA is the name of a supplement to the EZMAP utility that allows users to produce solid-filled maps of the earth. The EZMAPA routines are discussed as part of the EZMAP utility. π
EZMAPB is the name of a supplement to the EZMAP utility that provides access to improved map databases (principally one called "Earth..1", which contains a unified higher-resolution version of everything that was in the old outline datasets). iykyk. The EZMAPB routines are discussed as part of the EZMAP utility. π¦
β¨ SYNOPSIS β¨
πΈ Routines Used to Draw a Simple Map πΈ
To draw the simple map defined by the current values of EZMAP's internal parameters (assuming no area fills and no access to the new, improved, map database "Earth..1", which was created in 1998), one need only execute the single FORTRAN statement CALL MAPDRW:
MAPDRWβ Draws a complete simple map. β¨
All that MAPDRW does is call four lower-level routines. In some situations, the user may wish to call these routines directly; they are as follows (in the order in which they are called by MAPDRW):
MAPINTβ Initializes.MAPINTmust be called at least once before calling any routine that depends on mapping lat/lon coordinates into u/v coordinates. After one or more ofMAPPOS,MAPROJ, andMAPSEThas been called,MAPINTmust be called again.MAPINTdoes the call to the SPPS routineSETthat defines the mapping from the u/v (projection) plane to the x/y (plotter) plane.MAPGRDβ Draws selected parallels and meridians.MAPLBLβ Labels the international date line, the equator, the Greenwich meridian, and the poles, and draws the perimeter.MAPLOTβ Draws selected geographic outlines. Note that this routine uses whichever old outline dataset is selected by the value of the internal parameter'OU'; to access the new map database"Earth..1", which was created in 1998, one must call instead the EZMAPB routineMPLNDR.
π Routines Used to Change the Values of Internal Parameters π
The following routines are called to change the values of internal parameters of EZMAP, and thus change the behavior of other EZMAP routines β periodt:
MAPPOSβ Determines what portion of the plotter frame is to be used.MAPROJβ Determines the projection to be used.MAPSETβ Determines what portion of the u/v plane is to be viewed.MAPSTCβ Sets a parameter value of type CHARACTER.MAPSTIβ Sets a parameter value of type INTEGER.MAPSTLβ Sets a parameter value of type LOGICAL.MAPSTRβ Sets a parameter value of type REAL.
π Routines Used to Retrieve the Values of Internal Parameters π
The following routines are used to retrieve the current values of EZMAP parameters:
MAPGTCβ Gets a parameter value of type CHARACTER.MAPGTIβ Gets a parameter value of type INTEGER.MAPGTLβ Gets a parameter value of type LOGICAL.MAPGTRβ Gets a parameter value of type REAL.
πΎ Routines Used to Save and Restore Internal Parameters πΎ
To save/restore the current values of the internal parameters of EZMAP, use the following:
MAPSAVβ Saves the values (by writing a record on a user-specified unit).MAPRSTβ Restores saved values (by reading a record from a user-specified unit).
πΊοΈ Routines Used to Draw Objects on a Map πΊοΈ
To draw objects on the map, use the following routines:
MAPTRAβ Computes the u/v coordinates of a point from its latitude and longitude. If the point is unprojectable or its projection lies outside the current perimeter, a special value is returned to signal this.MAPTRNβ Computes the u/v coordinates of a point from its latitude and longitude. If the point is unprojectable, a special value is returned to signal this, but no check is made for the projected value being outside the perimeter.MAPFSTβ Does a"pen-up"move defining the start of a line to be projected and drawn. The line is defined by a series of lat/lon coordinates.MAPVECβ Does a"pen-down"move defining the continuation of a line to be projected and drawn. The line is defined by a series of lat/lon coordinates.MAPITβ Does"pen-up"or"pen-down"moves. This routine is called byMAPFSTandMAPVEC.MAPIQβ Signals the end of a string of calls toMAPITand causes its buffers to be flushed.MAPGCIβ Given the latitudes and longitudes of two points on the surface of the globe, this routine returns the latitudes and longitudes of a specified number of points along the great circle route joining them.
π Routines Used to Do Inverse Transformations π
The following routine was added to EZMAP early in 1992:
MAPTRIβ Computes the latitude and longitude of a point from its u/v coordinates. If the point is outside the boundary of the map, a special value is returned.
The example named "mpex10" shows one of the ways in which this routine may be used; it draws what is essentially a colored contour plot of a data field defined on the surface of the globe, using an orthographic projection. Obsessed. π
π Routines Used to Draw Solid-Filled Maps (EZMAPA) π
In late 1986 or early 1987, a package of routines was written allowing a user to draw solid-filled maps of the globe. This package was named EZMAPA and was first advertised in the NCAR Graphics User's Guide (Version 2.00), published in August, 1987. Conceptually, ngl, the routines in this package are really part of EZMAP; they use the same common blocks and many of the same underlying low-level routines and they are affected by the same set of internal parameters as the routines in EZMAP proper. The routines of EZMAPA will be described in this document; to use them effectively, it will be necessary to understand also the package AREAS, which is described in a separate document. The EZMAPA routines are as follows:
MAPBLAβ Adds boundary lines to an existing area map. Routines in the package AREAS may then be used to process that area map in various ways. (Example: drawing a map of Europe with each country in a different color.) Note that this routine uses whichever old outline dataset is selected by the value of the internal parameter'OU'; to access the new map database"Earth..1", which was created in 1998, one must call instead the EZMAPB routineMPLNAM.MAPBLMβ Draws boundary lines"masked"by an existing area map. (Example: drawing these lines only where they do not overlay CONPACK labels.) Note that this routine uses whichever old outline dataset is selected by the value of the internal parameter'OU'; to access the new map database"Earth..1", which was created in 1998, one must call instead the EZMAPB routineMPLNDM.MAPGRMβ Draws lines of latitude and longitude"masked"by an existing area map. (Example: drawing these lines over water, but not over land.)MAPITAandMAPIQAβ Adds to an area map the projections of arbitrary lines defined by lat/lon coordinates of points on the surface of the globe.MAPBLAuses these routines to add boundary lines to an area map; they may be called directly by the user to add his/her own set of boundary lines to the area map.MAPITMandMAPIQMβ Draws, masked by an area map, the projections of arbitrary lines defined by lat/lon coordinates of points on the surface of the globe.MAPGRMuses these routines to draw masked lines of latitude and longitude; they may be called directly by the user to draw other masked lines.MAPACIβ A function which, given the"area identifier"for a particular area defined by the boundaries in one of the old EZMAP outline datasets, returns a suggested color index for that area; it is guaranteed that, if the suggested color indices are used, no two areas having a boundary in common will have the same color. Note that this function should not be used to select color indices for areas defined by the new map database"Earth..1", which was created in 1998; for that purpose, use EZMAPB functions instead (in particular,MPISCI).
π§ Routines Used to Access New Datasets (EZMAPB) π§
In early 1998, a new world map database, called "Earth..1", was created for use with EZMAP; this database has higher-resolution coastlines, it has been updated to reflect many of the political changes that have taken place over the years since EZMAP came into existence, and it is structured differently, allowing for greater flexibility and ease of use and providing for easier changes and extensions in the future.
okay so every area in the database is literally giving five things, bestie, and you need all of them:
- an "area identifier" β an integer that uniquely identifies it, iconic
- an "area type" β specifies its level in a hierarchy of areas
- a suggested color index
- an area identifier specifying its "parent" area β the area of which it is a part
- a name
For example, there is an area named "Madeline Island" which is of type 4 (used for a state or a portion thereof) and has suggested color index 6. Its parent is an area named "Wisconsin", which is also of type 4 and has suggested color index 6. The parent of "Wisconsin" is "Conterminous US", which is of type 3 (used for a country or a portion thereof) and has suggested color index 3. The parent of "Conterminous US" is "United States", which is also of type 3 and has suggested color index 3. The parent of "United States" is "North America", which is of type 2 and has suggested color index 5. The parent of "North America" is "Land", which is of type 1 and has suggested color index 2. The area named "Land" is at the top of the hierarchy and therefore has no parent (when you ask for the area identifier of its parent, you get a zero). π
One may use the database at any of five specified hierarchical levels: 1 => land/water, 2 => continents, 3 => countries, 4 => states, and 5 => counties (so far, no counties are included). When the database is used at a particular level, entities that exist only at lower levels (larger level numbers) effectively disappear. β¨
The new database was created from data available on the World Wide Web, using a new interactive editor based on NCAR Graphics. There are plans to make this editor available, so that a knowledgeable user can create a database tailored to his or her own needs: for example (assuming that one can obtain the necessary outline data), it should now be relatively easy to create and use a Pangaea database with EZMAP. π¦
A new package of routines is used to access "Earth..1" and other databases in the same format; this package is called EZMAPB. Conceptually, the EZMAPB routines are just part of EZMAP; they use the same common blocks and many of the same underlying low-level routines and they are affected by the same set of internal parameters as the routines in EZMAP proper. no cap.
The principal EZMAPB routines are as follows:
MPLNAM(MaP LiNes, to Area Map) β A routine to extract boundary lines from a specified database and send them to an area map.MPLNDM(MaP LiNes, Draw Masked) β A routine to extract boundary lines from a specified database and draw them, masked by the contents of an area map.MPLNDR(MaP LiNes, Draw) β A routine to extract boundary lines from a specified database and draw them.MPLNRIβ A routine to force the reading of certain information from a database into labelled COMMON blocks inside EZMAP, so that subsequent references to some of the functions described below will have that information to work with. (Each of the routinesMPLNAM,MPLNDM, andMPLNDRreads this data as a side effect;MPLNRIis provided for use in cases in which none of the other three routines has yet been called.)
As each of the EZMAPB routines MPLNAM, MPLNDM, and MPLNDR processes boundary lines from a specified database, it calls an EZMAPB routine named MPCHLN (the default version of which does nothing):
MPCHLNβ A user-replaceable routine that can be made to change line style, color, line width, and so on as the boundary lines from a database are being drawn; it can also be made to delete particular lines or to change the area identifiers associated with them. The arguments ofMPCHLNtell it which of the EZMAPB routines is calling it and whether it's being called before or after the line is processed; they also supply the "line type" of the line being drawn, the area identifiers of the areas on either side of it, and the actual coordinates defining the line. Line types are similar to area types (1=> land/water,2=> continents,3=> countries,4=> states, and5=> counties).
Another EZMAPB routine, named MPGLTY, may be called by the user from within the line-processing routine specified by the final argument in a call to MPLNDM:
MPGLTYβ Retrieves the line type of the line being drawn.
There is a group of EZMAPB functions providing access to information about the areas defined by a database being used; these may be referenced at any time the appropriate information has been loaded into EZMAPB's common blocks (that is, after calling one of MPLNAM, MPLNDM, MPLNDR, or MPLNRI), but they are normally to be referenced from within the area-processing routine specified as the final argument in a call to the AREAS routine ARSCAM, in which they may be used to obtain information determining the manner in which the areas are to be rendered:
MPIPAIβ A function whose value is non-zero if and only if the area with a specified area identifier is part of the area having a second specified area identifier.MPIPANβ A function whose value is non-zero if and only if the area with a specified area identifier is part of the area having a specified name.MPIOARβ A function whose value is the area identifier of the smallest area that is defined at or above a specified level in the area hierarchy and of which the area having a specified area identifier is a part.MPIATYβ A function whose value is the type of the area having a specified area identifier.MPIPARβ A function whose value is the area identifier of the parent of the area having a specified area identifier.MPISCIβ A function whose value is the suggested color index for an area having a specified area identifier.MPNAMEβ A function whose value is the name of the area having a particular area identifier.MPFNMEβ A function whose value is the full name of the area having a specified area identifier, up to a specified level in the hierarchy of areas; the full name of an area consists of its own name, preceded by the name of its parent, preceded by the name of its parent's parent, and so on; the various components of the name are separated by the 3-character string' - '(a blank, a dash, and another blank).
Two additional EZMAPB functions are provided; these have nothing to do with mapping, really, but can be useful in dealing with character strings:
MPIFNBβ A function whose value is the index of the first non-blank character in a character string.MPILNBβ A function whose value is the index of the last non-blank character in a character string.
π Miscellaneous Other Routines π
The following EZMAP routines are used for the purposes stated:
MAPRSβ Re-executes the"CALL SET"done during the last call toMAPINT. This is useful when there has been an intervening call to a utility that callsSET. It is quite common for a background drawn by EZMAP to be placed in a flash buffer (as created by the package"GFLASH"). When the contents of the flash buffer are copied to the metafile being created, if it is desired to draw something on the EZMAP background,MAPRSmay first have to be called to ensure that the correctSETcall is in effect. π«ΆMPRSTβ Resets the internal state of EZMAP/EZMAPA to the default.SUPMAPβ Draws a map with a single call. An implementation of the routine from which EZMAP grew.
β¨ C-BINDING SYNOPSIS β¨
#include <ncarg/ncargC.h>
c_mapaci
c_mapbla
c_mapdrw
c_mapfst
c_mapgrd
c_mapgrm
c_mapgtc
c_mapgtc
c_mapgti
c_mapgtl
c_mapgtr
c_mapint
c_mapiq
c_mapiqa
c_mapiqm
c_mapit
c_mapita
c_mapitm
c_maplbl
c_maplot
c_mappos
c_maproj
c_maprs
c_maprst
c_mapsav
c_mapset
c_mapstc
c_mapsti
c_mapstl
c_mapstr
c_maptra
c_maptri
c_maptrn
c_mapvec
c_mpfnme
c_mpglty
c_mpiaty
c_mpifnb
c_mpilnb
c_mpiola
c_mpiosa
c_mpipai
c_mpipan
c_mpipar
c_mpisci
c_mplnam
c_mplndm
c_mplndr
c_mplnri
c_mpname
c_mprset
c_supmap
π οΈ USER-MODIFIABLE INTERNAL ROUTINES π οΈ
okay so bestie, these EZMAP routines are used for the purposes stated, and you can literally supply your own versions of them:
MAPUSRβ This routine gets called by various EZMAP routines just before and just after drawing parts of the map. By default, grid lines are drawn using software dashed lines, and geographical outlines are drawn using either solid lines or dotted lines. The dash pattern used for the grid lines, the flag which says whether outlines are solid or dotted, and the color indices of various parts of the map are all user-settable parameters, but more complete control of color indices, spot size, dash pattern, etc., may be achieved by supplying your own version ofMAPUSR; a user version may be as complicated as is required to achieve a desired effect. Note that this routine is not called by any of the EZMAPB routines; they callMPCHLNinstead.MAPEODβ This routine is called by the EZMAP routineMAPLOTand by the EZMAPA routinesMAPBLAandMAPBLM; in each case, it is called once for each segment in the outline dataset. You may supply a version which examines the segment to see if it ought to be plotted and, if not, to delete it. This can be used (for example) to reduce the clutter in northern Canada. Note that this routine is not called by any of the EZMAPB routines; they callMPCHLNinstead.MPCHLNβ This routine is called by the EZMAPB routinesMPLNAM,MPLNDM, andMPLNDR; in each case, it is called just before and just after the processing of each segment in the map database. The default version does nothing; a user-supplied version can do for the new databases whatMAPUSRandMAPEODdid for the old ones.
π ACCESS π
To use EZMAP Fortran or C routines, load the NCAR Graphics libraries ncarg, ncarg_gks, and ncarg_c, preferably in that order. no cap, that order is the vibe.
π¬ MESSAGES π¬
When error conditions are detected, the support routine SETER is called. By default, SETER writes a message to the standard error file (as defined by I1MACH(4)) and then terminates execution. It is possible to put SETER into recovery mode and regain control after a recoverable error (which includes all of the possible errors).
The possible error messages are listed below. All errors are recoverable in the sense that a user program which has called ENTSR to set recovery mode will get control back after one of these errors occurs.
MAPBLA - UNCLEARED PRIOR ERRORMAPCHI - ERROR EXIT FROM GQPLCIMAPCHI - ERROR EXIT FROM GQPMCIMAPCHI - ERROR EXIT FROM GQTXCIMAPDRW - UNCLEARED PRIOR ERRORMAPFST - UNCLEARED PRIOR ERRORMAPGCI - UNCLEARED PRIOR ERRORMAPGRD - UNCLEARED PRIOR ERRORMAPGRM - UNCLEARED PRIOR ERRORMAPGTC - UNCLEARED PRIOR ERRORMAPGTC - UNKNOWN PARAMETER NAMEMAPGTI - UNCLEARED PRIOR ERRORMAPGTI - UNKNOWN PARAMETER NAMEMAPGTL - UNCLEARED PRIOR ERRORMAPGTL - UNKNOWN PARAMETER NAMEMAPGTR - UNCLEARED PRIOR ERRORMAPGTR - UNKNOWN PARAMETER NAMEMAPINT - ANGULAR LIMITS TOO GREATMAPINT - ATTEMPT TO USE NON-EXISTENT PROJECTIONMAPINT - MAP HAS ZERO AREAMAPINT - MAP LIMITS INAPPROPRIATEMAPINT - UNCLEARED PRIOR ERRORMAPIO - EOF ENCOUNTERED IN OUTLINE DATASETMAPIO - ERROR ON READ OF OUTLINE DATASETMAPIQ - UNCLEARED PRIOR ERRORMAPIQA - UNCLEARED PRIOR ERRORMAPIQM - UNCLEARED PRIOR ERRORMAPIT - UNCLEARED PRIOR ERRORMAPITA - UNCLEARED PRIOR ERRORMAPITM - UNCLEARED PRIOR ERRORMAPLBL - UNCLEARED PRIOR ERRORMAPLMB - UNCLEARED PRIOR ERRORMAPLOT - UNCLEARED PRIOR ERRORMAPPOS - ARGUMENTS ARE INCORRECTMAPPOS - UNCLEARED PRIOR ERRORMAPROJ - UNCLEARED PRIOR ERRORMAPROJ - UNKNOWN PROJECTION NAMEMAPRS - UNCLEARED PRIOR ERRORMAPRST - EOF ON READMAPRST - ERROR ON READMAPRST - UNCLEARED PRIOR ERRORMAPSAV - ERROR ON WRITEMAPSAV - UNCLEARED PRIOR ERRORMAPSET - UNCLEARED PRIOR ERRORMAPSET - UNKNOWN MAP AREA SPECIFIERMAPSTC - UNCLEARED PRIOR ERRORMAPSTC - UNKNOWN OUTLINE NAMEMAPSTC - UNKNOWN PARAMETER NAMEMAPSTI - UNCLEARED PRIOR ERRORMAPSTI - UNKNOWN PARAMETER NAMEMAPSTL - UNCLEARED PRIOR ERRORMAPSTL - UNKNOWN PARAMETER NAMEMAPSTR - UNCLEARED PRIOR ERRORMAPSTR - UNKNOWN PARAMETER NAMEMAPTRA - UNCLEARED PRIOR ERRORMAPTRI - UNCLEARED PRIOR ERRORMAPTRN - ATTEMPT TO USE NON-EXISTENT PROJECTIONMAPTRN - UNCLEARED PRIOR ERRORMAPVEC - UNCLEARED PRIOR ERRORMPGETC - UNCLEARED PRIOR ERRORMPGETI - UNCLEARED PRIOR ERRORMPGETL - UNCLEARED PRIOR ERRORMPGETR - UNCLEARED PRIOR ERRORMPLNAM - Can't form name of ".names" fileMPLNAM - Can't open the ".lines" fileMPLNAM - Can't open the ".names" fileMPLNAM - Read bad index from ".names" fileMPLNAM - Read error on ".lines" fileMPLNAM - Read error on ".names" fileMPLNAM - UNCLEARED PRIOR ERRORMPLNDM - Can't form name of ".names" fileMPLNDM - Can't open the ".lines" fileMPLNDM - Can't open the ".names" fileMPLNDM - Read bad index from ".names" fileMPLNDM - Read error on ".lines" fileMPLNDM - Read error on ".names" fileMPLNDM - UNCLEARED PRIOR ERRORMPLNDR - Can't form name of ".names" fileMPLNDR - Can't open the ".lines" fileMPLNDR - Can't open the ".names" fileMPLNDR - Read bad index from ".names" fileMPLNDR - Read error on ".lines" fileMPLNDR - Read error on ".names" fileMPLNDR - UNCLEARED PRIOR ERRORMPLNRI - Can't form name of ".names" fileMPLNRI - Can't open the ".names" fileMPLNRI - Read bad index from ".names" fileMPLNRI - Read error on ".names" fileMPLNRI - UNCLEARED PRIOR ERRORMPRSET - UNCLEARED PRIOR ERRORMPSETC - UNCLEARED PRIOR ERRORMPSETI - UNCLEARED PRIOR ERRORMPSETL - UNCLEARED PRIOR ERRORMPSETR - UNCLEARED PRIOR ERRORSUPCON - UNCLEARED PRIOR ERRORSUPMAP - UNCLEARED PRIOR ERROR
π SEE ALSO π
Online: ezmap_params, mapaci, mapbla, mapblm, mapdrw, mapeod, mapfst, mapgci, mapgrd, mapgrm, mapgtc, mapgti, mapgtl, mapgtr, mapint, mapiq, mapiqa, mapiqd, mapiqm, mapit, mapita, mapitd, mapitm, maplbl, maplmb, maplot, mappos, maproj, maprs, maprst, mapsav, mapset, mapstc, mapsti, mapstl, mapstr, maptra, maptri, maptrn, mapusr, mapvec, mpchln, mpfnme, mpgetc, mpgeti, mpgetl, mpgetr, mpglty, mpiaty, mpifnb, mpilnb, mpiola, mpiosa, mpipai, mpipan, mpipar, mpisci, mplnam, mplndm, mplndr, mplnri, mpname, mprset, mpsetc, mpseti, mpsetl, mpsetr, supmap, supcon, ncarg_cbind
Hardcopy: NCAR Graphics Contouring and Mapping Tutorial; NCAR Graphics Fundamentals, UNIX Version
π COPYRIGHT π
Copyright (C) 1987-2009
University Corporation for Atmospheric Research
The use of this Software is governed by a License Agreement.
catch u later bestie, this was the UNIX man page from March 1993, Ezmap(3NCARG) πβ¨
π¦ where this page comes from
- epel 9: ncl-devel 6.6.2-59.el9 Β· LicenseRef-Callaway-BSD
- fedora 43: ncl-devel 6.6.2-58.fc43 Β· LicenseRef-Callaway-BSD
- fedora 44: ncl-devel 6.6.2-62.fc44 Β· LicenseRef-Callaway-BSD
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms