#include "worgen.h" #include "geompak.h"FUNCTION c_mapedg (ul_long, lr_long, ul_lat, lr_lat, inunits, proj_code, zone, parout, units, pxmin, pxmax, pymin, pymax)
double *ul_long; double *lr_long; double *ul_lat; double *lr_lat; long *inunits; long *proj_code; long *zone; double parout[15]; long *units; double *pxmin; double *pxmax; double *pymin; double *pymax;
The upper-left longitude coordinate in units of inunits
The lower-right longitude coordinate in units of inunits
The upper-left latitude coordinate in units of inunits
The lower-right latitude coordinate in units of inunits
Projection transformation package unit code for value in ul_long lr_long, ul_lat, and lr_lat. Refer to c_projon() for a list of valid unit codes.
Defines the output projection system. Refer to c_projon() for a list of valid projection system codes.
Zone for UTM and State Plane projection systems. Refer to Table A for the coverage of UTM zones and state plane zone codes. For the Southern Hemisphere UTM, use a negative zone code.
Array of fifteen projection parameters. These parameters are required to define each map projection. See c_projon() for the definition of the fields for each projection.
Unit code for the output projection system. Pxmin, pxmax, pymin, and pymax will be returned in these units. Refer to c_projon() for a list of valid unit codes.
Minimum projection coordinate in X.
Maximum projection coordinate in X.
Minimum projection coordinate in Y.
Maximum projection coordinate in Y.
The c_mapedg() routine calculates the minimum and maximum projection coordinates which surround a rectangular geographic area (that is, rectangular in an input geographic space). This routine is used when an output image must contain all of a requested geographic area and the projection coordinates of the upper-left and lower-right output image area are not known. The minimum and maximum projection X and Y coordinates are returned. The calling routine may then frame an output image area using these minimums and maximums and the desired pixel size in X and in Y.
c_mapedg() returns
E_SUCC (0) --> successful completion E_FAIL (-1) --> operation failed
Table A: UTM Zone Codes, Locations and Central Meridians