C  NEW RASTER VALUE ROUTINE TO WORK WITH NEW VERSION OF LINE FOR NOW.
C
C  PXZ08 DETERMINES RASTER VALUE XR-YR FROM
C  X AND Y DATA VALUE.  IF LOG AND DATA VALUE .LE.0 THEN
C  FUNCTIONAL VALUE RETURNED AS -16 ELSE
C  1 IF LESS THAN MIN OR 2 IF GT THAN MAX.
C  NOTE.. THIS ROUTINE DOES NOT CHECK RANGE.
C
      INTEGER FUNCTION PXZ08(Z,ZR,IC)
      DIMENSION IZLOG(2),RZMIN(4),ZSCLE(2),ZOFFS(2)
C
$INCLUDE:'pxz99.cmn'
C
      EQUIVALENCE (IZLOG(1),IXLOG),(IZLOG(2),IYLOG),
     1 (RZMIN(1),RXMIN),(RZMIN(2),RXMAX),(RZMIN(3),RYMIN),
     2 (RZMIN(4),RYMAX),(ZSCLE(1),XSCLE),(ZSCLE(2),YSCLE),
     3 (ZOFFS(1),XOFFS),(ZOFFS(2),YOFFS)
C
      ZR=Z
      IF (IZLOG(IC))  10,30,10
   10 IF (ZR)  80,80,20
   20 ZR=ALOG(ZR)
   30 ZR=AINT(ZR*ZSCLE(IC)+ZOFFS(IC)+.5)
      I=IC*2-1
      IF (ZR-RZMIN(I)) 60,50,40
   40 IF (RZMIN(I+1)-ZR)  70,50,50
   50 PXZ08=0
      GO TO 90
   60 PXZ08=1
      GO TO 90
   70 PXZ08=2
      GO TO 90
   80 PXZ08=-16
   90 RETURN
C
      END

