C
C SUBROUTINE 'QGMAPC'
C ===================
C
C SET COORDINATE MAPPING OPTION AND PARAMETERS
C
      SUBROUTINE QGMAPC (XPXMIN, XPXMAX, YPXMIN, YPXMAX,
     *                   XMIN, XMAX, YMIN, YMAX)
C
C PARAMETERS
C
C      XPXMIN (I)  MINIMUM X PIXEL COORDINATE OF AREA TO BE MAPPED 
C                                             (0.0 TO 1023.0)
C      XPXMAX (I)  MAXIMUM X PIXEL COORDINATE OF AREA TO BE MAPPED 
C                                             (0.0 TO 1023.0)
C      YPXMIN (I)  MINIMUM Y PIXEL COORDINATE OF AREA TO BE MAPPED 
C                                             (0.0 TO 767.0)
C      YPXMAX (I)  MAXIMUM Y PIXEL COORDINATE OF AREA TO BE MAPPED 
C                                             (0.0 TO 767.0)
C        XMIN (I)  MINIMUM MAPPED X COORDINATE
C        XMAX (I)  MAXIMUM MAPPED X COORDINATE
C        YMIN (I)  MINIMUM MAPPED Y COORDINATE
C        YMAX (I)  MAXIMUM MAPPED Y COORDINATE
C
C FOR COORDINATES X, Y THE REQUIRED PIXEL COORDINATES XP, YP ARE CALCUALTED
C AS FOLLOWS:
C
C     XP = XPXMIN + (X-XMIN)*(XPXMAX-XPXMIN)/(XMAX-XMIN)
C     YP = YPXMIN + (Y-YMIN)*(YPXMAX-YPXMIN)/(YMAX-YMIN)
C
C SPECIFICATION STATEMENTS
C ------------------------
C
      LOGICAL MAP
      COMMON /QQMAP/ MAP, XPMIN, XPMAX, YPMIN, YPMAX, 
     *               XMMIN, XMMAX, YMMIN, YMMAX, XSC, YSC
      SAVE /QQMAP/
C
C SET COORDINATES AND CALCULATE SCALES
C ------------------------------------
C
      MAP = .TRUE.
      XPMIN = XPXMIN
      XPMAX = XPXMAX
      YPMIN = YPXMIN
      YPMAX = YPXMAX
      XMMIN = XMIN
      XMMAX = XMAX
      YMMIN = YMIN
      YMMAX = YMAX
      XSC = (XPMAX-XPMIN)/(XMMAX-XMMIN)
      YSC = (YPMAX-YPMIN)/(YMMAX-YMMIN)
      RETURN
      END
