/usr/share/ncarg/tests/tezmap.f is in libncarg-data 6.3.0-6build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 | PROGRAM TEZMAP
C
C Define the error file, the Fortran unit number, the workstation type,
C and the workstation ID to be used in calls to GKS routines.
C
C PARAMETER (IERRF=6, LUNIT=2, IWTYPE=1, IWKID=1) ! NCGM
C PARAMETER (IERRF=6, LUNIT=2, IWTYPE=8, IWKID=1) ! X Windows
C PARAMETER (IERRF=6, LUNIT=2, IWTYPE=11, IWKID=1) ! PDF
C PARAMETER (IERRF=6, LUNIT=2, IWTYPE=20, IWKID=1) ! PostScript
C
PARAMETER (IERRF=6, LUNIT=2, IWTYPE=1, IWKID=1)
C
C OPEN GKS, OPEN WORKSTATION OF TYPE 1, ACTIVATE WORKSTATION
C
CALL GOPKS (IERRF, ISZDM)
CALL GOPWK (IWKID, LUNIT, IWTYPE)
CALL GACWK (IWKID)
C
C INVOKE DEMO DRIVER
C
CALL EZMAP(IERR)
C
C DEACTIVATE AND CLOSE WORKSTATION, CLOSE GKS.
C
CALL GDAWK (IWKID)
CALL GCLWK (IWKID)
CALL GCLKS
C
STOP
END
C
SUBROUTINE EZMAP (IERROR)
C
C PURPOSE To provide a simple demonstration of
C the mapping utility, EZMAP.
C
C USAGE CALL EZMAP (IERROR)
C
C ARGUMENTS
C
C ON OUTPUT IERROR
C An integer variable
C = 0, if the test was successful,
C = 1, the test was not successful.
C
C I/O The map dataset must be connected to a
C FORTRAN unit. See the open statement in
C this test deck.
C
C If the test is successful, the message
C
C EZMAP TEST EXECUTED--SEE PLOTS TO CERTIFY
C
C is printed on unit 6. In addition, 10
C frames are produced on the machine graphics
C device. In order to determine if the test
C was successful, it is necessary to examine
C the plots.
C
C PRECISION Single
C
C LANGUAGE FORTRAN 77
C
C REQUIRED ROUTINES EZMAP, GRIDAL
C
C REQUIRED GKS LEVEL 0A
C
C ALGORITHM TEZMAP calls routine MAPROJ once for each of
C the 10 types of projections:
C stereographic,
C orthographic,
C Lambert conformal conic with 2 standard
C parallels,
C Lambert equal area,
C gnomonic,
C azimuthal equidistant,
C cylindrical equidistant,
C Mercator,
C Mollweide type, and
C satellite view.
C
C HISTORY Written October, 1976, main entry SUPMAP.
C Updated September, 1985, main entry EZMAP.
C
DIMENSION PLM1(2),PLM2(2),PLM3(2),PLM4(2)
COMMON /ERROR/ IFRAME, IERRR
C
DATA PLM1,PLM2,PLM3,PLM4 /8*0.0/
C
C Define the center of a plot title string on a square grid of size
C 0. to 1.
C
DATA TX/0.5/, TY/0.9765/
C
C Initialize the error parameter.
C
IERRR = 0
C
C Turn on the error recovery mode.
C
CALL ENTSR(IDUM,1)
C
C
C Frame 1 -- The stereographic projection.
C
IFRAME = 1
C
C Set the projection-type parameter.
C
CALL MAPROJ('ST',80.0,-160.0,0.0)
C
C Set the limit parameters.
C
CALL MAPSET('MA',PLM1,PLM2,PLM3,PLM4)
C
C Set the outline-dataset parameter.
C
CALL MAPSTC('OU','PS')
C
C Draw the map.
C
CALL MAPDRW
C
C Report any errors encountered.
C
IF( NERRO(IERR).NE.0) CALL RPTERR
C
C Select normalization transformation 0.
C
CALL GSELNT(0)
C
C Call PLCHLQ to write the plot title.
C
CALL PLCHLQ(TX,TY,'EZMAP DEMONSTRATION: STEREOGRAPHIC PROJECTION'
+ ,16.,0.,0.)
CALL FRAME
10 CONTINUE
C
C
C Frame 2 -- The orthographic projection.
C
IFRAME = 2
C
C
C Set the projection-type parameter.
C
CALL MAPROJ('OR',60.0,-120.0,0.0)
C
C Draw the map.
C
CALL MAPDRW
C Report any errors encountered.
C
IF( NERRO(IERR).NE.0) CALL RPTERR
C
C Write the title.
C
C
C Select normalization transformation 0.
C
CALL GSELNT(0)
C
C Call PLCHLQ to write the plot title.
C
CALL PLCHLQ(TX,TY,
+ 'EZMAP DEMONSTRATION: ORTHOGRAPHIC PROJECTION',16.,0.,0.)
CALL FRAME
20 CONTINUE
C
C
C Frame 3 -- The Lambert conformal conic projection.
C
IFRAME = 3
C
C
C Set the projection-type, limits, and outline-dataset parameters.
C
CALL MAPROJ('LC',45.0,-100.0,45.0)
CALL MAPSET('CO',50.0,-130.0,20.0,-75.0)
CALL MAPSTC('OU','US')
C
C Draw the map.
C
CALL MAPDRW
C
C Report any errors encountered.
C
IF( NERRO(IERR).NE.0) CALL RPTERR
C
C Select normalization transformation 0.
C
CALL GSELNT(0)
C
C Call PLCHLQ to write the plot title.
C
CALL PLCHLQ(TX,TY,
+ 'EZMAP DEMONSTRATION: LAMBERT CONFORMAL CONIC PROJECTION',
+ 16.,0.,0.)
CALL FRAME
30 CONTINUE
C
C
C Frame 4 -- The Lambert equal area projection.
C
IFRAME = 4
C
C Set the projection-type, limits, and outline-dataset parameters.
C
CALL MAPROJ('LE',20.0,-40.0,0.0)
CALL MAPSET('MA',PLM1,PLM2,PLM3,PLM4)
CALL MAPSTC('OU','CO')
C
C Draw the map.
C
CALL MAPDRW
C
C Report any errors encountered.
C
IF( NERRO(IERR).NE.0) CALL RPTERR
C
C Select normalization transformation 0.
C
CALL GSELNT(0)
C
C Call PLCHLQ to write the plot title.
C
CALL PLCHLQ(TX,TY,
+ 'EZMAP DEMONSTRATION: LAMBERT EQUAL AREA PROJECTION',
+ 16.,0.,0.)
CALL FRAME
40 CONTINUE
C
C
C Frame 5 -- The gnomonic projection.
C
IFRAME = 5
C
C Set the projection-type parameter.
C
CALL MAPROJ('GN',0.0,0.0,0.0)
C
C Draw the map.
C
CALL MAPDRW
C Report any errors encountered.
C
IF( NERRO(IERR).NE.0) CALL RPTERR
C
C Select normalization transformation 0.
C
CALL GSELNT(0)
C
C Call PLCHLQ to write the plot title.
C
CALL PLCHLQ(TX,TY,'EZMAP DEMONSTRATION: GNOMONIC PROJECTION',
+ 16.,0.,0.)
CALL FRAME
50 CONTINUE
C
C
C Frame 6 -- The azimuthal equidistant projection.
C
IFRAME = 6
C
C Set the projection-type parameter.
C
CALL MAPROJ('AE',-20.0,40.0,0.0)
C
C Set the grid spacing.
C
CALL MAPSTR('GR',5.0)
C
C Draw the map.
C
CALL MAPDRW
C
C Report any errors encountered.
C
IF( NERRO(IERR).NE.0) CALL RPTERR
C
C Select normalization transformation 0.
C
CALL GSELNT(0)
C
C Call PLCHLQ to write the plot title.
C
CALL PLCHLQ(TX,TY,
+ 'EZMAP DEMONSTRATION: AZIMUTHAL EQUIDISTANT PROJECTION',
+ 16.,0.,0.)
CALL FRAME
60 CONTINUE
C
C
C Frame 7 -- The cylindrical equidistant projection.
C
IFRAME = 7
C
C Set the map projection type parameter.
C
CALL MAPROJ('CE',-40.0,80.0,0.0)
C
C Draw the map.
C
CALL MAPDRW
C
C Report any errors encountered.
C
IF( NERRO(IERR).NE.0) CALL RPTERR
C
C Select normalization transformation 0.
C
CALL GSELNT(0)
C
C Call PLCHLQ to write the plot title.
C
CALL PLCHLQ(TX,TY,
+ 'EZMAP DEMONSTRATION: CYLINDRICAL EQUIDISTANT PROJECTION',
+ 16.,0.,0.)
CALL FRAME
70 CONTINUE
C
C
C Frame 8 -- The mercator projection.
C
IFRAME = 8
C
C Set the map projection type parameter.
C
CALL MAPROJ('ME',-60.0,120.0,0.0)
C
C Draw the map.
C
CALL MAPDRW
C
C Report any errors encountered.
C
IF( NERRO(IERR).NE.0) CALL RPTERR
C
C Select normalization transformation 0.
C
CALL GSELNT(0)
C
C Call PLCHLQ to write the plot title.
C
CALL PLCHLQ(TX,TY,'EZMAP DEMONSTRATION: MERCATOR PROJECTION',
+ 16.,0.,0.)
CALL FRAME
80 CONTINUE
C
C
C Frame 9 -- The Mollyweide-type projection.
C
IFRAME = 9
C
C Set the map projection type parameter.
C
CALL MAPROJ('MO',-80.0,160.0,0.0)
C
C Draw the map.
C
CALL MAPDRW
C
C Report any errors encountered.
C
IF( NERRO(IERR).NE.0) CALL RPTERR
C
C Select normalization transformation 0.
C
CALL GSELNT(0)
C
C Call PLCHLQ to write the plot title.
C
CALL PLCHLQ(TX,TY,
+ 'EZMAP DEMONSTRATION: MOLLWEIDE-TYPE PROJECTION',
+ 16.,0.,0.)
CALL FRAME
90 CONTINUE
C
C
C Frame 10 -- The satellite view projection.
C
IFRAME = 10
C
C Set the map projection type parameter.
C
CALL MAPROJ('SV',0.0,-135.0,0.0)
C
C Set the satellite distance and supress grid lines.
C
CALL MAPSTR('SA',6.631)
CALL MAPSTI('GR',0)
C
C Draw the map.
C
CALL MAPDRW
C
C Report any errors encountered.
C
IF( NERRO(IERR).NE.0) CALL RPTERR
C
C Select normalization transformation 0.
C
CALL GSELNT(0)
C
C Call PLCHLQ to write the plot title.
C
CALL PLCHLQ(TX,TY,
+ 'EZMAP DEMONSTRATION: SATELLITE VIEW PROJECTION',16.,0.,0.)
CALL FRAME
100 CONTINUE
C
IF(IERRR.EQ.0) WRITE(6,1000)
IF(IERRR.EQ.1) WRITE(6,1001)
IERROR = IERR
RETURN
C
1000 FORMAT(' EZMAP TEST EXECUTED--SEE PLOTS TO CERTIFY')
1001 FORMAT(' EZMAP TEST UNSUCCESSFUL')
END
SUBROUTINE RPTERR
C
C ROUTINE TO REPORT ERROR MESSEGES
C
COMMON /ERROR/ IFRAME,IERRR
C
WRITE(6,1000) IFRAME
CALL EPRIN
WRITE(6,1001)
CALL ERROF
IERRR = 1
RETURN
C
1000 FORMAT(' ERROR IN FRAME ',I2,5X,'ERROR MESSAGE FOLLOWS:')
1001 FORMAT(' ******',//)
END
|