05.06.2013 Views

Z-MAP Plus I/O Access Library - Landmark Software Manager ...

Z-MAP Plus I/O Access Library - Landmark Software Manager ...

Z-MAP Plus I/O Access Library - Landmark Software Manager ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

copyright © 2008 by <strong>Landmark</strong> Graphics Corporation<br />

Release 5000.0.0 July 2008


© 2008 <strong>Landmark</strong> Graphics Corporation<br />

All Rights Reserved Worldwide<br />

This publication has been provided pursuant to an agreement containing restrictions on its use. The publication is also<br />

protected by Federal copyright law. No part of this publication may be copied or distributed, transmitted, transcribed,<br />

stored in a retrieval system, or translated into any human or computer language, in any form or by any means,<br />

electronic, magnetic, manual, or otherwise, or disclosed to third parties without the express written permission of:<br />

<strong>Landmark</strong> Graphics Corporation<br />

2107 CityWest Blvd, Building 2, Houston, Texas 77042-3051, USA<br />

P.O. Box 42806, Houston, Texas 77242, USA<br />

Phone:713-839-2000<br />

FAX: 713-839-2015<br />

Internet: www.halliburton.com/landmark<br />

Trademarks<br />

3D Drill View, 3D Drill View KM, 3DFS, 3D Surveillance, 3DView, Active Field Surveillance, Active Reservoir Surveillance, ADC, Advanced<br />

Data Transfer, ARIES, ARIES DecisionSuite, AssetConnect, Asset Decision Solutions, Asset Development Center, AssetDirector, Asset Journal,<br />

AssetLink, AssetLink Advisor, AssetLink Director, AssetLink Observer, AssetObserver, AssetObserver Advisor, Asset Performance,<br />

AssetPlanner, AssetSolver, AssetSolver Online, AssetView, BLITZPAK, CasingLife, CasingSeat, COMPASS, Corporate Data Archiver,<br />

Corporate Data Store, Data Analyzer, Data<strong>Manager</strong>, DataStar, DBPlot, Decision Management System, DecisionSpace, DecisionsSpace 3D Drill<br />

View KM, DecisionSpace AssetLink, DecisionSpace AssetPlanner, DecisionSpace AssetSolver, DecisionSpace AssetView 2D, DecisionSpace<br />

AssetView 3D, DecisionSpace Atomic Meshing, DecisionSpace Decision Management Systems(DMS), DecisionSpace for Production,<br />

DecisionSpace Infrastructure, DecisionSpace Nexus, DecisionSpace PowerModel, DecisionSpace PrecisionTarget, DecisionSpace Reservoir,<br />

DecisionSpace TracPlanner, DecisionSpace Well Seismic Fusion, DecisionSpace WellSolver, DecisionSuite, DepthTeam, Depth Team,<br />

DepthTeam Explorer, Depth Team Explorer, DepthTeam Express, Depth Team Express, DepthTeam Extreme, Depth Team Extreme, DepthTeam<br />

Interpreter, Depth Team Interpreter, Desktop Navigator, DESKTOP-PVT, DESKTOP-VIP, DEX, DIMS, Discovery, Discovery Asset, Discovery<br />

FrameBuilder, DMS, Drillability Suite, Drilling Desktop, DrillModel, Drill-to-the-Earth Model, DSS, Dynamic Reservoir Management, Dynamic<br />

Surveillance System, EarthCube, EDM, EDT, e<strong>Landmark</strong>, Engineer’s Data Model, Engineer's Desktop, Engineer’s Link, ESP, Event Similarity<br />

Prediction, ezFault, ezModel, ezSurface, ezTracker, FastTrack, FG+, FieldPlan, Field Scenario Planner, FZAP!, GeoAtlas, GeoDataLoad,<br />

GeoGraphix, GeoGraphix Exploration System, GeoLink, GeoProbe GF DataServer, GES, GES97, GESXplorer, GMAplus, GMI Imager,<br />

GRIDGENR, Handheld Field Operator, HHFO, I2 Enterprise, iDIMS, IsoMap, iWellFile, i Wellfile, KnowledgeSource, <strong>Landmark</strong>, <strong>Landmark</strong><br />

Decision Center, <strong>Landmark</strong> & Design, <strong>Landmark</strong> Logo and Design, Landscape, Lattix, LeaseMap, LMK Resources, LogEdit, LogM, LogPrep,<br />

Make Great Decisions, MathPack, MIMIC, MIMIC+, Model Builder, My<strong>Landmark</strong>, Nexus, Object MP, OpenBooks, OpenJournal, OpenSGM,<br />

OpenVision, OpenWells, OpenWire, OpenWorks, OpenWorks Development Kit, OpenWorks Well File, OpenWorks Production, PAL, Parallel-<br />

VIP, PetroBank, PetroBank Explorer, PetroBank Master Data Store, PetroWorks, PetroWorks Asset, PetroWorks Pro, PetroWorks ULTRA,<br />

PlotView, Point Gridding <strong>Plus</strong>, Pointing Dispatcher, PostStack, PostStack ESP, PostStack Family, PowerCalculator, PowerExplorer,<br />

PowerExplorer Connect, PowerGrid, PowerHub, Power Interpretation, PowerJournal, PowerModel, PowerView, PrecisionTarget, Presgraf,<br />

PRIZM, Production Asset <strong>Manager</strong>, Production, PROFILE, Project Administrator, ProMAGIC, ProMAGIC Connect, ProMAGIC Server,<br />

ProMAX, ProMAX 2D, ProMAX 3D, ProMAX 3DPSDM, ProMAX 4D, ProMAX Family, ProMAX MVA, ProMAX VSP, pSTAx, Query<br />

Builder, Quick, Quick+, QUICKDIF, QuickWell, QuickWell+, QUIKRAY, QUIKSHOT, QUIKVSP, RAVE, RAY<strong>MAP</strong>, RAY<strong>MAP</strong>+, Real<br />

Freedom, Real Time Asset Management Center, Real Time Decision Center, Real Time Operations Center, Real Time Production Surveillance,<br />

Real Time Surveillance, Real-Time View, Reference Data <strong>Manager</strong>, Reservoir Framework Builder, RESev, ResMap, RightTime, RTOC, SCAN,<br />

SeisCube, SeisMap, SeisModel, SeisSpace, SeisVision, SeisWell, SeisWorks, SeisWorks 2D, SeisWorks 3D, SeisWorks PowerCalculator,<br />

SeisWorks PowerJournal, SeisWorks PowerSection, SeisWorks PowerView, SeisXchange, Semblance Computation and Analysis, Sierra Family,<br />

SigmaView, SimConnect, SimConvert, SimDataStudio, SimResults, SimResults+, SimResults+3D, SIVA+, SLAM, smartSECTION, Spatializer,<br />

SpecDecomp, StrataAmp, StrataMap, StrataModel, StrataSim, StrataWorks, StratWorks, StratWorks 3D, StreamCalc, StressCheck, STRUCT,<br />

Structure Cube, Surf & Connect, SynTool, SystemStart, SystemStart for Clients, SystemStart for Servers, System Start for Servers, SystemStart for<br />

Storage, Tanks & Tubes, TDQ, Team Workspace, TERAS, The Engineer’s Desktop, Total Drilling Performance, TOW/cs, TOW/cs Revenue<br />

Interface, TracPlanner, TracPlanner Xpress, Trend Form Gridding, Turbo Synthetics, VESPA, VESPA+, VIP, VIP-COMP, VIP-CORE,<br />

VIPDataStudio, VIP-DUAL, VIP-ENCORE, VIP-EXECUTIVE, VIP-Local Grid Refinement, VIP-THERM, WavX, Web Editor, Wellbase,<br />

Wellbore Planner, Wellbore Planner Connect, WELLCAT, Well Cost, WELLPLAN, Well Seismic Fusion, WellSolver, WellXchange, WOW,<br />

Xsection, You're in Control. Experience the difference, ZAP!, and Z-<strong>MAP</strong> <strong>Plus</strong> are trademarks, registered trademarks or service marks of<br />

<strong>Landmark</strong> Graphics Corporation.<br />

All other trademarks, service marks and product or service names are the trademarks or names of their respective owners.


<strong>Landmark</strong> acknowledges that certain third party code has been bundled with, or embedded in, <strong>Landmark</strong>’s software.<br />

The licensors of this third party code, and the terms and conditions of their respective licenses, may be found at the<br />

following location:<br />

[Installdir]\docs\Third_Party.pdf


International Trade Compliance<br />

This application is manufactured or designed using U.S. origin technology and is therefore subject<br />

to the export control laws of the United States. Any use or further disposition of such items is<br />

subject to U.S. law. Exports from the United States and any re-export thereafter may require a<br />

formal export license authorization from the government. If there are doubts about the<br />

requirements of the applicable law, it is recommended that the buyer obtain qualified legal advice.<br />

These items cannot be used in the design, production, use, or storage of chemical, biological, or<br />

nuclear weapons, or missiles of any kind.<br />

The ECCN’s provided in Release Notes represent <strong>Landmark</strong> Graphics' opinion of the correct<br />

classification for the product today (based on the original software and/or original hardware).<br />

Classifications are subject to change. If you have any questions or need assistance please contact<br />

us at FHOUEXP@halliburton.com<br />

Under the U.S. Export Administration Regulations (EAR), the U.S. Government assigns your<br />

organization or client, as exporter/importer of record, responsibility for determining the correct<br />

authorization for the item at the time of export/import. Restrictions may apply to shipments based<br />

on the products, the customer, or the country of destination, and an export license may be required<br />

by the Department of Commerce prior to shipment. The U.S. Bureau of Industry and Security<br />

provides a website to assist you with determining the need for a license and with information<br />

regarding where to obtain help.<br />

The URL is: http://www.bis.doc.gov<br />

Definitions<br />

CCATS (Commodity Classification Automated Tracking System) - the tracking number assigned<br />

by the U.S. Bureau of Industry and Security (BIS) to products formally reviewed and classified by<br />

the government. The CCATS provides information concerning export/re-export authorizations,<br />

available exceptions, and conditions.<br />

ECCN (Export Control Classification Number) -The ECCN is an alpha-numeric code, e.g., 3A001,<br />

that describes a particular item or type of item, and shows the controls placed on that item. The<br />

CCL (Commerce Control List) is divided into ten broad categories, and each category is further<br />

subdivided into five product groups. The CCL is available on the EAR Website.


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Contents<br />

Introduction .....................................................................................................................1<br />

Purpose of This Guide ......................................................................................................1<br />

What Is in This Guide.......................................................................................................2<br />

Typographic Conventions.................................................................................................3<br />

Related Documentation.....................................................................................................4<br />

ZPI/O Overview ..............................................................................................................5<br />

Introduction.......................................................................................................................5<br />

Structure of Programs Using ZPI/O..................................................................................6<br />

General Structure of Programs Using ZPI/O .............................................................6<br />

Sequence of Calls to Read or Write a ZIMS File ......................................................7<br />

Example Program for Listing Members of a Master File ..........................................8<br />

Example Program for Creating Graphics .................................................................10<br />

Example Program TSGRAP for Input Graphics ......................................................14<br />

Subroutine Descriptions..................................................................................................25<br />

Major ZPI/O Groupings ...........................................................................................25<br />

Presentation of Information .....................................................................................25<br />

Comments and Suggestions ............................................................................................29<br />

Internal Routines ......................................................................................................29<br />

Initializing Input Arguments ....................................................................................29<br />

Calling Arguments ...................................................................................................29<br />

Using the Debug Option, IDBUG ............................................................................29<br />

Using the Status Flag Option, ISTAT ......................................................................30<br />

Opening and Closing Files .......................................................................................30<br />

Master File Numbers ...............................................................................................31<br />

Reading Sequential Data ..........................................................................................31<br />

Writing Sequential Data ...........................................................................................31<br />

Reading a File ..........................................................................................................32<br />

Creating a File ..........................................................................................................32<br />

Naming Output Data Files .......................................................................................33<br />

Reading and Writing Grids ......................................................................................34<br />

5000.0.0 6


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Initialize/Terminate ZPI/O Environment..........................................................35<br />

Internal Routines.............................................................................................................36<br />

S2DBUG<br />

Reset the debug print flag ...............................................................................................37<br />

SICOMM<br />

Initialize the ZPI/O environment ....................................................................................38<br />

SIESIL<br />

Terminate the ZPI/O environment..................................................................................39<br />

SIEZIM<br />

Close a ZIMS file............................................................................................................40<br />

SIISIL<br />

Initialize the ZPI/O environment with output file control ..............................................41<br />

Transfer, Convert, or List Information.............................................................43<br />

Introduction.....................................................................................................................43<br />

Internal Routines.............................................................................................................43<br />

S2FLIN<br />

Transfer information from an external file into a member of a master file ....................44<br />

S2GRST<br />

Compute grid file statistics .............................................................................................46<br />

S4CDTR<br />

Convert from x,y to latitude/longitude and vice versa ....................................................49<br />

SICTST<br />

Compute control point file statistics ...............................................................................56<br />

SIFDST<br />

Compute statistics for a field ..........................................................................................59<br />

SIFLOT<br />

Transfer information from a member of a master file to an external file .......................61<br />

SIGLST<br />

List a grid as a grid or contours ......................................................................................63<br />

SILIST<br />

List a data file .................................................................................................................66<br />

5000.0.0 Contents 7


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Draw and Plot Features...........................................................................................69<br />

Internal Routines.............................................................................................................69<br />

S2ALIN<br />

Draw lines using array inputs .........................................................................................70<br />

S2DSPT<br />

Display a picture or plot a hardcopy of a picture............................................................72<br />

S3ZLIN<br />

Draw lines using a member file ......................................................................................74<br />

Graphics Utilities ........................................................................................................77<br />

Internal Routines.............................................................................................................77<br />

S2GMRK<br />

Draw markers..................................................................................................................78<br />

S2ZGIN<br />

Transfer the contents (pictures) of a neutral file to a graphics file .................................79<br />

S2ZGOT<br />

Transfer a set of pictures from a graphics file to a neutral file.......................................80<br />

S3GELM<br />

Obtain the next valid graphics element from a picture...................................................81<br />

S3IPIC<br />

Open a new or old picture...............................................................................................85<br />

S3NPIC<br />

Open a new picture .........................................................................................................92<br />

S3OPIC<br />

Open an old picture.......................................................................................................101<br />

S4PCIN<br />

Obtain general, projection and graphics feature information for a picture...................109<br />

SIEPIC<br />

Close the last picture opened ........................................................................................117<br />

SIEZGF<br />

Close a graphics file......................................................................................................118<br />

SIEZIG<br />

Terminate the Z-<strong>MAP</strong> Interactive Graphics Environment (ZIGS)...............................119<br />

SIGLCL<br />

Set line color .................................................................................................................120<br />

8 Contents 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

SIGLIN<br />

Draw connected line segments .....................................................................................121<br />

SIGLPM<br />

Set dash line and hachure mark parameters..................................................................122<br />

SIGLTY<br />

Set line type ..................................................................................................................123<br />

SIGLWD<br />

Set line width ................................................................................................................124<br />

SIGMCL<br />

Set marker color............................................................................................................125<br />

SIGMHT<br />

Set marker height ..........................................................................................................126<br />

SIGMTY<br />

Set marker type .............................................................................................................127<br />

SIGPCL<br />

Set polygon fill color ....................................................................................................128<br />

SIGPDF<br />

Set defaults for lines, markers, text, and polygons .......................................................129<br />

SIGPFL<br />

Draw a shaded or colorfilled polygon...........................................................................132<br />

SIGSCL<br />

Close current graphics feature ......................................................................................133<br />

SIGSCS<br />

Define coordinate system..............................................................................................134<br />

SIGSDL<br />

Delete a graphics feature from a picture file.................................................................135<br />

SIGSOP<br />

Open a new graphics feature.........................................................................................136<br />

SIGTCL<br />

Set text color .................................................................................................................137<br />

SIGTFO<br />

Set text font...................................................................................................................138<br />

SIGTHT<br />

Set text height ...............................................................................................................139<br />

SIGTJU<br />

Set text justification ......................................................................................................140<br />

5000.0.0 Contents 9


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

SIGTRO<br />

Set text rotation.............................................................................................................141<br />

SIGTXT<br />

Draw text.......................................................................................................................142<br />

SIIZGF<br />

Open a graphics file ......................................................................................................145<br />

SIIZIG<br />

Initialize the Z-<strong>MAP</strong> Interactive Graphics Environment (ZIGS).................................146<br />

SIOVLY<br />

Overlay maps or generate index maps..........................................................................147<br />

SIPCAS<br />

Assemble/overlay a picture...........................................................................................149<br />

SIPCCP<br />

Copy all or part of a picture to another picture.............................................................153<br />

SIPCDF<br />

Compute four corners of one picture relative to another picture for assembly/overlay155<br />

SIPCDL<br />

Mark a picture for deletion ...........................................................................................159<br />

SIPCFL<br />

Obtain a picture name by picture index ........................................................................160<br />

SIPCRN<br />

Rename a picture ..........................................................................................................161<br />

SIRPIC<br />

Open an old picture in read-only mode ........................................................................162<br />

SIZGCM<br />

Compress a graphics file...............................................................................................163<br />

SOGCLS<br />

Obtain the color representation for a color index .........................................................165<br />

SOGEND<br />

Terminate the ZPI/O output graphics environment ......................................................166<br />

SOGINT<br />

Initialize the ZPI/O output graphics environment ........................................................167<br />

SOGLGB<br />

Obtain the next graphics feature for the picture............................................................168<br />

10 Contents 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

File Utilities ..................................................................................................................169<br />

Internal Routines...........................................................................................................169<br />

S2DELE<br />

Delete a member file from a master file .......................................................................170<br />

S2FLST<br />

List member files ..........................................................................................................171<br />

S2IZIM<br />

Initialize the Z-<strong>MAP</strong> Information Management System (ZIMS) and attach master files173<br />

S2LHIS<br />

List the history and ancestry of a member file..............................................................175<br />

S2MFAT<br />

Attach a master file indicating either read-only or read-write file access ....................177<br />

S5DAFU<br />

Obtain parameter, projection, and field information about a data file..........................178<br />

SIDFFD<br />

Set default field descriptors ..........................................................................................184<br />

SIDNFL<br />

Retrieve information about a member file from the runtime directory ........................187<br />

SIEZIM<br />

Close master files..........................................................................................................188<br />

SIFCLO<br />

Close a member file ......................................................................................................189<br />

SIFLDR<br />

Read a field descriptor ..................................................................................................190<br />

SIFLDW<br />

Write a field descriptor .................................................................................................192<br />

SIFRED<br />

Read a record from a member file ................................................................................194<br />

SIFWRT<br />

Write a record to a member file ....................................................................................195<br />

SIIZIM<br />

Initialize the Z-<strong>MAP</strong> Information Management System (ZIMS) and attach master files197<br />

SIMFAT<br />

Attach a master file .......................................................................................................198<br />

SIMFCM<br />

Compress a master file..................................................................................................199<br />

5000.0.0 Contents 11


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

SIMFCR<br />

Create a new master file................................................................................................200<br />

SIMFDT<br />

Detach one or all master files .......................................................................................202<br />

SIMFLS<br />

List attached master files ..............................................................................................203<br />

SIMFRN<br />

Rename the internal name of a master file ...................................................................204<br />

SINOPN<br />

Open a new member file...............................................................................................205<br />

SIOOPN<br />

Open an old member file ..............................................................................................206<br />

SIPRRC<br />

Read a general data or contour parameter record .........................................................207<br />

SIPRRD<br />

Read a data parameter record........................................................................................209<br />

SIPRRG<br />

Read a grid parameter record........................................................................................210<br />

SIPRWC<br />

Write a general data or contour parameter record ........................................................211<br />

SIPRWD<br />

Write a data parameter record.......................................................................................213<br />

SIPRWG<br />

Write a grid parameter record.......................................................................................214<br />

SIRDPO<br />

Position a member file for a sequential read.................................................................215<br />

SIRDRN<br />

Read from a member file at a random location ............................................................216<br />

SIRDSQ<br />

Read from a member file sequentially..........................................................................217<br />

SIRHIS<br />

Read history information from a member file ..............................................................218<br />

SIWHIS<br />

Write history records to a member file .........................................................................219<br />

SIWRPO<br />

Position a member file for a sequential write ...............................................................220<br />

12 Contents 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

SIWRRN<br />

Write to a member file at a random location ................................................................221<br />

SIWRSQ<br />

Write to a member file sequentially..............................................................................222<br />

Appendix A. ZIGS Overview ...............................................................................223<br />

ZIGS File Structure.......................................................................................................223<br />

Picture Components ...............................................................................................223<br />

Headers ..................................................................................................................224<br />

ZIGS Programmer’s Guide...........................................................................................226<br />

Input Graphics to a Picture ....................................................................................226<br />

Output Graphics from a Picture .............................................................................233<br />

Appendix B. ZIMS Overview...............................................................................235<br />

ZIMS File Structure ......................................................................................................236<br />

Master File .............................................................................................................236<br />

Member File ...........................................................................................................237<br />

ZIMS Programmer’s Guide ..........................................................................................242<br />

Creating a Member File .........................................................................................242<br />

Reading Data from an Existing ZIMS File ............................................................245<br />

Reading and Writing Grids ....................................................................................247<br />

Appendix C. Logical Unit Assignment .........................................................248<br />

Index ................................................................................................................................252<br />

5000.0.0 Contents 13


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Overview<br />

Purpose of This Guide<br />

Introduction<br />

The Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> (referred to as ZPI/O) is a set of<br />

FORTRAN-callable subroutines that can be linked into a non-<br />

<strong>Landmark</strong> program to perform functions available in Z-<strong>MAP</strong> <strong>Plus</strong>. The<br />

input control parameters are essentially the same as those required if<br />

the modules are used in Z-<strong>MAP</strong> <strong>Plus</strong>, and the results are identical since<br />

the same processing code is used in either case. Therefore, information<br />

generated by Z-<strong>MAP</strong> <strong>Plus</strong> or by the user-written program can be used<br />

interchangeably.<br />

This guide describes how to use ZPI/O in custom programs. Each of the<br />

ZPI/O subroutines is documented with appropriate programming notes.<br />

Sample programs are included, as are step-by-step guides for graphics<br />

and file management programming.<br />

This guide describes how to use the ZPI/O <strong>Access</strong> <strong>Library</strong> in custom<br />

programs. Each of the ZPI/O subroutines is documented with<br />

appropriate programming notes.<br />

The guide is intended to be read by experienced programmers who are<br />

accustomed to working with large-scale FORTRAN programs,<br />

particularly those relating to mapping and modeling geoscience data.<br />

1 Introduction: Purpose of This Guide 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

What Is in This Guide<br />

This programmer’s guide provides information about each of the<br />

following topics:<br />

Introduction (page 1) explains the purpose of this guide, who<br />

should read it, what is contained in it, what some of the<br />

conventions used are, and how to find more information.<br />

ZPI/O Overview (page 5) explains what the Z-<strong>MAP</strong> <strong>Plus</strong> I/O<br />

<strong>Access</strong> <strong>Library</strong> is, how the subroutine descriptions are structured,<br />

and how some of the most frequently used subroutines work.<br />

Sample programs and suggestions are also presented.<br />

Initialize/Terminate ZPI/O Environment (page 35) lists the<br />

subroutines used for initializing and terminating the ZPI/O<br />

environment.<br />

Transfer, Convert, or List Information (page 43) lists the<br />

subroutines used for converting data from one format to another,<br />

generating lists and reports, computing statistics for files, and<br />

transferring data between disk files and master files.<br />

Draw and Plot Features (page 69) lists the subroutines used for<br />

drawing lines from an array or member file, and displaying or<br />

plotting a picture.<br />

Graphics Utilities (page 77) lists the subroutines used for<br />

initializing and terminating the graphics environment, attaching<br />

and detaching graphics files, opening and closing pictures,<br />

designing and creating pictures from basic elements, and<br />

extracting graphics elements.<br />

File Utilities (page 169) lists subroutines used for initializing the<br />

information management environment; opening and closing<br />

master files; attaching, compressing, creating, detaching and<br />

listing master files; renaming the internal name of a master file;<br />

opening, closing, deleting, listing, reading, writing, and obtaining<br />

information from member files; positioning member files; and<br />

reading, writing, and setting defaults for field descriptors.<br />

Appendix A. ZIGS Overview (page 223) explains the file<br />

structure of the Zycor Interactive Graphics System (ZIGS) and<br />

steps for using ZIGS in ZPI/O application programs.<br />

5000.0.0 Introduction: What Is in This Guide 2


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Typographic Conventions<br />

Appendix B. ZIMS Overview (page 235) explains the file<br />

structure of the Zycor Information Management System (ZIMS)<br />

and steps for using ZIMS in ZPI/O application programs.<br />

Appendix C. Logical Unit Assignment (page 248) lists the<br />

logical FORTRAN units used throughout ZPI/O.<br />

The Index (page 252) references the function of the subroutines,<br />

such as write or terminate, and the objects that are acted on, such<br />

as master file or line.<br />

To make the information in this guide as accessible as possible, the<br />

following conventions are observed throughout:<br />

Examples of text you type in or text displayed on the screen are in<br />

a typewriter-style font, such as:<br />

’ ****** SIISIL - ERROR, PROBLEM OPENING FILES ’<br />

A portion of an example of text you type in that is to be replaced<br />

by a user value is presented in italic typewriter-style font, such as:<br />

COMMON/WRKSPC/IWORK(n)<br />

Some acronyms and abbreviations are used throughout this guide:<br />

ZPI/O Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

ZIGS Zycor Interactive Graphics System<br />

ZIMS Zycor Information Management System<br />

LGB logical graphics block, known in Z-<strong>MAP</strong> <strong>Plus</strong> as<br />

graphics feature<br />

ZGF Zycor graphics file<br />

MFD Zycor master file<br />

in or cm inches or centimeters, alternative measurements for<br />

plotter units<br />

3 Introduction: Typographic Conventions 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Related Documentation<br />

The following guides are available from your system administrator or<br />

<strong>Landmark</strong> representative.<br />

• Z-<strong>MAP</strong> <strong>Plus</strong> Installation and Configuration<br />

Each of these guides contains appendixes with information you may<br />

find useful for structuring a custom program.<br />

ZCL Operator’s Manual presents the Zycor Command Language<br />

ZCL) and shows you how to start the program and use process<br />

statements to write a command stream for generating a variety of<br />

maps. The ZCL Operator’s Manual covers all parameters for all<br />

processes available in ZCL.<br />

Z-<strong>MAP</strong> <strong>Plus</strong> Reference Guide provides easy access to reference<br />

information about the tasks and subtasks of the Z-<strong>MAP</strong> <strong>Plus</strong><br />

program. Overview workflows, tables, and selected screen<br />

captures supplement the text to assist you in understanding how to<br />

use each task.<br />

5000.0.0 Introduction: Related Documentation 4


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Introduction<br />

ZPI/O Overview<br />

The Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> (referred to as ZPI/O) is a set of<br />

FORTRAN-callable subroutines that can be linked into a<br />

non-<strong>Landmark</strong> program to perform functions available in Z-<strong>MAP</strong> <strong>Plus</strong>.<br />

The input control parameters are essentially the same as those required<br />

if the modules are used in Z-<strong>MAP</strong> <strong>Plus</strong>, and the results are identical<br />

since the same processing code is used in either case. Therefore,<br />

information generated by Z-<strong>MAP</strong> <strong>Plus</strong> or by the user-written program<br />

can be used interchangeably.<br />

The routines included in the ZPI/O <strong>Access</strong> <strong>Library</strong> are compiled under<br />

FORTRAN 77. Every reasonable effort has been made to minimize<br />

system dependencies—if they do exist, they are localized.<br />

This section contains information about the following topics:<br />

Structure of Programs Using ZPI/O (page 6) outlines the<br />

general structure of programs using ZPI/O and presents example<br />

programs for listing members of a master file, creating simple<br />

graphics, and testing the input graphics routines.<br />

Subroutine Descriptions (page 25) describes the presentation of<br />

the subroutines.<br />

Comments and Suggestions (page 29) includes general<br />

information about ZPI/O and the debug and status flag options,<br />

and suggestions for programming basic procedures.<br />

5 ZPI/O Overview: Introduction 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Structure of Programs Using ZPI/O<br />

To help you write a program using ZPI/O routines, this topic includes<br />

an outline of the general structure of a program and an example<br />

program.<br />

General Structure of Programs Using ZPI/O<br />

The following outline briefly describes the structure of a program<br />

which uses ZPI/O. This should serve as a guide and not as a fixed<br />

structure, but the general sequence of events must be preserved for<br />

ZPI/O to function properly.<br />

I. Initialization<br />

A. Initialize the ZPI/O environment – SICOMM or SIISIL<br />

B. ZIMS initialization, initialize master files – SIIZIM<br />

C. ZIGS initialization – SIIZIG<br />

II. File Utilities<br />

A. Open new dataset – SINOPN<br />

B. Write field descriptors – SIFLDW<br />

C. Read data – SIFRED<br />

D. Write data – SIFWRT<br />

E. Write parameter record – SIPRWD, SIPRWG or SIPRWC<br />

F. Close dataset – SIFCLO<br />

III. Graphics Features<br />

A. Open graphics file – SIIZGF<br />

B. Open picture – S3IPIC, S2NPIC, S2OPIC or SIRPIC<br />

C. Graphics – Draw and Plot Features or Graphics Utilities<br />

D. Close picture – SIEPIC<br />

E. Close graphics file – SIEZGF<br />

IV. Termination<br />

A. Close graphics – SIEZIG<br />

B. Terminate ZPI/O environment – SIIESIL<br />

5000.0.0 ZPI/O Overview: Structure of Programs Using ZPI/O 6


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Sequence of Calls to Read or Write a ZIMS File<br />

Typical sequence of calls to write and read a ZIMS file.<br />

Writing:<br />

SINOPN to create and open the file<br />

SIWRPO to make sure file is positioned correctly, IWORD=1<br />

SIWRSQ repeatedly to write data. Usually NWORDS is same as<br />

record size.<br />

alternatively SIFWRT or SIWRRN can sometimes be useful<br />

after all data is written:<br />

SIFLDW for each field of a data file<br />

SIPRWD write a parameter record, SIPRWG if this is a grid file<br />

except that if this file has more than 24 fields, the field descriptors<br />

must be written before any data is written (SIFLDW) but can be<br />

written with dummy data then overwritten. SIWRPO should be<br />

called before calls to SIWRSQ.<br />

SIFCLO close file, update MFD headers<br />

Reading:<br />

SIOOPN to open existing file<br />

SIPRRD to read the parameter record (SIPRRG for grids)<br />

SIFLDR can be used to read field descriptors (name of fields, etc.)<br />

before or after the data (or any time) but the file may need to be<br />

repositioned with SIRDPO. This info may not be needed and the<br />

calls can be skipped<br />

SIRDPO with IWORD=1 to make sure file is positioned correctly<br />

typically a loop reading NRECS (from SIPRRD) records of<br />

NWORDS (from SIPRRD) words each is performed using<br />

SIRDSQ to read data<br />

alternatively SIRDRN or SIFRED may be used<br />

for grids, you may want to loop on NCOLS and NROWS from<br />

SIPRRG<br />

SIFCLO to close the file and free up the buffer, only 5 of which are<br />

available<br />

5000.0.0 ZPI/O Overview: Contents 7


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Example Program for Listing Members of a Master File<br />

This short example program illustrates the minimum that must be done<br />

to work with master files (MFDs). This program assumes that an MFD<br />

was created elsewhere. It does the necessary initialization, then lists the<br />

contents of the MFD. It then lists the contents of one file. It assumes<br />

that the name of the file is known. (For example, the listing just done<br />

gives the name of the file.)<br />

This example is written on a Unix system and assumes that variables<br />

not explicitly initialized are set to zero.<br />

C<br />

C SAMPLE ZPIO PROGRAM TO LIST A MEMBER FILE<br />

C<br />

COMMON /WRKSPC/IWORK(30000)<br />

C<br />

CHARACTER *80 NAMMFD(4)<br />

C<br />

DATA IDBUG /1/<br />

C VARIABLES FOR S2FLST<br />

CHARACTER * 7 REPORT<br />

CHARACTER *24 NAME<br />

CHARACTER *4 TYPES<br />

LOGICAL BYNAME, BYTYPE<br />

C VARIABLES FOR SILIST<br />

CHARACTER *24 NAMIDA<br />

CHARACTER *80 RPTITL<br />

CHARACTER *20 ICLHDR(10)<br />

CHARACTER *20 IFDFMT(10)<br />

C<br />

C INITIALIZE SYSTEM-WIDE COMMON STORAGE<br />

C<br />

IDBUG = 0<br />

LTHWRK = 30000<br />

LUNINF = 6<br />

LUNSTA = 6<br />

LUNWAR = 6<br />

LUNERO = 6<br />

LUNBUG = 6<br />

IPROC = 0<br />

CALL SIISIL(IDBUG, LTHWRK, LUNINF, LUNSTA, LUNWAR,<br />

. LUNERO, LUNBUG, LUNDM1, LUNDM2, IPROC, ISTAT)<br />

C<br />

C INITIALIZE ZIMS<br />

C NAME OF MFD TO ATTACH<br />

C NON UNIX SYSTEMS MAY NAME THE MFD IN A DIFFERENT MANNER<br />

NAMMFD(1) = ’/zplus1/users/wow/zpio/zpio.mfd’<br />

MFDNUM = 1<br />

LUNDRC = 20<br />

CALL SIIZIM(NAMMFD, MFDNUM, LUNDRC, ISTAT)<br />

8 ZPI/O Overview: Contents 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

C<br />

C LIST FILES ON MFD<br />

REPORT = ’SUMMARY’<br />

NAME = ’ ’<br />

TYPES = ’ ’<br />

BYNAME = .FALSE.<br />

BYTYPE = .FALSE.<br />

NUMTYP = 0<br />

LUNRPT = 0<br />

C S2FLST DOESNT INITIALIZE ISTAT<br />

ISTAT = 0<br />

CALL S2FLST(REPORT, NAME, TYPES, BYNAME, BYTYPE, NUMTYP,<br />

X LUNRPT, ISTAT)<br />

IF (ISTAT .NE. 0) WRITE(LUNBUG, 20) ISTAT<br />

20 FORMAT(’ ZPIO DEMO S2FLST RETURNS ISTAT OF ’,I5)<br />

C<br />

C LIST A DATA FILE (ASSUME UNITIALIZED VARIABLES ARE ZERO)<br />

C THIS NAME FOR A FILE COULD BE GOTTEN FROM THE PREVIOUS LISTING<br />

NAMIDA = ’well data’<br />

RPTITL = ’ sample report’<br />

DO 30 I=1,10<br />

ICLHDR(I) = ’ ’<br />

IFDFMT(I) = ’ ’<br />

30 CONTINUE<br />

MFDIDA = 1<br />

LOGRPT = 6<br />

ISTART = 1<br />

CALL SILIST(NAMIDA, RPTITL, LINARA, ICLHDR, IFDFMT, MFDIDA,<br />

1 IHISDA, LOGRPT, NUMLIN, LSTTYP, ISTART, IEND, NUMFLD,<br />

2 ICLWID, IFDINX, IWDINX, WIDMIN, WIDMAX, ISTAT)<br />

IF (ISTAT .NE. 0) WRITE(LUNBUG, 40) ISTAT<br />

40 FORMAT(’ ZPIO DEMO SILIST RETURNS ISTAT OF ’,I5)<br />

C<br />

C TERMINATION<br />

CALL SIESIL(ISTAT)<br />

C REMOVE LOCK FILES FOR MFDS (FOR UNIX SYSTEMS)<br />

CALL SIEZIM<br />

STOP<br />

END<br />

5000.0.0 ZPI/O Overview: Contents 9


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Example Program for Creating Graphics<br />

This is a short example of creating graphics. A graphics file and picture<br />

are created, and a few lines and some short text is displayed.<br />

This was created on a Unix system, and assumes that uninitialized<br />

variables are set to zero.<br />

The results could be viewed in a <strong>Landmark</strong> program such as<br />

Z-<strong>MAP</strong> <strong>Plus</strong> or plotted on a hardcopy device.<br />

C<br />

C SAMPLE ZPIO PROGRAM TO DRAW SIMPLE GRAPHICS<br />

C THE CREATED ZGF CAN BE DISPLAYED WITH OTHER LANDMARK PRODUCTS<br />

C OR PLOTTED TO A HARDCOPY DEVICE.<br />

C ASSUMES UNINITIALIZED VARIABLES ARE SET TO ZERO.<br />

C<br />

COMMON /WRKSPC/IWORK(30000)<br />

C<br />

C TURN DEBUG PRINTS ON OR OFF<br />

DATA IDBUG /1/<br />

C<br />

C VARIABLES FOR SIIZGF<br />

CHARACTER * 80 ZGFNAM<br />

CHARACTER * 80 HISNEW, HISOLD<br />

CHARACTER * 3 NEWZGF<br />

C VARIABLES FOR S3IPIC<br />

CHARACTER * 80 PICNAM<br />

CHARACTER * 3 IFOLD<br />

DOUBLE PRECISION VXMIN, VXMAX, VYMIN, VYMAX<br />

C VARIABLES FOR SIGLIN<br />

DIMENSION XCORS(10), YCORS(10)<br />

C VARIABLE FOR SIGTXT<br />

CHARACTER *80 TEXT<br />

C<br />

C INITIALIZE SYSTEM-WIDE COMMON STORAGE<br />

C<br />

C IDBUG = 0<br />

LTHWRK = 30000<br />

LUNINF = 6<br />

LUNSTA = 6<br />

LUNWAR = 6<br />

LUNERO = 6<br />

LUNBUG = 6<br />

IPROC = 0<br />

CALL SIISIL(IDBUG, LTHWRK, LUNINF, LUNSTA, LUNWAR,<br />

. LUNERO, LUNBUG, LUNDM1, LUNDM2, IPROC, ISTAT)<br />

C<br />

CALL SIIZIG<br />

10 ZPI/O Overview: Contents 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

C<br />

C CREATE AND OPEN A ZGF<br />

C FOR NON UNIX SYSTEMS, THIS MAY LOOK DIFFERENT<br />

ZGFNAM = ’/zplus1/users/wow/zpio/zpio.zgf’<br />

NEWZGF = ’NEW’<br />

HISNEW = ’TESTING ZPIO INPUT GRAPHICS ROUTINES’<br />

C<br />

CALL SIIZGF (ZGFNAM, HISNEW, NEWZGF, HISOLD, ISTAT)<br />

IF (ISTAT .GT. 0) THEN<br />

WRITE(LUNBUG, 100) ISTAT<br />

100 FORMAT(’zpiodraw siizgf returns istat ’,i5)<br />

GO TO 800<br />

END IF<br />

C<br />

C OPEN A NEW PICTURE<br />

PICNAM = ’HELLO WORLD ON A PICTURE’<br />

IFOLD = ’NEW’<br />

IFABSC = 0<br />

IFPRJ = 1<br />

IBRTIP = 2<br />

XOFFST = 1.0<br />

FREEX = 1.0<br />

YOFFST = 1.0<br />

FREEY = 1.0<br />

VXMIN = 0.0<br />

VXMAX = 10.0<br />

VYMIN = 0.0<br />

VYMAX = 10.0<br />

XSC<strong>MAP</strong> = 1.0<br />

YSC<strong>MAP</strong> = 1.0<br />

XLONG = 10.0<br />

YLONG = 10.0<br />

C<br />

CALL S3IPIC (PICNAM, IFOLD, IFABSC, IFPRJ, IBRTIP,<br />

1 IABSSC, LONMND, LONMNM, LONMNS, LONMXD,<br />

2 LONMXM, LONMXS, LATMND, LATMNM, LATMNS,<br />

3 LATMXD, LATMXM, LATMXS, IHEM, IUTMCD,<br />

4 IPJCOD, ISPCOD, IUNCOD, IRADTY VXMIN,<br />

5 VXMAX, VYMIN, VYMAX, XOFFST, FREEX,<br />

6 YOFFST, FREEY, XSC<strong>MAP</strong>, YSC<strong>MAP</strong>, XLONG,<br />

7 YLONG, BOTPAR, TOPPAR, REFLAT, SFLAT,<br />

8 REFLON, SFLON, FNORTH, FEAST, UNTFAC,<br />

9 AXISA, AXISB, AZMTH, SCALE, XLNVEW,<br />

. YLNVEW, ISTAT )<br />

IF (ISTAT .GT. 0) THEN<br />

WRITE(LUNBUG, 200) ISTAT<br />

200 FORMAT(’ZPIODRAW S3IPIC RETURNS ISTAT OF ’,I5)<br />

GO TO 800<br />

END IF<br />

C<br />

C OPEN PICTURE SEGMENT<br />

5000.0.0 ZPI/O Overview: Contents 11


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

C<br />

LGBTYP = 1<br />

CALL SIGSOP(LGBTYP, ISTAT)<br />

IF (ISTAT .GT. 0) THEN<br />

WRITE(LUNBUG, 350) ISTAT<br />

350 FORMAT(’ZPIODRAW SIGSOP RETURNS ISTAT OF ’,I5)<br />

GO TO 800<br />

END IF<br />

C<br />

C SET DEFAULTS<br />

C<br />

KTXTCL = 7<br />

KIXTJU = 3<br />

KTXTFO = 2<br />

HTTEXT = .5<br />

CALL SIGPDF(<br />

1 KLNCLR, KLNTYP, KMKCLR, KMKTYP, KTXTCL,<br />

2 KTXTFO, KTXTJU, KPOLCL, KSCLTY, WDLINE,<br />

3 HTMARK, HTTEXT, ROTEXT, DSHLEN, DSHGAP,<br />

4 HSHLEN, HSHGAP, HSHWAY, ISTAT)<br />

IF (ISTAT .GT. 0) THEN<br />

WRITE(LUNBUG, 300) ISTAT<br />

300 FORMAT(’ZPIODRAW SIGPDF RETURNS ISTAT OF ’,I5)<br />

GO TO 800<br />

END IF<br />

C<br />

C DRAW A BORDER USING LINES<br />

C<br />

NUMPTS = 5<br />

XCORS(1) = 1.0<br />

YCORS(1) = 1.0<br />

XCORS(2) = 11.0<br />

YCORS(2) = 1.0<br />

XCORS(3) = 11.0<br />

YCORS(3) = 11.0<br />

XCORS(4) = 1.0<br />

YCORS(4) = 11.0<br />

XCORS(5) = 1.0<br />

YCORS(5) = 1.0<br />

CALL SIGLIN(NUMPTS, XCORS, YCORS, ISTAT )<br />

IF (ISTAT .GT. 0) THEN<br />

WRITE(LUNBUG, 360) ISTAT<br />

360 FORMAT(’ZPIODRAW SIGLIN RETURNS ISTAT OF ’,I5)<br />

END IF<br />

C<br />

12 ZPI/O Overview: Contents 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

C DRAW TEXT<br />

C<br />

NUMCHR = 11<br />

XCORS(1) = 4.0<br />

YCORS(1) = 5.0<br />

TEXT = ’HELLO WORLD’<br />

CALL SIGTXT(TEXT, NUMCHR, XCORS(1), YCORS(1), ISTAT )<br />

IF (ISTAT .GT. 0) WRITE(LUNBUG, 370) ISTAT<br />

370 FORMAT(’ZPIODRAW: SIGTXT ISTAT’,I3,’ GRAPHICS FEATURE NOT OPEN’)<br />

C<br />

C CLOSE GRAPHIC SEGMENT<br />

C<br />

CALL SIGSCL(ISTAT)<br />

IF (ISTAT .GT. 0) THEN<br />

WRITE(LUNBUG, 400) ISTAT<br />

400 FORMAT(’ZPIODRAW SIGSCL RETURNS ISTAT OF ’,I5)<br />

END IF<br />

C<br />

800 CONTINUE<br />

C CLOSE THE PICTURE<br />

C<br />

CALL SIEPIC (ISTAT)<br />

IF (ISTAT .GT. 0) THEN<br />

WRITE(LUNBUG, 500) ISTAT<br />

500 FORMAT(’ZPIODRAW SIEPIC ISTAT’,I5,’ ERROR CLOSING PICTURE’)<br />

END IF<br />

C<br />

C TERMINATION<br />

CALL SIESIL(ISTAT)<br />

STOP<br />

END<br />

5000.0.0 ZPI/O Overview: Contents 13


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Example Program TSGRAP for Input Graphics<br />

The results of this example program could be plotted on a hardcopy<br />

device or displayed in a <strong>Landmark</strong> program such as Z-<strong>MAP</strong> <strong>Plus</strong>.<br />

C PURPOSE: TEST THE INPUT GRAPHICS ROUTINES<br />

C<br />

COMMON /WRKSPC/ IWORK(30000)<br />

C<br />

CHARACTER *6 NAMRET<br />

PARAMETER (NAMRET = ’TSGRAP’)<br />

C<br />

CHARACTER *80 ZGFNAM, HISNEW, PICNAM, NAMMFD (4), HISOLD<br />

CHARACTER *24 NAMZIM, ZNAME<br />

CHARACTER * 3 IFOLD, NEWZGF<br />

CHARACTER *20 TEXT<br />

C<br />

DOUBLE PRECISION VXMIN, VXMAX, VYMIN, VYMAX<br />

C<br />

DIMENSION XCORS(10), YCORS(10)<br />

C<br />

DATA NOMFDS/1/, LUNDIR/20/, LTHWRK/30000/, IDBUG /1/, IPROC/0/<br />

DATA LUNINF/6/, LUNSTA/6/, LUNWAR/6/, LUNERO/6/, LUNBUG/6/<br />

DATA LUNDM1/0/, LUNDM2/0/<br />

C<br />

WRITE(LUNBUG,9992)<br />

9992 FORMAT(//,25X,’ THIS ROUTINE TESTS ’,/,<br />

.’ TEST THE INPUT GRAPHICS ROUTINES ’)<br />

C<br />

C INITIALIZE SYSTEM-WIDE COMMON STORAGE<br />

C<br />

CALL SIISIL(IDBUG, LTHWRK, LUNINF, LUNSTA, LUNWAR,<br />

. LUNERO, LUNBUG, LUNDM1, LUNDM2, IPROC, ISTAT)<br />

C<br />

CALL SIIZIG<br />

C<br />

C IFNEW - 0, OLD GRAPHICS FILE<br />

C - 1, NEW GRAPHICS FILE<br />

C XOFSET - BORDER WIDTH AROUND LEFT OF <strong>MAP</strong>. UNITS PER INCH.<br />

C XFREE - BORDER WIDTH AROUND RIGHT OF <strong>MAP</strong>. UNITS PER INCH.<br />

C YOFSET - BORDER WIDTH BELOW <strong>MAP</strong>, UNITS/INCH.<br />

C YFREE - BORDER WIDTH ABOVE <strong>MAP</strong>, UNITS/INCH.<br />

C XVEWLN = XOFSET+XLENGH+XFREE (OUTPUT ONLY)<br />

C YVEWLN = YOFSET+YLENGH+YFREE (OUTPUT ONLY)<br />

C<br />

IF(IDBUG .EQ. 1) WRITE(LUNBUG, 1001)<br />

1001 FORMAT(15X,’ ****** BEGINNING OF PICTURE ONE ****** ’)<br />

C<br />

C ON A NON UNIX SYSTEM, THIS MAY LOOK DIFFERENT<br />

ZGFNAM = ’/zplus1/users/wow/zpio/TSGRAP.ZGF’<br />

NEWZGF = ’NEW’<br />

HISNEW = ’TESTING ZPIO INPUT GRAPHICS ROUTINES’<br />

C<br />

CALL SIIZGF (ZGFNAM, HISNEW, NEWZGF, HISOLD, ISTAT)<br />

IF (ISTAT .GT. 0) GO TO 800<br />

14 ZPI/O Overview: Contents 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

C<br />

PICNAM = ’DEFAULT GRAPHICS ’<br />

IFOLD = ’NEW’<br />

IFABSC = 0<br />

IFPRJ = 1<br />

IBRTIP = 2<br />

IABSSC = 0<br />

LONMND = 0<br />

LONMNM = 0<br />

LONMNS = 0<br />

LONMXD = 0<br />

LONMXM = 0<br />

LONMXS = 0<br />

LATMND = 0<br />

LATMNM = 0<br />

LATMNS = 0<br />

LATMXD = 0<br />

LATMXM = 0<br />

LATMXS = 0<br />

IHEM = 0<br />

IUTMCD = 0<br />

IPJCOD = 0<br />

ISPCOD = 0<br />

IUNCOD = 0<br />

IRADTY = 0<br />

XOFFST = 1.0<br />

FREEX = 1.0<br />

YOFFST = 1.0<br />

FREEY = 1.0<br />

VXMIN = 0.0<br />

VXMAX = 10.0<br />

VYMIN = 0.0<br />

VYMAX = 10.0<br />

XSC<strong>MAP</strong> = 1.0<br />

YSC<strong>MAP</strong> = 1.0<br />

XLONG = 10.0<br />

YLONG = 10.0<br />

BOTPAR = 0.0<br />

TOPPAR = 0.0<br />

REFLAT = 0.0<br />

SFLAT = 0.0<br />

REFLON = 0.0<br />

SFLON = 0.0<br />

FNORTH = 0.0<br />

FEAST = 0.0<br />

UNTFAC = 0.0<br />

AXISA = 0.0<br />

AXISB = 0.0<br />

AZMTH = 0.0<br />

SCALE = 0.0<br />

XLNVEW = 0.0<br />

YLNVEW = 0.0<br />

5000.0.0 ZPI/O Overview: Contents 15


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

C<br />

CALL S3IPIC (PICNAM, IFOLD, IFABSC, IFPRJ, IBRTIP,<br />

1 IABSSC, LONMND, LONMNM, LONMNS, LONMXD,<br />

2 LONMXM, LONMXS, LATMND, LATMNM, LATMNS,<br />

3 LATMXD, LATMXM, LATMXS, IHEM, IUTMCD,<br />

4 IPJCOD, ISPCOD, IUNCOD, IRDATY VXMIN,<br />

5 VXMAX, VYMIN, VYMAX, XOFFST, FREEX,<br />

6 YOFFST, FREEY, XSC<strong>MAP</strong>, YSC<strong>MAP</strong>, XLONG,<br />

7 YLONG, BOTPAR, TOPPAR, REFLAT, SFLAT,<br />

8 REFLON, SFLON, FNORTH, FEAST, UNTFAC,<br />

9 AXISA, AXISB, AZMTH, SCALE, XLNVEW,<br />

. YLNVEW, ISTAT )<br />

IF (ISTAT .GT. 0) GO TO 800<br />

C<br />

C SET DEFAULTS<br />

C<br />

CALL SIGPDF(<br />

1 KLNCLR, KLNTYP, KMKCLR, KMKTYP, KTXTCL,<br />

2 KTXTFO, KTXTJU, KPOLCL, KSCLTY, WDLINE,<br />

3 HTMARK, HTTEXT, ROTEXT, DSHLEN, DSHGAP,<br />

4 HSHLEN, HSHGAP, HSHWAY, ISTAT)<br />

IF (ISTAT .GT. 0) GO TO 800<br />

C<br />

C OPEN BORDER PICTURE SEGMENT<br />

C<br />

LGBTYP = 1<br />

CALL SIGSOP(LGBTYP, ISTAT)<br />

IF (ISTAT .GT. 0) GO TO 800<br />

C<br />

C DO A BORDER USING LINES<br />

C<br />

NUMPTS = 5<br />

XCORS(1) = 1.0<br />

YCORS(1) = 1.0<br />

XCORS(2) = 11.0<br />

YCORS(2) = 1.0<br />

XCORS(3) = 11.0<br />

YCORS(3) = 11.0<br />

XCORS(4) = 1.0<br />

YCORS(4) = 11.0<br />

XCORS(5) = 1.0<br />

YCORS(5) = 1.0<br />

C<br />

CALL SIGLIN(NUMPTS, XCORS, YCORS, ISTAT )<br />

IF (ISTAT .GT. 0) GO TO 800<br />

C<br />

C CLOSE GRAPHIC SEGMENT<br />

C<br />

CALL SIGSCL(ISTAT)<br />

IF (ISTAT .GT. 0) GO TO 800<br />

C<br />

C OPEN POLYGON LINES PICTURE SEGMENT<br />

C<br />

LGBTYP = 7<br />

CALL SIGSOP(LGBTYP, ISTAT)<br />

IF (ISTAT .GT. 0) GO TO 800<br />

C<br />

C DO A MARKERS AND LINES USING LINES<br />

16 ZPI/O Overview: Contents 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

C<br />

C<br />

C<br />

NUMMRK = 3<br />

XCORS(1) = 2.0<br />

YCORS(1) = 6.0<br />

XCORS(2) = 10.0<br />

YCORS(2) = 6.0<br />

XCORS(3) = 6.0<br />

YCORS(3) = 10.0<br />

CALL SIGMRK(NUMMRK, XCORS, YCORS, ISTAT )<br />

IF (ISTAT .GT. 0) GO TO 800<br />

NUMPTS = 2<br />

XCORS(1) = 2.50<br />

YCORS(1) = 6.0<br />

XCORS(2) = 9.50<br />

YCORS(2) = 6.0<br />

CALL SIGLIN(NUMPTS, XCORS, YCORS, ISTAT )<br />

IF (ISTAT .GT. 0) GO TO 800<br />

XCORS(1) = 9.50<br />

YCORS(1) = 6.50<br />

XCORS(2) = 6.50<br />

YCORS(2) = 9.50<br />

CALL SIGLIN(NUMPTS, XCORS, YCORS, ISTAT )<br />

IF (ISTAT .GT. 0) GO TO 800<br />

XCORS(1) = 5.50<br />

YCORS(1) = 9.50<br />

XCORS(2) = 2.50<br />

YCORS(2) = 6.50<br />

CALL SIGLIN(NUMPTS, XCORS, YCORS, ISTAT )<br />

IF (ISTAT .GT. 0) GO TO 800<br />

C<br />

C CLOSE GRAPHIC SEGMENT<br />

C<br />

CALL SIGSCL(ISTAT)<br />

IF (ISTAT .GT. 0) GO TO 800<br />

C<br />

C OPEN TEXT PICTURE SEGMENT<br />

C<br />

LGBTYP = 6<br />

CALL SIGSOP(LGBTYP, ISTAT)<br />

IF (ISTAT .GT. 0) GO TO 800<br />

C<br />

C DO TEXT<br />

C<br />

NUMCHR = 20<br />

XCORS(1) = 3.0<br />

IF (ISTAT .GT. 0) GO TO 800<br />

XCORS(1) = 5.50<br />

YCORS(1) = 9.50<br />

XCORS(2) = 2.50<br />

YCORS(2) = 6.50<br />

CALL SIGLIN(NUMPTS, XCORS, YCORS, ISTAT )<br />

IF (ISTAT .GT. 0) GO TO 800<br />

C<br />

C CLOSE GRAPHIC SEGMENT<br />

5000.0.0 ZPI/O Overview: Contents 17


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

C<br />

CALL SIGSCL(ISTAT)<br />

IF (ISTAT .GT. 0) GO TO 800<br />

C<br />

C OPEN TEXT PICTURE SEGMENT<br />

C<br />

LGBTYP = 6<br />

CALL SIGSOP(LGBTYP, ISTAT)<br />

IF (ISTAT .GT. 0) GO TO 800<br />

C<br />

C DO TEXT<br />

C<br />

NUMCHR = 20<br />

XCORS(1) = 3.0<br />

YCORS(1) = 5.0<br />

TEXT = ’TEST INPUT GRAPHICS’<br />

C 123456789 123456789<br />

C<br />

CALL SIGTXT(TEXT, NUMCHR, XCORS(1), YCORS(1), ISTAT )<br />

IF (ISTAT .GT. 0) GO TO 800<br />

C<br />

NUMCHR = 4<br />

XCORS(1) = 5.50<br />

YCORS(1) = 7.0<br />

TEXT = ’HI! ’<br />

C<br />

CALL SIGTXT(TEXT, NUMCHR, XCORS(1), YCORS(1), ISTAT )<br />

IF (ISTAT .GT. 0) GO TO 800<br />

C<br />

C CLOSE GRAPHIC SEGMENT<br />

C<br />

CALL SIGSCL(ISTAT)<br />

IF (ISTAT .GT. 0) GO TO 800<br />

C<br />

C OPEN POLYGON FILE PICTURE SEGMENT<br />

C<br />

LGBTYP = 30<br />

CALL SIGSOP(LGBTYP, ISTAT)<br />

IF (ISTAT .GT. 0) GO TO 800<br />

C<br />

C DO A BORDER USING LINES<br />

C<br />

NUMVTX = 5<br />

XCORS(1) = 4.50<br />

YCORS(1) = 6.50<br />

XCORS(2) = 7.50<br />

YCORS(2) = 6.50<br />

XCORS(3) = 7.50<br />

YCORS(3) = 8.0<br />

XCORS(4) = 4.50<br />

YCORS(4) = 8.0<br />

XCORS(5) = 4.50<br />

YCORS(5) = 6.50<br />

write(6, 133)<br />

133 format(’ a ’)<br />

18 ZPI/O Overview: Contents 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

C<br />

CALL SIGPFL(NUMVTX, XCORS, YCORS, ISTAT )<br />

IF (ISTAT .GT. 0) GO TO 800<br />

C<br />

C CLOSE GRAPHIC SEGMENT<br />

C<br />

CALL SIGSCL(ISTAT)<br />

IF (ISTAT .GT. 0) GO TO 800<br />

C<br />

C CLOSE THE FIRST PICTURE<br />

C<br />

CALL SIEPIC (ISTAT)<br />

IF (ISTAT .NE. 0) GO TO 800<br />

C<br />

IF(IDBUG .EQ. 1) THEN<br />

WRITE(LUNBUG,1002)<br />

1002 FORMAT(15X,’ ***** END OF FIRST PICTURE ****** ’)<br />

WRITE(LUNBUG, 2001)<br />

2001 FORMAT(15X,’ ***** BEGINNING OF SECOND PICTURE ****** ’)<br />

ENDIF<br />

C<br />

PICNAM = ’SETTING GRAPHICS ’<br />

IFOLD = ’NEW’<br />

IFABSC = 0<br />

IFPRJ = 1<br />

IBRTIP = 2<br />

IABSSC = 0<br />

LONMND = 0<br />

LONMNM = 0<br />

LONMNS = 0<br />

LONMXD = 0<br />

LONMXM = 0<br />

LONMXS = 0<br />

LATMND = 0<br />

LATMNM = 0<br />

LATMNS = 0<br />

LATMXD = 0<br />

LATMXM = 0<br />

LATMXS = 0<br />

IHEM = 0<br />

IUTMCD = 0<br />

IPJCOD = 0<br />

ISPCOD = 0<br />

XOFFST = 1.0<br />

FREEX = 1.0<br />

YOFFST = 1.0<br />

FREEY = 1.0<br />

IRADTY = 0<br />

VXMIN = 0.0<br />

VXMAX = 10.0<br />

VYMIN = 0.0<br />

VYMAX = 10.0<br />

XSC<strong>MAP</strong> = 1.0<br />

YSC<strong>MAP</strong> = 1.0<br />

XLONG = 10.0<br />

YLONG = 10.0<br />

BOTPAR = 0.0<br />

TOPPAR = 0.0<br />

REFLAT = 0.0<br />

SFLAT = 0.0<br />

5000.0.0 ZPI/O Overview: Contents 19


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

C<br />

REFLON = 0.0<br />

SFLON = 0.0<br />

FNORTH = 0.0<br />

FEAST = 0.0<br />

UNTFAC = 0.0<br />

AXISA = 0.0<br />

AXISB = 0.0<br />

AZMTH = 0.0<br />

SCALE = 0.0<br />

XLNVEW = 0.0<br />

YLNVEW = 0.0<br />

CALL S3IPIC (PICNAM, IFOLD, IFABSC, IFPRJ, IBRTIP,<br />

1 IABSSC, LONMND, LONMNM, LONMNS, LONMXD,<br />

2 LONMXM, LONMXS, LATMND, LATMNM, LATMNS,<br />

3 LATMXD, LATMXM, LATMXS, IHEM, IUTMCD,<br />

4 IPJCOD, ISPCOD, IUNCOD, IRADTY VXMIN,<br />

5 VXMAX, VYMIN, VYMAX, XOFFST, FREEX,<br />

6 YOFFST, FREEY, XSC<strong>MAP</strong>, YSC<strong>MAP</strong>, XLONG,<br />

7 YLONG, BOTPAR, TOPPAR, REFLAT, SFLAT,<br />

8 REFLON, SFLON, FNORTH, FEAST, UNTFAC,<br />

9 AXISA, AXISB, AZMTH, SCALE, XLNVEW,<br />

. YLNVEW, ISTAT )<br />

IF (ISTAT .GT. 0) GO TO 800<br />

C<br />

C SET DEFAULTS<br />

C<br />

CALL SIGPDF(<br />

1 KLNCLR, KLNTYP, KMKCLR, KMKTYP, KTXTCL,<br />

2 KTXTFO, KTXTJU, KPOLCL, KSCLTY, WDLINE,<br />

3 HTMARK, HTTEXT, ROTEXT, DSHLEN, DSHGAP,<br />

4 HSHLEN, HSHGAP, HSHWAY, ISTAT)<br />

IF (ISTAT .GT. 0) GO TO 800<br />

C<br />

C OPEN BORDER PICTURE SEGMENT<br />

C<br />

LGBTYP = 1<br />

CALL SIGSOP(LGBTYP, ISTAT)<br />

IF (ISTAT .GT. 0) GO TO 800<br />

C<br />

C SET SPECIAL LINE PARAMETERS<br />

C<br />

DSHLEN = 0.4<br />

DSHGAP = 0.2<br />

HSHLEN = 0.1<br />

HSHGAP = 0.2<br />

HSHWAY = -1.0<br />

CALL SIGLPM( DSHLEN, DSHGAP, HSHLEN, HSHGAP, HSHWAY, ISTAT)<br />

IF(ISTAT .GT. 0) GO TO 800<br />

C<br />

C SET LINE COLOR, LINE TYPE, AND LINE WIDTH<br />

20 ZPI/O Overview: Contents 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

C<br />

IRED = 2<br />

CALL SIGLCL(IRED, ISTAT)<br />

IF (ISTAT .GT. 0) GO TO 800<br />

LDASH = 2<br />

CALL SIGLTY(LDASH, ISTAT)<br />

IF(ISTAT .GT. 0) GO TO 800<br />

WIDTH = 4.0<br />

CALL SIGLWD(WIDTH, ISTAT)<br />

IF(ISTAT .GT. 0) GO TO 800<br />

C<br />

C DO A BORDER USING LINES<br />

C<br />

NUMPTS = 5<br />

XCORS(1) = 1.0<br />

YCORS(1) = 1.0<br />

XCORS(2) = 11.0<br />

YCORS(2) = 1.0<br />

XCORS(3) = 11.0<br />

YCORS(3) = 11.0<br />

XCORS(4) = 1.0<br />

YCORS(4) = 11.0<br />

XCORS(5) = 1.0<br />

YCORS(5) = 1.0<br />

C<br />

CALL SIGLIN(NUMPTS, XCORS, YCORS, ISTAT )<br />

IF (ISTAT .GT. 0) GO TO 800<br />

C<br />

C CLOSE GRAPHIC SEGMENT<br />

C<br />

CALL SIGSCL(ISTAT)<br />

IF (ISTAT .GT. 0) GO TO 800<br />

C<br />

C OPEN POLYGON LINES PICTURE SEGMENT<br />

C<br />

LGBTYP = 7<br />

CALL SIGSOP(LGBTYP, ISTAT)<br />

IF (ISTAT .GT. 0) GO TO 800<br />

C<br />

C SET MARKER COLOR, MARKER HEIGHT<br />

C<br />

IGREEN = 3<br />

CALL SIGMCL(IGREEN, ISTAT)<br />

IF(ISTAT .GT. 0) GO TO 800<br />

HGTMRK = 0.3<br />

CALL SIGMHT(HGTMRK, ISTAT)<br />

IF(ISTAT .GT. 0) GO TO 800<br />

C<br />

C DO A MARKERS AND LINES USING LINES<br />

C<br />

NUMMRK = 3<br />

XCORS(1) = 2.0<br />

YCORS(1) = 6.0<br />

XCORS(2) = 10.0<br />

YCORS(2) = 6.0<br />

XCORS(3) = 6.0<br />

YCORS(3) = 10.0<br />

ROTATE = 0.0<br />

5000.0.0 ZPI/O Overview: Contents 21


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

C<br />

CALL S2GMRK(NUMMRK, XCORS, YCORS, ROTATE, ISTAT )<br />

IF (ISTAT .GT. 0) GO TO 800<br />

C<br />

C SET LINE COLOR, TYPE, WIDTH<br />

C<br />

IYELL = 7<br />

CALL SIGLCL(IYELL, ISTAT)<br />

IF(ISTAT .GT. 0) GO TO 800<br />

LHACH = 3<br />

CALL SIGLTY(LHACH, ISTAT)<br />

IF(ISTAT .GT. 0) GO TO 800<br />

WIDTH = 2<br />

CALL SIGLWD(WIDTH, ISTAT)<br />

IF(ISTAT .GT. 0) GO TO 800<br />

C<br />

NUMPTS = 2<br />

XCORS(1) = 2.50<br />

YCORS(1) = 6.0<br />

XCORS(2) = 9.50<br />

YCORS(2) = 6.0<br />

CALL SIGLIN(NUMPTS, XCORS, YCORS, ISTAT )<br />

IF (ISTAT .GT. 0) GO TO 800<br />

XCORS(1) = 9.50<br />

YCORS(1) = 6.50<br />

XCORS(2) = 6.50<br />

YCORS(2) = 9.50<br />

CALL SIGLIN(NUMPTS, XCORS, YCORS, ISTAT )<br />

IF (ISTAT .GT. 0) GO TO 800<br />

XCORS(1) = 5.50<br />

YCORS(1) = 9.50<br />

XCORS(2) = 2.50<br />

YCORS(2) = 6.50<br />

CALL SIGLIN(NUMPTS, XCORS, YCORS, ISTAT )<br />

IF (ISTAT .GT. 0) GO TO 800<br />

C<br />

C CLOSE GRAPHIC SEGMENT<br />

C<br />

CALL SIGSCL(ISTAT)<br />

IF (ISTAT .GT. 0) GO TO 800<br />

C<br />

C OPEN TEXT PICTURE SEGMENT<br />

C<br />

LGBTYP = 6<br />

CALL SIGSOP(LGBTYP, ISTAT)<br />

IF (ISTAT .GT. 0) GO TO 800<br />

C<br />

C SET TEXT COLOR, FONT, HEIGHT, JUSTIFICATION, ANGLE<br />

22 ZPI/O Overview: Contents 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

C<br />

ICYAN = 5<br />

CALL SIGTCL(ICYAN, ISTAT)<br />

IF(ISTAT .GT. 0) GO TO 800<br />

TXTHGT = 0.5<br />

CALL SIGTHT(TXTHGT, ISTAT)<br />

IF(ISTAT .GT. 0) GO TO 800<br />

JUSTCT = 3<br />

CALL SIGTJU(JUSTCT, ISTAT)<br />

IF(ISTAT .GT. 0) GO TO 800<br />

IATLIC = 4<br />

CALL SIGTFO(IATLIC, ISTAT)<br />

IF(ISTAT .GT. 0) GO TO 800<br />

TXTANG = 45.0<br />

CALL SIGTRO(TXTANG, ISTAT)<br />

IF(ISTAT .GT. 0) GO TO 800<br />

C<br />

C DO TEXT<br />

C<br />

NUMCHR = 20<br />

XCORS(1) = 3.0<br />

YCORS(1) = 5.0<br />

TEXT = ’TEST INPUT GRAPHICS’<br />

C 123456789 123456789<br />

C<br />

CALL SIGTXT(TEXT, NUMCHR, XCORS(1), YCORS(1), ISTAT )<br />

IF (ISTAT .GT. 0) GO TO 800<br />

C<br />

C<br />

C SET TEXT COLOR, FONT, HEIGHT, JUSTIFICATION, ANGLE<br />

C<br />

MAGENT = 6<br />

CALL SIGTCL(MAGENT, ISTAT)<br />

IF(ISTAT .GT. 0) GO TO 800<br />

TXTHGT = 0.2<br />

CALL SIGTHT(TXTHGT, ISTAT)<br />

IF(ISTAT .GT. 0) GO TO 800<br />

JUSTRT = 2<br />

CALL SIGTJU(JUSTRT, ISTAT)<br />

IF(ISTAT .GT. 0) GO TO 800<br />

IROMAN = 3<br />

CALL SIGTFO(IROMAN, ISTAT)<br />

IF(ISTAT .GT. 0) GO TO 800<br />

TXTANG = 270.0<br />

CALL SIGTRO(TXTANG, ISTAT)<br />

IF(ISTAT .GT. 0) GO TO 800<br />

C<br />

NUMCHR = 4<br />

XCORS(1) = 5.50<br />

YCORS(1) = 7.0<br />

TEXT = ’HI! ’<br />

C<br />

CALL SIGTXT(TEXT, NUMCHR, XCORS(1), YCORS(1), ISTAT )<br />

IF (ISTAT .GT. 0) GO TO 800<br />

C<br />

C CLOSE GRAPHIC SEGMENT<br />

C<br />

CALL SIGSCL(ISTAT)<br />

IF (ISTAT .GT. 0) GO TO 800<br />

5000.0.0 ZPI/O Overview: Contents 23


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

C<br />

C OPEN POLYGON FILE PICTURE SEGMENT<br />

C<br />

LGBTYP = 30<br />

CALL SIGSOP(LGBTYP, ISTAT)<br />

IF (ISTAT .GT. 0) GO TO 800<br />

C<br />

C DO A POLYGON COLORFILL USING LINES<br />

C<br />

ICOLOR = 4<br />

CALL SIGPCL(ICOLOR, ISTAT)<br />

IF(ISTAT .GT. 0 ) GO TO 800<br />

C<br />

NUMVTX = 5<br />

XCORS(1) = 4.50<br />

YCORS(1) = 6.50<br />

XCORS(2) = 7.50<br />

YCORS(2) = 6.50<br />

XCORS(3) = 7.50<br />

YCORS(3) = 8.0<br />

XCORS(4) = 4.50<br />

YCORS(4) = 8.0<br />

XCORS(5) = 4.50<br />

YCORS(5) = 6.50<br />

write(6, 155)<br />

155 format( ’ b’)<br />

C<br />

CALL SIGPFL(NUMVTX, XCORS, YCORS, ISTAT )<br />

IF (ISTAT .GT. 0) GO TO 800<br />

C<br />

C CLOSE GRAPHIC SEGMENT<br />

C<br />

CALL SIGSCL(ISTAT)<br />

IF (ISTAT .GT. 0) GO TO 800<br />

C<br />

C CLOSE THE SECOND PICTURE<br />

C<br />

CALL SIEPIC (ISTAT)<br />

IF (ISTAT .NE. 0) GO TO 800<br />

C<br />

IF(IDBUG .EQ. 1) THEN<br />

WRITE(LUNBUG, 2002)<br />

END IF<br />

2002 FORMAT(15X,’ ***** END OF SECOND PICTURE ***** ’)<br />

C<br />

C CLOSE THE GRAPHICS FILE<br />

800 CALL SIEZGF<br />

CALL SIEZIG<br />

C<br />

999 CONTINUE<br />

IF(ISTAT .NE. 0) WRITE(LUNERR, 899) NAMRET, ISTAT<br />

899 FORMAT(’ ****** ’,A6,’ - ERROR, PROGRAM DID NOT COMPLETE ’,<br />

1 ’SUCCESSFULLY: STATUS FLAG = ’,I5)<br />

C<br />

WRITE(LUNBUG,9993) NAMRET<br />

9993 FORMAT(//,20X,’ ++++++ ENDING OF TESTING ROUTINE ++++++ ’,//,<br />

. 1X,30(’=’),2X,A6,2X,30(’=’) )<br />

C<br />

STOP<br />

END<br />

24 ZPI/O Overview: Contents 5000.0.0


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Subroutine Descriptions<br />

Major ZPI/O Groupings<br />

Presentation of Information<br />

The most important parts of this guide are the subroutine descriptions.<br />

Considerable effort has gone into constructing a set of consistent<br />

interfaces.<br />

The Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> routines are separated into five<br />

major categories:<br />

Initialize/Terminate ZPI/O Environment (page 35)<br />

Transfer, Convert, or List Information (page 43)<br />

Draw and Plot Features (page 69)<br />

Graphics Utilities (page 77)<br />

File Utilities (page 169)<br />

The following categories of information are included for subroutine<br />

descriptions:<br />

Name<br />

Function<br />

Note<br />

Environment<br />

Format<br />

Input Arguments<br />

Output Arguments<br />

25 ZPI/O Overview: Subroutine Descriptions 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Name<br />

Function<br />

Note<br />

Environment<br />

Subroutine names are always six characters long, the first character<br />

being an S. This is followed by one of the following:<br />

an I, for the original version of standard ZPI/O subroutine<br />

an O, for the original version of ZPI/O output graphics<br />

an n, where n is a revised version number<br />

The remaining four characters are intended to convey the purpose of the<br />

subroutine.<br />

Example Subroutine Names<br />

S2ALIN is the second version of SIALIN and S3GELM is the third version of<br />

SOGELM.<br />

This is a brief, one-line description of what the subroutine does.<br />

Additional detail is provided in the paragraph(s) that follow.<br />

Included are notes about arguments and other subroutines, examples,<br />

hints and suggestions.<br />

The environment description covers the environment that must be<br />

established before and after this subroutine is executed, such as any<br />

files that must be opened, data from other subroutines, system<br />

dependencies, etc.<br />

5000.0.0 ZPI/O Overview: Subroutine Descriptions 26


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Format<br />

Input Arguments<br />

This is the format of the FORTRAN 77 call statement with all required<br />

arguments. Recommended names are provided for each argument.<br />

Input arguments are arranged in a table of three columns:<br />

Argument Name<br />

argument name<br />

data type<br />

description and default<br />

The recommended names conform to FORTRAN-implicit typing<br />

conventions for INTEGER and REAL.<br />

Input/Output (I/O) Arguments<br />

There are a few instances in which an argument may need to be both an input and<br />

an output argument. This is especially true if a new file is being created by a<br />

process. If that file already exists, a version number is added and passed back in<br />

the same argument. This makes the version number available for use in a later<br />

subroutine if it is needed.<br />

The code φ appears at the left side of the argument name to indicate that the<br />

argument is used for both input and output.<br />

27 ZPI/O Overview: Subroutine Descriptions 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Data Type<br />

Description<br />

Output Arguments<br />

Data types are listed as:<br />

C = CHARACTER<br />

D = DOUBLE PRECISION<br />

I = INTEGER<br />

L = LOGICAL<br />

R = REAL<br />

CHARACTER arguments are denoted C*kk where kk is the number of<br />

characters required.<br />

REAL or INTEGER arguments occupy single locations unless<br />

explicitly noted otherwise with “array, of length kk” where kk is the<br />

number of locations which should be reserved in the calling program.<br />

CHARACTER, LOGICAL, and DOUBLE PRECISION arguments<br />

require TYPE statements in the calling program.<br />

The description column contains a brief explanation of the argument’s<br />

function. Some arguments must have specific values. These values are<br />

tabulated and explained in a list below the argument description. The<br />

following mathematical symbols precede the values as needed:<br />

> = less than<br />

< = greater than<br />

The notation Default = indicates computed default values.<br />

The notation Range Options: indicates the acceptable range of values.<br />

The notation Recommend: indicates a recommended value.<br />

Output arguments are typically used to convey completion status<br />

information. The format of this information is essentially the same as<br />

for Input Arguments (see pages 27 to 28).<br />

5000.0.0 ZPI/O Overview: Subroutine Descriptions 28


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Comments and Suggestions<br />

Internal Routines<br />

Initializing Input Arguments<br />

Calling Arguments<br />

Using the Debug Option, IDBUG<br />

There are some ZPI/O routines for which there is no documentation.<br />

These routines are used internally by other ZPI/O routines and are, in<br />

general, not used by application programmers.<br />

For good housekeeping, all input arguments should be initialized, since<br />

not all machines set variables to zero or blanks. ZPI/O input checking is<br />

based on a variable value being either zero or a selection number and a<br />

file being either blank (if it is unused), or with a name in the argument<br />

in order to open the file.<br />

It is a good idea to use only variable names rather than constants in the<br />

calling arguments, because on occasion that variable may be<br />

overwritten due to a conflict in parameters. If this is found to be the<br />

case, please notify us. Also, the variables should not be set using the<br />

PARAMETER statement since these cannot be overridden.<br />

If you are having problems running one of the ZPI/O subroutines, use<br />

the debug argument, IDBUG, to assist you in determining what the<br />

input and output arguments are and in which subroutine call the<br />

problem is occurring. IDBUG is initialized to a user value in SICOMM<br />

or SIISIL and reset using the subroutine S2DBUG.<br />

If IDBUG = 1, printing of debug statements is turned on. If IDBUG =<br />

0, printing of debug statements is turned off.<br />

If you see a string of asterisks (****) in a printing of the input/output<br />

debug arguments, verify your values. The asterisks indicate a value is<br />

outside the range of the print format. If the printout of asterisks persists,<br />

contact the <strong>Landmark</strong> Customer Support staff.<br />

29 ZPI/O Overview: Comments and Suggestions 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Using the Status Flag Option, ISTAT<br />

Opening and Closing Files<br />

If you are still having problems, attempt the same process in<br />

Z-<strong>MAP</strong> <strong>Plus</strong> and see what the results are. Especially, check if the files,<br />

master files and graphics files are good.<br />

All errors should be printed by ZPI/O code. The application<br />

programmer should check the code and decide what to do, but need not<br />

write a message.<br />

ISTAT 0 Fatal error occurred, application programmer should<br />

close down subsystems, pictures, files, etc., for a clean<br />

abend. Output arguments are printed but they may not<br />

represent good values, depending on where the error<br />

occurred.<br />

For the Draw and Plot routines, the files must be closed.<br />

Files should be opened when working with most of the File utilities.<br />

Graphics files and pictures usually must be opened before Graphics<br />

utilities can be performed.<br />

If files or pictures are opened, they should be closed before terminating<br />

the application program.<br />

Every effort is made to close all files within a ZPI/O subroutine, but<br />

sometimes some internal files may be left open. If you have trouble of<br />

this kind, perform the following loop after the call in question. This<br />

guarantees that the files are closed:<br />

CALL SIname (<br />

DO xxx, I = 1,5<br />

CALL SIFCLO(I, ISTAT)<br />

xxx CONTINUE<br />

5000.0.0 ZPI/O Overview: Comments and Suggestions 30


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Master File Numbers<br />

Reading Sequential Data<br />

Writing Sequential Data<br />

There are two methods for specifying master file numbers:<br />

1. If you are specifying an old file:<br />

0 = Search all master files for this file<br />

N = Search the specified master file for this file<br />

2. If you are specifying a new file:<br />

0 = Output the file on the scratch master file<br />

N = Output the file on the specified master file<br />

To read sequential data, use the routine SIFRED:<br />

CALL SIFRED (LOGFIL, IREC, NWRDS, DATA, ISTAT)<br />

IREC has a special property. If a number of sequential reads are to be<br />

performed after positioning the file, do the following series of steps:<br />

1. Set IREC = N, where N is the first record to be read.<br />

2. Call this routine – SIFRED.<br />

3. Set IREC = 0 for the remaining number of sequential reads.<br />

To write sequential data, use the routine SIFWRT:<br />

CALL SIFWRT (LOGFIL, IREC, NWRDS, DATA, IWORD,<br />

ISTAT)<br />

IREC has a special property. If a number of sequential writes are to be<br />

performed after positioning the file, do the following series of steps:<br />

1. Set IREC = N, where N is the first record to be written.<br />

2. Call this routine – SIFWRT.<br />

3. Set IREC = 0 for the remaining number of sequential writes.<br />

31 ZPI/O Overview: Comments and Suggestions 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Reading a File<br />

Creating a File<br />

1. Open the old file – SIOOPN.<br />

2. Read the parameter record – SIPRRD, SIPRRG or SIPRRC.<br />

3. If the file is a data file, read the field descriptors – SIFLDR. The<br />

number of field descriptors is obtained from the argument call.<br />

4. Read the records – SIFRED.<br />

Using IWORD To Read Sequential Records<br />

Do not use the number of records or columns as a means of knowing when<br />

you have finished reading the file. Instead, use the argument IWORD –<br />

number of sequential words remaining to read. It is zero if all the records<br />

have been read.<br />

5. Close the file – SIFCLO.<br />

1. Open the new file – SINOPN.<br />

2. If the file is a data file, write the field descriptors – SIFLDW. Write<br />

one field descriptor for each field to be written on the file.<br />

3. Write the records – SIFWRT.<br />

4. Write the parameter record – SIPRWD, SIPRWG or SIPRWC.<br />

5. Close the file – SIFCLO.<br />

6. Check the file and fields – SIGRST, SICTST or SIFDST.<br />

7. List the file – SILIST/SIGLST.<br />

For additional information, see ”Creating a Member File” on page 242.<br />

5000.0.0 ZPI/O Overview: Comments and Suggestions 32


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Naming Output Data Files<br />

Any file which is created in a ZPI/O run (usually referred to as an<br />

output file in the ZPI/O documentation) should be a variable argument.<br />

If a routine creates a new member file and you specify a name that<br />

already exists, a version number is added to this filename.<br />

This new filename (with the added version number) is returned to you<br />

in the same argument you sent. It is very important to set the name of<br />

the file equal to a parameter, send that parameter as part of the calling<br />

argument.<br />

For example, S4CDTR argument NAMODA for the name of the output<br />

data file should be coded as:<br />

CHARACTER *24 NAMODA<br />

NAMODA = ”OUTPUT FILE”<br />

CALL S4CDTR(...<br />

If the name exists, it is returned in the argument as:<br />

NAMODA = ”OUTPUT FILE V-01”<br />

ISTAT is set to –1 and a warning message is sent:<br />

****** WARNING - DUPLICATE FILES, A VERSION NUMBER HAS BEEN ADDED<br />

This notifies you that you have the correct filename, if you use the<br />

name in another routine after S4CDTR.<br />

Input/Output Arguments in the Subroutine Descriptions<br />

For files of this type, the documentation shows the code φ up on the left side of<br />

the page to indicate that it is both an input and an output argument.<br />

33 ZPI/O Overview: Comments and Suggestions 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Reading and Writing Grids<br />

Grids are stored in a columns so that an NROW by NCOL size grid<br />

occupies NROW*NCOL words in a member file. The grid element<br />

(IROW,ICOL) is the (ICOL – 1)*NROW + IROW word on the grid<br />

member file.<br />

For example, the grid cell denoted by the XX in the diagram below is<br />

cell (10,10). It is the (10 – 1)*12 + 10 = 118th word sequentially on the<br />

member grid file.<br />

YMAX<br />

1<br />

2<br />

3<br />

4<br />

5<br />

6<br />

7<br />

8<br />

9<br />

Columns<br />

1 2 3 4 5 6 7 8 9 101112<br />

10<br />

11<br />

XX<br />

12<br />

YMIN YMIN<br />

Rows<br />

XMIN<br />

XMIN<br />

For additional information, see ”Reading and Writing Grids” on<br />

page 247.<br />

5000.0.0 ZPI/O Overview: Comments and Suggestions 34<br />

XMAX<br />

XMAX YMAX


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Initialize/Terminate ZPI/O Environment<br />

Introduction<br />

Use the Initialize/Terminate ZPI/0 Environment subroutines for these<br />

tasks:<br />

Initialize or terminate the ZPI/O environment.<br />

Initialize the system-wide common blocks.<br />

Set where the messages from various parts of the <strong>Landmark</strong><br />

subsystems are output.<br />

Reset the debug print option.<br />

5000.0.0 Initialize/Terminate ZPI/O Environment: Introduction 35


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Internal Routines<br />

Some library routines are not included in the documentation. These<br />

routines are used internally by other library routines and are typically<br />

not used by application programmers. The internal routines for<br />

Initialize/Terminate ZPI/O Environment are:<br />

SIEROP Print the error messages for opening files by routines<br />

ZINOPN and ZIOOPN<br />

SIERVN Report that a shell (obsolete) routine has an error from a<br />

called new version routine<br />

SIMSGW Print special type of message looping for arrays in<br />

debug statements<br />

SISSIL Start up system-wide common blocks<br />

36 Initialize/Terminate ZPI/O Environment: Internal Routines – 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Initialization and Termination Routines<br />

S2DBUG<br />

Function Reset the debug print flag<br />

Environment The input argument IDBUG is set initially by SICOMM or SIISIL,<br />

when initializing the ZPI/O environment. After that routine is called,<br />

you can reset the debug print flag by calling this routine.<br />

Format CALL S2DBUG ( IDBUG , ISTAT )<br />

Input Arguments<br />

Argument<br />

Name<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

IDBUG I Whether to print debug statements:<br />

0 = Off, do not print debug statements<br />

1 = On, print the debug statements<br />

Data<br />

Type<br />

Description<br />

and Default<br />

ISTAT I Status flag:<br />

0 = Operation was successful<br />

1 = Error, debug print file cannot be opened.<br />

IDBUG reset to zero<br />

5000.0.0 Initialize/Terminate ZPI/O Environment: Internal Routines – S2DBUG 37


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Initialization and Termination Routines<br />

SICOMM<br />

Function Initialize the ZPI/O environment<br />

This subroutine initializes system-wide common blocks. SICOMM or SIISIL<br />

(page 41 – a replacement subroutine for SICOMM) must be the first<br />

subroutine called when using the Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong>.<br />

SICOMM sets all output print units to the standard default, usually unit 6. For<br />

more control on where messages are printed, see SIISIL (page 41).<br />

Environment The application program must contain the declaration:<br />

COMMON/WRKSPC/IWORK(N)<br />

where N is normally greater than 10,000. A typical value for N is<br />

100,000. However, N must be equal to LTHWRK.<br />

Call this routine (or SIISIL) first and only once in all application<br />

programs.<br />

Format CALL SICOMM ( IDBUG , LTHWRK )<br />

Input Arguments<br />

Argument<br />

Name<br />

Output Arguments None<br />

Data<br />

Type<br />

Description<br />

and Default<br />

IDBUG I Whether to print debug statements:<br />

0 = Off, do not print debug statements<br />

1 = On, print debug statements<br />

LTHWRK I Length of the workspace. It must be at least 3.<br />

See ”Environment” above.<br />

38 Initialize/Terminate ZPI/O Environment: Internal Routines – SICOMM 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Initialization and Termination Routines<br />

SIESIL<br />

Function Terminate the ZPI/O environment<br />

Environment This subroutine should be called after all ZPI/O processing has been<br />

completed and if an abend condition occurs. SIISIL or SICOMM must<br />

have been called to initialize the ZPI/O environment.<br />

Format CALL SIESIL ( ISTAT )<br />

Input Arguments None<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

ISTAT I Status flag:<br />

0 = Operation was successful<br />

1 = Error, problem closing the files<br />

5000.0.0 Initialize/Terminate ZPI/O Environment: Internal Routines – SIESIL 39


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Initialization and Termination Routines<br />

SIEZIM<br />

Function Close a ZIMS file<br />

This subroutine removes lock files on Unix systems. You can call it on<br />

other systems, but it is unnecessary.<br />

Environment Call this routine during the exit process for any programs that use<br />

master files (MFDs). Call so that normal exits and any error exits both<br />

call this routine.<br />

Format CALL SIEZIM<br />

Input Arguments None<br />

Output Arguments None<br />

40 Initialize/Terminate ZPI/O Environment: Internal Routines – SIEZIM 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Initialization and Termination Routines<br />

SIISIL<br />

Function Initialize the ZPI/O environment with output file control<br />

This subroutine initializes the ZPI/O environment, the system-wide<br />

common blocks, the message utility and some of the logical units.<br />

SIISIL or SICOMM must be the first subroutine called when using the<br />

Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong>.<br />

Notes If there is any problem opening the files, a STOP may occur with the<br />

message:<br />

' ****** SISSIL - ERROR, PROBLEM OPENING FILES '<br />

For Unix users the ZPI/O application needs to explicitly open those<br />

output units (LUNINF, LUNSTA, LUNWAR, LUNERO, LUNBUG)<br />

if IPROC = 1.<br />

Environment The application program must contain the declaration:<br />

COMMON/WRKSPC/IWORK(N)<br />

where N is normally greater than 10,000. A typical value for N is<br />

100,000. However, N must be equal to LTHWRK.<br />

Call this routine (or SICOMM) first and only once in all application<br />

programs.<br />

Format CALL SIISIL (<br />

1 IDBUG , LTHWRK , LUNINF , LUNSTA , LUNWAR ,<br />

2 LUNERO, LUNBUG , LUNDM1 , LUNDM2 , IPROC ,<br />

3 ISTAT )<br />

Input Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

IDBUG I Whether to print debug statements:<br />

0 = Off, do not print debug statements<br />

1 = On, print debug statements<br />

LTHWRK I Length of the work space. It must be at least 3.<br />

See ”Environment” above.<br />

LUNINF I Logical unit number for output informative<br />

messages.<br />

Default = 6<br />

Range Options: 0–99<br />

LUNSTA I Logical unit number for output statistical (report)<br />

messages.<br />

Default = 6<br />

Range Options: 0–99<br />

5000.0.0 Initialize/Terminate ZPI/O Environment: Internal Routines – SIISIL 41


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Argument<br />

Name<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

LUNWAR I Logical unit number for output warning<br />

messages.<br />

Default = 6<br />

Range Options: 0–99<br />

LUNERO I Logical unit number for output error messages.<br />

Default = 6<br />

Range Options: 0–99<br />

LUNBUG I Logical unit number for output ZPI/O input and<br />

output debug messages.<br />

Default = 6<br />

Range Options: 0–99<br />

LUNDM1 I Currently not used.<br />

LUNDM2 I Currently not used.<br />

IPROC I Where messages are to be presented:<br />

0 = Output all messages to screen<br />

1 = Output messages to designated files<br />

Data<br />

Type<br />

Description<br />

and Default<br />

Description<br />

and Default<br />

ISTAT I Status flag:<br />

–1 = Warning, invalid informative unit,<br />

process, or debug flag. The value has<br />

been reset<br />

0 = Operation was successful<br />

1 = Error, invalid licensing setup<br />

2 = Error, option unavailable<br />

42 Initialize/Terminate ZPI/O Environment 5000.0.0


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Transfer, Convert, or List Information<br />

Introduction<br />

Internal Routines<br />

Use the Transfer, Convert, or List Information subroutines for these<br />

tasks:<br />

Convert data from one format to another format.<br />

Generate lists and reports for various types of files.<br />

Compute statistics for data and grid files.<br />

Transfer data from a disk file to a member file and vice versa.<br />

Some library routines are not included in the documentation. These<br />

routines are used internally by other library routines and are typically<br />

not used by application programmers. The internal routines for<br />

Transfer, Convert or List Information are:<br />

SICDPM Verify the input arguments for coordinate transformation<br />

from x,y to latitude/longitude<br />

SILFMT Store the column header<br />

SILWRT Print selected data fields by the format in the character<br />

string FRMT<br />

43 Transfer, Convert, or List Information: Introduction 5000.0.0


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Routines to Transfer, Convert, or List Information<br />

S2FLIN<br />

Function Transfer information from an external file into a member of a master<br />

file<br />

This subroutine transfers an external file into a member file. The user<br />

must describe the input file by means of a format, either on the input<br />

file or in a format file. For information and examples of how to do this,<br />

see “Appendix D. Import/Export” in the Z-<strong>MAP</strong> <strong>Plus</strong> Reference<br />

Manual. (Where the term format is used in this subroutine description,<br />

the term format group is used in “Appendix D. Import/Export.”)<br />

Environment The ZPI/O and ZIMS environments must be initialized before you call<br />

this routine.<br />

Format CALL S2FLIN (<br />

1 NAMDAT , NAMDIC , NAMGRP , NAMFIL , LATTNM ,<br />

2 GRPCHR , CMTCHR , HSTCHR , DICFLG , MFDNUM ,<br />

3 LOGDIC , LOGDAT , ISTAT )<br />

Input Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

NAMDAT C*80 Name of the external input data file.<br />

NAMDIC C*80 Name of format file containing the format.<br />

Blanked if format is on the input data file.<br />

NAMGRP C*40 Name of format in NAMDIC file which describes<br />

the input data file.<br />

NAMFIL C*24 Name of output member file to create.<br />

LATTNM C*24 Name of the RESIN lattice which specifies the<br />

geometry of the cell table being imported.<br />

Required if importing a RESIN cell table file,<br />

blanked otherwise.<br />

GRPCHR C*1 Format identifier.<br />

Default = @<br />

CMTCHR C*1 Comment record identifier.<br />

Default = !<br />

HSTCHR C*1 History record identifier.<br />

Default = +<br />

DICFLG L Whether the format and input data are on the<br />

same file:<br />

.TRUE. = They are on the same file<br />

.FALSE. = They are on different files<br />

44 Transfer, Convert, or List Information: Internal Routines – S2FLIN 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Argument<br />

Name<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

MFDNUM I Number of master file to contain the member data<br />

file.<br />

Range Options: 0–5<br />

LOGDIC I Logical unit number for the format file.<br />

Default = 61, if DICFLG = .FALSE.<br />

62, if DICFLG = .TRUE.<br />

Range Options: 0–99<br />

LOGDAT I Logical unit number for the input formatted data<br />

file.<br />

Default = 62<br />

Range Options: 0–99<br />

Data<br />

Type<br />

Description<br />

and Default<br />

Description<br />

and Default<br />

ISTAT I Status flag:<br />

–2 = Warning, input file is empty<br />

–1 = Warning, format file supplied, but<br />

DICFLG = .TRUE.; reset to use this input<br />

data file<br />

0 = Operation was successful<br />

1 = Error, problem importing data file<br />

2 = Error, file containing the format and<br />

import data file are the same, but<br />

DICFLG indicates they are different<br />

5000.0.0 Transfer, Convert, or List Information: Internal Routines – S2FLIN 45


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Routines to Transfer, Convert, or List Information<br />

S2GRST<br />

Function Compute grid file statistics<br />

This subroutine obtains statistics about all or part of a grid file.<br />

Environment The ZPI/O and ZIMS environments must be initialized before this<br />

routine is called.<br />

Format CALL S2GRST (<br />

1 NAMGRD , MFDGRD , IHISGR , MNRWIN, MXRWIN ,<br />

2 MNCWIN , MXCWIN , NROWS , NCOLS , NZVAL ,<br />

3 NZNON , XMIN , XMAX , YMIN , YMAX ,<br />

4 GXINC , GYINC , ZMIN , ZMAX , ZRANGE ,<br />

5 ZMEAN , ZRMS , ZSTD , ZRELVA , ZRMSCR ,<br />

6 XBAND , YBAND , REACH , ZNON , ISTAT )<br />

Input Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

NAMGRD C*24 Name of the input grid file.<br />

MFDGRD I Number of the master file containing the input<br />

grid file.<br />

Range Options: 0–5<br />

IHISGR I History display for input grid file:<br />

0 = Do not display history information<br />

1 = Display history information<br />

MNRWIN I Minimum row at which to begin statistics (top<br />

edge of window). A zero uses the default.<br />

Default = 1<br />

MXRWIN I Maximum row at which to end statistics (bottom<br />

edge of window). A zero uses the default.<br />

Default = Number of rows<br />

MNCWIN I Minimum column at which to begin statistics<br />

(left edge of window). A zero uses the default.<br />

Default = 1<br />

MXCWIN I Maximum column at which to end statistics (right<br />

edge of window). A zero uses the default.<br />

Default = Number of columns<br />

46 Transfer, Convert, or List Information: Internal Routines – S2GRST 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

NROWS I Number of rows.<br />

NCOLS I Number of columns.<br />

NZVAL I Number of z value nodes.<br />

NZNON I Number of null data nodes (ZNONs).<br />

XMIN R Minimum x coordinate.<br />

XMAX R Maximum x coordinate.<br />

YMIN R Minimum y coordinate.<br />

YMAX R Maximum y coordinate.<br />

GXINC R The x direction gridding interval.<br />

GYINC R The y direction gridding interval.<br />

ZMIN R Minimum surface value.<br />

ZMAX R Maximum surface value.<br />

ZRANGE R Surface range.<br />

ZMEAN R Mean of z.<br />

ZRMS R Root mean square of z.<br />

ZSTD R Standard deviation of z.<br />

ZRELVA R Relative variation of z.<br />

ZRMSCR R Root mean square curvature of z.<br />

XBAND R The x direction collection radius.<br />

YBAND R The y direction collection radius.<br />

REACH R Data collection radius.<br />

ZNON R Null data value (ZNON).<br />

5000.0.0 Transfer, Convert, or List Information: Internal Routines – S2GRST 47


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

ISTAT I Status flag:<br />

0 = Operation was successful<br />

1 = Error, invalid master file number or<br />

master file is read-only<br />

2 = Error, duplicate files, specify master file<br />

number<br />

3 = Error, cannot find the file<br />

4 = Error, 5 files already in use<br />

5 = Error, reading parameter record<br />

6 = Error, invalid grid increments<br />

48 Transfer, Convert, or List Information: Internal Routines – S2GRST 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Routines to Transfer, Convert, or List Information<br />

S4CDTR<br />

Function Convert from x,y to latitude/longitude and vice versa<br />

This subroutine converts x,y coordinates to longitude and latitude<br />

coordinates or the inverse relationship, using a member file.<br />

Environment The ZPI/O and ZIMS environments must be initialized before this<br />

routine is called.<br />

Format CALL S4CDTR (<br />

1 NAMIDA , NAMODA , NAMFDA , NAMFDB , MFDIDA ,<br />

2 MFDODA , IHSIDA , IDIREC , IFLDA , IFLDB ,<br />

3 IHEM , IPJCOD , ISPCOD , IUNCOD , IUTMCD ,<br />

4 IUTMOP , IDTLN , IRADTY , UNTFAC , BOTPAR ,<br />

5 TOPPAR , REFLAT , SFLAT , REFLON , SFLON ,<br />

6 FNORTH , FEAST , AXISA , AXISB , AZMTH ,<br />

7 SCALE , ZNONOT , ISTAT )<br />

Input Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

NAMIDA C*24 Name of input data file.<br />

NAMODA C*24 Name of output data file.<br />

NAMFDA C*20 Name of output Y (Northing) or Latitude field. If<br />

blank, defaults to name for given field type.<br />

NAMFDB C*20 Name of output X (Easting) or Longitude field. If<br />

blank, defaults to name for given field type.<br />

MFDIDA I Number of the master file containing the input<br />

data file.<br />

Range Options: 0–5<br />

MFDODA I Number of the master file to contain the output<br />

data file.<br />

Range Options: 0–5<br />

IHSIDA I History display for input data file:<br />

0 = Do not display history information<br />

1 = Display history information<br />

IDIREC I Direction of the transformation:<br />

1 = Forward (LAT,LONG to X,Y)<br />

2 = Inverse (X,Y to LAT,LONG)<br />

5000.0.0 Transfer, Convert, or List Information: Internal Routines – S4CDTR 49


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

IFLDA I Field number of the Y (Northing) or Latitude<br />

field in input data file. A zero finds and uses the<br />

first field of the appropriate type.<br />

IFLDB I Field number of the X (Easting) or Longitude<br />

field in input data file. A zero finds and uses the<br />

first field of the appropriate type.<br />

IHEM * I Which hemisphere. Needed only if IPJCOD = 1:<br />

1 = Northern<br />

2 = Southern<br />

50 Transfer, Convert, or List Information: Internal Routines – S4CDTR 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

IPJCOD * I Cartographic projection code:<br />

–17 = Grads and Van Der Grinten I<br />

–16 = Grads and Bipolar Oblique Conic<br />

Conformal<br />

–15 = Grads and Cassini-Soldner<br />

–14 = Grads and New Zealand Map Grid<br />

–13 = Grads and Oblique Transverse Mercator<br />

–12 = Grads and American Polyconic<br />

–11 = Currently not used<br />

–10 = Grads and Alber’s Equal Area<br />

(equivalent) with two standard parallels<br />

–9 = Grads and Modified Rectangular<br />

Orthotomic Polyconic<br />

–8 = Grads and Azimuthal Orthographic<br />

–7 = Grads and Azimuthal Stereographic<br />

–6 = Grads and Azimuthal Gnomonic<br />

–5 = Grads and Conformal Lambert with two<br />

standard parallels<br />

–4 = Grads and Conformal Lambert with one<br />

standard parallel<br />

–3 = Grads and Standard Mercator<br />

–2 = Grads and General Transverse Mercator<br />

–1 = Currently not used<br />

0 = Currently not used<br />

1 = Degrees and Universal Transverse<br />

Mercator<br />

2 = Degrees and General Transverse<br />

Mercator<br />

3 = Degrees and Standard Mercator<br />

4 = Degrees and Conformal Lambert with<br />

one standard parallel<br />

5 = Degrees and Conformal Lambert with<br />

two standard parallels<br />

6 = Degrees and Azimuthal Gnomonic<br />

7 = Degrees and Azimuthal Stereographic<br />

8 = Degrees and Azimuthal Orthographic<br />

9 = Degrees and Modified Rectangular<br />

Orthotomic (Polyconic)<br />

10 = Degrees and Alber’s Equal Area<br />

equivalent with two standard parallels<br />

11 = Currently not used<br />

12 = Degrees and American Polyconic<br />

13 = Degrees and Oblique Mercator<br />

14 = Degrees and New Zealand Map Grid<br />

15 = Degrees and Cassini-Soldner<br />

16 = Degrees and Bipolar Oblique Conic<br />

Conformal<br />

17 = Degrees and Van Der Grinten I<br />

5000.0.0 Transfer, Convert, or List Information: Internal Routines – S4CDTR 51


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

ISPCOD * I Reference spheroid for projection:<br />

1 = User defined<br />

2 = Everest 1830<br />

3 = Malayan Everest 1830<br />

4 = Bessel 1841<br />

5 = Airy 1858<br />

6 = Clarke 1858<br />

7 = Clarke 1866<br />

8 = Clarke 1880<br />

9 = Hayford 1909<br />

10 = Krassovsky 1940<br />

11 = Hough 1956<br />

12 = Fischer 1960 (Mercury)<br />

13 = Kaula 1961<br />

14 = I.U.G.G. 1967 (Australian National 1967/<br />

South American 1969)<br />

15 = Fischer 1968 (Mercator modified)<br />

16 = WGS-72 1972<br />

17 = I.U.G.G. 1975<br />

18 = Helmert<br />

19 = Ghana National<br />

20 = WGS-84 (GRS-80)<br />

IUNCOD * I Units for projected coordinates:<br />

1 = User defined<br />

2 = Meters<br />

3 = Feet<br />

4 = Yards<br />

5 = Inches<br />

6 = Kilometers<br />

7 = Nautical miles<br />

8 = Statute miles<br />

9 = U S Survey feet<br />

IUTMCD * I UTM zone number. Used if IPJCOD = 1.<br />

(See “Appendix G. Mapping and Cartographic<br />

Projections” in the Z-<strong>MAP</strong> <strong>Plus</strong> Reference<br />

Manual.)<br />

IUTMOP I Method for specifying projection, if IPJCOD = 1:<br />

1 = UTM zone number<br />

2 = Central meridian reference longitude<br />

IDTLN I Mapping across the dateline:<br />

0 = Not mapping across the dateline<br />

1 = Mapping across the dateline<br />

Note: Set this to zero for grads.<br />

52 Transfer, Convert, or List Information: Internal Routines – S4CDTR 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

IRADTY * I Type of calculation to use to convert spheroid<br />

dimensions A & B to radius:<br />

1 = Equatorial<br />

2 = Equal Surface Area<br />

3 = Equal Volume<br />

4 = Gaussian<br />

UNTFAC * R Projected coordinates units factor. Needed only<br />

if IUNCOD = 1.<br />

BOTPAR * R Standard parallel closest to the equator (least), in<br />

degrees.<br />

TOPPAR * R Standard parallel closest to pole (greatest), in<br />

degrees.<br />

REFLAT * R Reference latitude.<br />

SFLAT * R Scale factor along reference latitude.<br />

REFLON * R Reference longitude.<br />

SFLON * R Scale factor along reference longitude.<br />

FNORTH * R False northing.<br />

FEAST * R False easting.<br />

AXISA * R Semimajor axis, if spheroid is user-defined<br />

(ISPCOD = 1).<br />

AXISB * R Semiminor axis, if spheroid is user-defined<br />

(ISPCOD = 1).<br />

AZMTH * R Azimuth of central line at skew origin.<br />

SCALE * R Scale factor at origin.<br />

ZNONOT R Output field null data value (ZNON).<br />

5000.0.0 Transfer, Convert, or List Information: Internal Routines – S4CDTR 53


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

ISTAT I Status flag:<br />

–2 = Warning, problem writing out extended<br />

history<br />

–1 = Warning, duplicate files, a version<br />

number has been added<br />

0 = Operation was successful<br />

1 = Error, duplicate files, invalid master file<br />

number or master file is read-only<br />

2 = Error, invalid version number<br />

3 = Error, 5 files already in use<br />

4 = Error, duplicate files, specify master file<br />

number<br />

5 = Error, cannot find the file<br />

6 = Error, reading parameter record<br />

7 = Error, reading field descriptors<br />

8 = Error, writing field descriptors<br />

9 = Error, writing parameter record<br />

10 = Error, defining default field descriptor<br />

11 = Error, setting up coordinate<br />

transformation parameters<br />

12 = Error, converting parameters<br />

13 = Error, invalid field matchups<br />

14 = Error, performing the coordinate<br />

transformation<br />

15 = Error, writing projection information to<br />

adjunct record<br />

16 = Error, file does not contain the necessary<br />

fields<br />

17 = Error, UTM is not valid for grads map<br />

54 Transfer, Convert, or List Information: Internal Routines – S4CDTR 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Name Description<br />

Table 1: Checklist for Projection Arguments vs. Projection Type<br />

Arguments<br />

Alber’s Equal Area<br />

American Polyconic<br />

Azimuthal Gnomonic<br />

Azimuthal Orthographic<br />

Azimuthal Stereographic<br />

Bipolar Oblique Conic Conformal<br />

Projection Type<br />

Cassini-Soldner<br />

Double Parallel Lambert<br />

General Transverse Mercator<br />

5000.0.0 Transfer, Convert, or List Information: Internal Routines – S4CDTR 55<br />

Modified Polyconic<br />

New Zealand Map Grid<br />

Oblique Transverse Mercator<br />

AXISA Semimajor Radius A if ISPCOD = 1* O N O O O N O O O O N O O O O O<br />

AXISB Semiminor Radius B if ISPCOD = 1* O N O O O N O O O O N O O O O O<br />

AZMTH Azimuth of center line at skew origin N N N N N N N N N N N Y N N N N<br />

BOTPAR Least Standard Parallel Y N N N N N N Y N N N N Y 1 N N N<br />

FEAST False Easting O O O O O O N O O O O O O O N O<br />

FNORTH False Northing O O O O O O O O O O N O O O O O<br />

IHEM Hemisphere N N N N N N N N N N N N N N O N<br />

IPJCOD Projection Code Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y<br />

ISPCOD Spheroid Code Y Y Y Y N N Y Y Y Y N Y Y Y Y Y<br />

IUNCOD Units Code Y Y Y Y Y Y Y Y Y Y N Y Y Y N Y<br />

IUTMCD UTM Zone N N N N N N N N N N N N N N O 4 N<br />

IRADTY Radius Calculation Method N N N N N N N N N N N N N N N Y<br />

REFLAT Reference Latitude Y 1 Y Y Y Y N Y Y Y Y 1 N Y Y N N N<br />

REFLON Reference Longitude Y 2 Y Y Y Y N Y Y Y Y 2 N Y Y Y O 3 Y<br />

SCALE Scale factor at origin N N N N N N N N N N N Y N N N N<br />

SFLAT Latitude Scale Factor N N N N N N N N N Y N N N N N N<br />

SFLON Longitude Scale Factor N N N N N N N N Y Y 2 N N N N N N<br />

TOPPAR Greatest Standard Parallel Y N N N N N N Y N N N N N N N N<br />

UNTFAC Unit Factor if IUNCOD = 1* O O O O O O O O O O N O O O N O<br />

Key:<br />

Y = argument required 1<br />

Also serves as a single standard parallel<br />

2<br />

N = argument not required<br />

Polyconic projection also has a central meridian with associated scale factor<br />

O = argument optional. If not<br />

specified, default value is used<br />

3 Hemisphere defines false northing for UTM<br />

4 One or the other is required<br />

* User defined<br />

Single Parallel Lambert<br />

Standard Mercator<br />

Universal Transverse Mercator<br />

Van Der Grinten I


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Routines to Transfer, Convert, or List Information<br />

SICTST<br />

Function Compute control point file statistics<br />

This subroutine obtains statistics about a control point file, which must<br />

contain an X (Easting) field and a Y (Northing) field.<br />

Environment The ZPI/O and ZIMS environments must be initialized before this<br />

routine is called.<br />

Format CALL SICTST (<br />

1 NAMDAF , MFDNDA , IHISDA , IZFLOC , NCPRED ,<br />

2 NCPWIN , NOZNON , XFIRST , YFIRST , ZFIRST ,<br />

3 XLAST , YLAST , ZLAST , XMIN , XMAX ,<br />

4 XRANGE , YMIN , YMAX , YRANGE, ZMIN ,<br />

5 ZMAX , ZRANGE , ZMEAN , ZRMS , ZSTD ,<br />

6 ZNON , ISTAT )<br />

Input Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

NAMDAF C*24 Name of the input control point file. It must<br />

contain an X (Easting) field and a Y (Northing)<br />

field.<br />

MFDNDA I Number of the master file containing the input<br />

data file.<br />

Range Options: 0–5<br />

IHISDA I History display for the input data file:<br />

0 = Do not display history information<br />

1 = Display history information<br />

IZFLOC I Field number of the non-text field in the control<br />

point file on which to obtain statistics, referred to<br />

as z statistics. A zero finds and uses the first field<br />

of the appropriate type.<br />

Recommend: 3<br />

56 Transfer, Convert, or List Information: Internal Routines – SICTST 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

NCPRED I Number of points read.<br />

NCPWIN I Number of points in the window.<br />

NOZNON I Number of null data values (ZNONs).<br />

XFIRST R First x coordinate.<br />

YFIRST R First y coordinate.<br />

ZFIRST R First z coordinate.<br />

XLAST R Last x coordinate.<br />

YLAST R Last y coordinate.<br />

ZLAST R Last z coordinate.<br />

XMIN R Minimum x value.<br />

XMAX R Maximum x value.<br />

XRANGE R Range of x.<br />

YMIN R Minimum y value.<br />

YMAX R Maximum y value.<br />

YRANGE R Range of y.<br />

ZMIN R Minimum z value.<br />

ZMAX R Maximum z value.<br />

ZRANGE R Range of z.<br />

ZMEAN R Mean of z.<br />

ZRMS R Root mean square of z.<br />

ZSTD R Standard deviation of z.<br />

ZNON R Null data value.<br />

5000.0.0 Transfer, Convert, or List Information: Internal Routines – SICTST 57


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

ISTAT I Status flag:<br />

0 = Operation was successful<br />

1 = Error, invalid master file number or<br />

master file is read-only<br />

2 = Error, duplicate files, specify master file<br />

number<br />

3 = Error, cannot find the file<br />

4 = Error, 5 files already in use<br />

5 = Error, reading parameter record<br />

6 = Error, reading field descriptors<br />

7 = Error, processing field descriptors<br />

missing x,y and/or z fields<br />

8 = Error, field chosen is character field<br />

58 Transfer, Convert, or List Information: Internal Routines – SICTST 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Routines to Transfer, Convert, or List Information<br />

SIFDST<br />

Function Compute statistics for a field<br />

This subroutine computes statistics for a non-character field. Field<br />

statistics for grid files and other special file types (file type greater than<br />

12) cannot be computed. See “Appendix B. File and Field Codes” in<br />

the Z-<strong>MAP</strong> <strong>Plus</strong> Reference Manual.<br />

Statistics are available for a grid file by using the grid statistics routine<br />

S2GRST.<br />

Environment The ZPI/O and ZIMS environments must be initialized before this<br />

routine is called.<br />

Format CALL SIFDST (<br />

1 NAMDAT , TYPRPT , ALLWIN , MFDDAT , IHSDAT ,<br />

2 IFDINX , WINMIN , WINMAX , NCPRED , NCPWIN ,<br />

3 NOZNON , FDFRST , FDLAST , FDMIN , F DMAX ,<br />

4 FDRANG , FDMEAN , FDRMS , FDSTD , FDREL ,<br />

5 ZNON , ISTAT )<br />

Input Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

NAMDAT C*24 Name of the input data file.<br />

TYPRPT C*8 Type of report printed:<br />

NONE = No report<br />

PARTIAL = Summary report<br />

FULL = Full report<br />

ALLWIN C*6 Type of data windowing. Blanked if the default<br />

is to be used.<br />

ALL = Examine all the field values.<br />

Window limits are set to –1.0E30<br />

and 1.0E30.<br />

WINDOW = Examine field values in window.<br />

MFDDAT I Number of the master file containing the input<br />

data file.<br />

IHSDAT I History display for data file:<br />

0 = Do not display history information<br />

1 = Display history information<br />

IFDINX I Field number of the field in the file for which<br />

statistics are to be computed. A zero finds and<br />

uses the first z value.<br />

WINMIN R Minimum allowed value. Values less than this<br />

bound are not used in the computation of the<br />

statistics. Required only if ALLWIN =<br />

WINDOW.<br />

5000.0.0 Transfer, Convert, or List Information: Internal Routines – SIFDST 59


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Argument<br />

Name<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

WINMAX R Maximum allowed value. Values greater than<br />

this bound are not used in the computation of the<br />

statistics. Required only if ALLWIN =<br />

WINDOW.<br />

Data<br />

Type<br />

Description<br />

and Default<br />

Description<br />

and Default<br />

NCPRED I Number of points read.<br />

NCPWIN I Number of points in the window.<br />

NOZNON I Number of null data values (ZNONs) on the file.<br />

FDFRST R First coordinate in the window.<br />

FDLAST R Last coordinate in the window.<br />

FDMIN R Minimum value used in the computation.<br />

FDMAX R Maximum value used in the computation.<br />

FDRANG R Range of values in the window.<br />

FDMEAN R Mean of values in the window.<br />

FDRMS R Root mean square of values in the window.<br />

FDSTD R Standard deviation of values in the window.<br />

FDREL R Relative variation of values in the window.<br />

ZNON R Null value.<br />

ISTAT I Status flag:<br />

0 = Operation was successful<br />

1 = Error, invalid master file number or<br />

master file is read-only<br />

2 = Error, duplicate files, specify master file<br />

number<br />

3 = Error, cannot find the file<br />

4 = Error, 5 files already in use<br />

5 = Error, statistics cannot be obtained for this<br />

file type<br />

6 = Error, reading parameter record<br />

7 = Error, reading field descriptors<br />

8 = Error, field selected is a character field<br />

9 = Error, invalid report type<br />

10 = Error, invalid field index<br />

11 = Error, problem computing field statistics<br />

60 Transfer, Convert, or List Information: Internal Routines – SIFDST 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Routines to Transfer, Convert, or List Information<br />

SIFLOT<br />

Function Transfer information from a member of a master file to an external file<br />

This subroutine transfers a member of a master file to an external data<br />

file, using the field and parameter descriptions on the member file or<br />

by means of a format file. For examples of format file descriptions, see<br />

“Appendix D. Import/Export” in the Z-<strong>MAP</strong> <strong>Plus</strong> Reference Manual.<br />

(Where the term format is used in this subroutine description, the term<br />

format group is used in “Appendix D. Import/Export.”)<br />

Environment The ZPI/O and ZIMS environments must be initialized before this<br />

routine is called.<br />

Format CALL SIFLOT (<br />

1 NAMDAT , NAMDIC , NAMGRP , NAMFIL , GRPCHR ,<br />

2 CMTCHR , HSTCHR , DICFLG , HDRFLG , MFDNUM ,<br />

3 IHSFIL , LOGDIC , LOGDAT , ISTAT )<br />

Input Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

NAMDAT C*80 Name of external output formatted data file.<br />

NAMDIC C*80 Name of format file containing the format.<br />

Blanked if there is none.<br />

NAMGRP C*40 Name of format in the NAMDIC file which<br />

describes the output formatted data file.<br />

NAMFIL C*24 Name of member file to be exported.<br />

GRPCHR C*1 Format identifier.<br />

Default = @<br />

CMTCHR C*1 Comment record identifier.<br />

Default = !<br />

HSTCHR C*1 History record identifier.<br />

Default = +<br />

DICFLG L Whether the file containing the format is to be<br />

used to export the data:<br />

.TRUE. = Use the file containing the format to output<br />

the data<br />

.FALSE. = Use the member descriptions to output the<br />

data<br />

5000.0.0 Transfer, Convert, or List Information: Internal Routines – SIFLOT 61


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Argument<br />

Name<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

HDRFLG L Whether the format descriptor group and history<br />

information is to be output to the formatted data<br />

file:<br />

.TRUE. = Include format descriptor group and history<br />

information on the formatted data file<br />

.FALSE. = Do not include format descriptor group and<br />

history information on the formatted data<br />

file<br />

MFDNUM I Number of the master file containing the member<br />

file to be exported.<br />

Range Options: 0–5<br />

IHSFIL I History display for the member file:<br />

0 = Do not display history information<br />

1 = Display history information<br />

LOGDIC I Logical unit number for the format file<br />

Default = 63, if DICFLG = .TRUE.<br />

Range Options: 0–99<br />

LOGDAT I Logical unit number for the output data file.<br />

Default = 64<br />

Range Options: 0–99<br />

Data<br />

Type<br />

Description<br />

and Default<br />

Description<br />

and Default<br />

ISTAT I Status flag:<br />

0 = Operation was successful<br />

1 = Error, problem importing data file<br />

2 = Error, the file format dataset and export<br />

file have the same name<br />

62 Transfer, Convert, or List Information: Internal Routines – SIFLOT 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Routines to Transfer, Convert, or List Information<br />

SIGLST<br />

Function List a grid as a grid or contours<br />

This subroutine prints a report of all or part of the grid, plots the<br />

contour representation, or both.<br />

Environment The ZPI/O and ZIMS environments must be initialized before this<br />

routine is called.<br />

Format CALL SIGLST (<br />

1 NAMGRI , GRDFMT , MFDGRD , IHSGRD , LOGRPT ,<br />

2 IRPTYP , NROWMN , NROWMX , NCOLMN, NCOLMX ,<br />

3 LBRWCL , NUMCTR , NUMPOS , CTRINT , CTRMIN ,<br />

4 ISTAT )<br />

Input Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

NAMGRI C*24 Name of the input grid.<br />

GRDFMT C*80 Output format for the grid report. Blanked if the<br />

default format is to be used.<br />

Default = (1X, 5(G13.7,2X))<br />

MFDGRD I Number of the master file containing the input<br />

grid.<br />

Range Options: 0–5<br />

IHSGRD I History display for input file:<br />

0 = Do not display history information<br />

1 = Display history information<br />

LOGRPT I Logical unit number on which to print the report.<br />

Range Options: 0–99<br />

IRPTYP I Report type:<br />

0 = Grid report<br />

1 = Contour report<br />

2 = Both reports<br />

NROWMN I Minimum row at which to begin printing (top<br />

edge of window).<br />

Default = 1<br />

NROWMX I Maximum row at which to end printing (bottom<br />

edge of window).<br />

Default = Number of rows<br />

5000.0.0 Transfer, Convert, or List Information: Internal Routines – SIGLST 63


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

NCOLMN I Minimum column at which to begin printing (left<br />

edge of window).<br />

Default = 1<br />

NCOLMX I Maximum column at which to end printing (right<br />

edge of window).<br />

Default = Number of columns<br />

LBRWCL I Whether to label the rows and columns. Needed<br />

only for grid report:<br />

0 = Do not label the rows and columns<br />

1 = Label the rows and columns<br />

NUMCTR I Number of contours. Needed only if contour plot<br />

requested.<br />

Range Options: 0–100<br />

NUMPOS I Number of print positions across the top of plot.<br />

Needed only if contour plot requested.<br />

Default = NCOLMX – NCOLMN + 1<br />

Range Options: 1–132<br />

CTRINT R Interval between adjacent contours. Needed only<br />

if contour plot requested.<br />

CTRMIN R Minimum contour interval at which to begin<br />

printing. Needed only if contour plot requested.<br />

64 Transfer, Convert, or List Information: Internal Routines – SIGLST 5000.0.0


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

ISTAT I Status flag:<br />

–3 = Warning, number of contour levels is<br />

greater than 100. It has been reset.<br />

–2 = Warning, bad input format. Default<br />

format being used.<br />

–1 = Warning, report unit was zero. It has been<br />

reset.<br />

0 = Operation was successful.<br />

1 = Error, invalid master file number or<br />

master file is read-only.<br />

2 = Error, duplicate files, specify master file<br />

number.<br />

3 = Error, cannot find the file.<br />

4 = Error, 5 files already in use.<br />

5 = Error, this is a data file not a grid file.<br />

6 = Error, problem reading parameter record.<br />

7 = Error, problem positioning the file.<br />

8 = Error, minimums must be less than the<br />

maximums.<br />

9 = Error, problem loading grid.<br />

10 = Error, problem printing grid report.<br />

11 = Error, the interval between adjacent<br />

contours is zero.<br />

65 Transfer, Convert, or List Information: Internal Routines 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Routines to Transfer, Convert, or List Information<br />

SILIST<br />

Function List a data file<br />

This subroutine prints a report listing of a data file.<br />

Note The format to print text strings must be in the form of nA4, where n is<br />

the number of words. (See the IFDFMT argument description below)<br />

Environment The ZPI/O and ZIMS environments must be initialized before this<br />

routine is called.<br />

Format CALL SILIST (<br />

1 NAMIDA , RPTITL , LINARA , ICLHDR , IFDFMT ,<br />

2 MFDIDA , IHISDA , LOGRPT , NUMLIN , LSTTYP ,<br />

3 ISTART , IEND , NUMFLD , ICLWID , IFDINX ,<br />

4 IWDINX , WIDMIN , WIDMAX , ISTAT )<br />

Input Arguments<br />

Z 8D 1074 = 9 chars = 3 words = 3A4<br />

Z-<strong>MAP</strong> #1 = 8 chars = 2 words = 2A4<br />

ZPIO LISTING = 12 chars = 3 words = 3A4<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

NAMIDA C*24 Name of the input data file.<br />

RPTITL C*80 Title for the report.<br />

LINARA C*40 Line or area name.<br />

ICLHDR C*20 Array, of length 10, containing the column<br />

headings for the fields that are to be printed.<br />

Blanked if default column headings are to be<br />

used.<br />

IFDFMT C*20 Array, of length 10, containing the format<br />

specifications for the fields that are to printed.<br />

Blanked if default print formats are to be used.<br />

Note: Character strings have the format of nA4,<br />

where n is number of words. See the note.<br />

MFDIDA I Number of the master file containing the input<br />

data file.<br />

Range Options: 0–5<br />

IHISDA I History display for the input data file:<br />

0 = Do not display history information<br />

1 = Display history information<br />

5000.0.0 Transfer, Convert, or List Information: Internal Routines 66


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

LOGRPT I Logical unit number on which to print the report.<br />

Range Options: 0–99<br />

NUMLIN I Number of lines per page. If NUMLIN is zero,<br />

the number of lines per page is 52.<br />

LSTTYP I Type of listing:<br />

0 = Automatic listing<br />

1 = Full listing<br />

2 = Line name<br />

3 = Area name<br />

4 = Window listing<br />

5 = Exception listing<br />

Note: Automatic listing lists first 10 fields on the<br />

data file using the standard formats.<br />

ISTART I Record number at which to start printing. If<br />

ISTART is zero, it is set to 1.<br />

IEND I Record number at which to end printing. If IEND<br />

is zero, it is set to the number of points on the file.<br />

NUMFLD I Number of fields to print. If NUMFLD is zero, all<br />

fields are printed.<br />

ICLWID I Array, of length 10, containing the widths of the<br />

columns.<br />

IFDINX I Array, of length 10, containing the field numbers<br />

of the fields to print.<br />

IWDINX I Array, of length 10, containing the field numbers<br />

of the fields used for windowing.<br />

WIDMIN R Array, of length 10, containing the minimum<br />

window values for the fields to print.<br />

WIDMAX R Array, of length 10, containing the maximum<br />

window values for the fields to print.<br />

67 Transfer, Convert, or List Information: Internal Routines 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

ISTAT I Status flag:<br />

–2 = Warning, number of fields on the file was<br />

greater than 10. Reset to 10.<br />

–1 = Warning, printer unit was zero. It has<br />

been reset.<br />

0 = Operation was successful.<br />

1 = Error, invalid master file number or<br />

master file is read-only.<br />

2 = Error, duplicate files, specify master file<br />

number.<br />

3 = Error, cannot find the file.<br />

4 = Error, 5 files already in use.<br />

5 = Error, this is a grid file, not a data file.<br />

6 = Error, problem reading parameter record.<br />

7 = Error, problem reading field descriptor.<br />

8 = Error, no area or line name field on file.<br />

9 = Error, problem positioning the file.<br />

10 = Error, there is no match for line or area<br />

name.<br />

11 = Error, problem creating field format.<br />

12 = Error, problem setting up column headers.<br />

5000.0.0 Transfer, Convert, or List Information: Internal Routines 68


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Introduction<br />

Internal Routines<br />

Draw and Plot Features<br />

Use the Draw and Plot Features subroutines for these tasks:<br />

draw lines from an array or member file<br />

display and plot a picture<br />

This section describes the following internal routines for drawing and<br />

plotting features:<br />

S2ALIN (page 70)<br />

S2DSPT (page 72)<br />

S3ZLIN (page 74)<br />

5000.0.0 Draw and Plot Features: Internal Routines – Contents 69


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Draw and Plot Routines<br />

S2ALIN<br />

Function Draw lines using array inputs<br />

This subroutine draws lines or curves by connecting pairs of x,y<br />

coordinates input as arrays.<br />

Dashed lines may use up to three different dash and gap lengths to<br />

define a dashed line pattern. For instance, a double dash patterned line<br />

may be used to create a dash-dot pattern. Similarly, a triple dash<br />

patterned line may be used to create a dash-dot-dot pattern.<br />

Environment The ZPI/O and ZIGS environments must be initialized and a graphics<br />

file and a picture opened before this routine is called.<br />

Format CALL S2ALIN (<br />

1 KOORD , IFSYMB , LINTYP , NUMPTS, ISYMBL ,<br />

2 DASHLN , GAPLEN , HAPART , HSHLEN , HSHWAY ,<br />

3 BWIDTH , SYMSIZ , XCOORD , YCOORD, CODES ,<br />

4 ISTAT )<br />

Input Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

KOORD I Coordinate system for the vertices:<br />

0 = Vertices are in engineering units<br />

1 = Vertices are in plotter units (in or cm).<br />

They will not be clipped.<br />

IFSYMB I Whether to post symbols at vertices:<br />

0 = Do not post symbols<br />

1 = Post symbols<br />

LINTYP I Type of line to draw:<br />

1 = Normal line<br />

2 = Single dash patterned line<br />

3 = Bold line<br />

4 = Normal line with hachure<br />

5 = Bold line with hachure<br />

6 = Double dash patterned line<br />

7 = Triple dash patterned line<br />

NUMPTS I Number of points in arrays XCOORD,<br />

YCOORD, and CODES.<br />

ISYMBL I Symbol code of symbol to draw at vertices:<br />

0 = Draw no symbols at the vertices, or<br />

symbol codes are in array CODES<br />

>0 = Symbol code of symbol to draw at all<br />

vertices. (See “Appendix C. Symbols,<br />

Fonts, and Line Patterns ” in the<br />

Z-<strong>MAP</strong> <strong>Plus</strong> Reference Manual.)<br />

70 Draw and Plot Features: Internal Routines – Contents 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

DASHLN R Array, of length 3, containing the lengths of the<br />

solid parts of the dash pattern, in plotter units (in<br />

or cm):<br />

DASHLN(1) = Length of first dash<br />

DASHLN(2) = Length of second dash<br />

DASHLN(3) = Length of third dash<br />

GAPLEN R Array, of length 3, containing the lengths of the<br />

gapped parts of the dash pattern, in plotter units<br />

(in or cm):<br />

GAPLEN(1) = Length of first gap<br />

GAPLEN(2) = Length of second gap<br />

GAPLEN(3) = Length of third gap<br />

HAPART R Length of the space between hachures, in plotter<br />

units (in or cm).<br />

HSHLEN R Length of the hachure marks, in plotter units (in<br />

or cm).<br />

HSHWAY R Direction of the hachure marks:<br />

–1 = Pointing uphill<br />

1 = Pointing downhill<br />

BWIDTH R Width of bold lines, in plotter units (in or cm).<br />

Range Options: 2–8<br />

SYMSIZ R Symbol size, in plotter units (in or cm).<br />

XCOORD R Array, of length NUMPTS, containing x<br />

coordinates of the vertices.<br />

YCOORD R Array, of length NUMPTS, containing y<br />

coordinates of the vertices.<br />

CODES R Array, of length NUMPTS, specifying a symbol<br />

code at each vertex.<br />

Output Arguments<br />

Argument Data Description<br />

Name Type and Default<br />

ISTAT I Status flag:<br />

0 = Operation was successful<br />

1 = Error, unsuccessful attempt to open a<br />

picture segment<br />

2 = Error, problem with the number of<br />

vertices<br />

Note: The number of vertices must be between 2<br />

and 5000. At least two points are needed<br />

to define a line. 5000 is an arbitrary limit<br />

chosen to distinguish between large, but<br />

legitimate, input arrays and undefined<br />

values of input argument NUMPTS.<br />

5000.0.0 Draw and Plot Features: Internal Routines – Contents 71


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Draw and Plot Routines<br />

S2DSPT<br />

Name S2DSPT<br />

Function Display a picture or plot a hardcopy of a picture<br />

This subroutine plots or displays a picture to a graphics terminal or<br />

plotter as described in the Work Station Description file.<br />

Environment The ZPI/O and ZIGS environments must be initialized and a graphics<br />

file and a picture opened before this routine is called.<br />

The plotter or terminal must also be assigned before this routine is<br />

called.<br />

Format CALL S2DSPT (<br />

1 ZGFNAM , PICNAM , NCOPYS , LINCUT , IDEVTY ,<br />

2 ILGBMD , IROTAT , IDUMMY , NUMLGB , LGBTYP ,<br />

3 SCLFCT , ISTAT )<br />

Input Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

ZGFNAM C*80 Name of the graphics file containing the input<br />

picture.<br />

PICNAM C*80 Name of the input picture.<br />

NCOPYS I Number of copies of the picture.<br />

LINCUT I Whether to draw a cutline:<br />

0 = Do not draw cutline<br />

1 = Draw cutline<br />

IDEVTY I Workstation type, from the Work Station<br />

Description file (WDF).<br />

ILGBMD I Which graphics features to plot:<br />

–1 = Plot all features<br />

1 = Plot only the features specified in<br />

LGBTYP<br />

2 = Plot all the features except those specified<br />

in LGBTYP<br />

IROTAT I Rotation flag:<br />

0 = Rotation not allowed for display/plot<br />

1 = Rotation allowed for display/plot<br />

72 Draw and Plot Features: Internal Routines – Contents 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Argument<br />

Name<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

IDUMMY I Reserved for future use.<br />

NUMLGB I Number of graphics feature codes in LGBTYP.<br />

Needed only if ILGBMD is 1 or 2.<br />

Range Options: 0–50<br />

LGBTYP I Array, of length NUMLGB, containing the<br />

graphics feature codes. (See “Appendix A.<br />

Graphics Feature Codes” in the Z-<strong>MAP</strong> <strong>Plus</strong><br />

Reference Manual.) Needed only if ILGBMD is<br />

1 or 2.<br />

SCLFCT R Scaling factor.<br />

Data<br />

Type<br />

Description<br />

and Default<br />

Description<br />

and Default<br />

ISTAT I Status flag:<br />

0 = Operation was successful<br />

1 = Error, performing hardcopy processing<br />

5000.0.0 Draw and Plot Features: Internal Routines – Contents 73


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Draw and Plot Routines<br />

S3ZLIN<br />

Function Draw lines using a member file<br />

This subroutine draws lines or curves by connecting pairs of x,y points.<br />

These vertices are contained in a member data file and are then written<br />

to the current picture.<br />

Dashed lines may use up to three different dash and gap lengths to<br />

define a dashed line pattern. For instance, a double dash patterned line<br />

can be used to create a dash-dot pattern. Similarly, a triple dash<br />

patterned line may be used to create a dash-dot-dot pattern.<br />

Environment The ZPI/O and ZIGS environments must be initialized and a graphics<br />

file and a picture opened before this routine is called.<br />

Format CALL S3ZLIN (<br />

1 NAMZIM , MFDNZM , IHISZM , KOORD , IFSYMB ,<br />

2 LINTYP , ISYMBL , IPYCLR , DASHLN , GAPLEN ,<br />

3 HAPART , HSHLEN , HSHWAY , BWIDTH , SYMSIZ ,<br />

4 ISTAT )<br />

Input Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

NAMZIM C*24 Name of the input data file containing the<br />

vertices.<br />

MFDNZM I Number of the master file containing the input<br />

data file.<br />

Range Options: 0–5<br />

IHISZM I History display for input data file:<br />

0 = Do not display history information<br />

1 = Display history information<br />

KOORD I Coordinate system for the vertices:<br />

0 = Vertices are specified in engineering units<br />

1 = Vertices are specified in plotter units (in<br />

or cm)<br />

IFSYMB I Whether to post symbols at vertices:<br />

0 = Do not post symbols<br />

1 = Post symbols<br />

74 Draw and Plot Features: Internal Routines – Contents 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

LINTYP I Type of line to draw:<br />

1 = Normal line<br />

2 = Single dash patterned line<br />

3 = Bold line<br />

4 = Normal line with hachure<br />

5 = Bold line with hachure<br />

6 = Double dash patterned line<br />

7 = Triple dash patterned line<br />

ISYMBL I Symbol code of symbol to draw at vertices:<br />

0 = Draw no symbol at the vertices<br />

>0 = Symbol code of symbol to draw at all<br />

vertices. See “Appendix C. Symbols,<br />

Fonts, and Line Patterns ” in the<br />

Z-<strong>MAP</strong> <strong>Plus</strong> Reference Manual.<br />

IPYCLR I Color index for lines:<br />

–1 = Use color field index on the file to draw<br />

lines<br />

0–255= Color index to use<br />

DASHLN R Array, of length 3, containing the lengths of the<br />

solid parts of the dash pattern, in plotter units (in<br />

or cm):<br />

DASHLN(1) = Length of first dash<br />

DASHLN(2) = Length of second dash<br />

DASHLN(3) = Length of third dash<br />

GAPLEN R Array, of length 3, containing the lengths of the<br />

gapped parts of the dash pattern, in plotter units<br />

(in or cm):<br />

GAPLEN(1) = Length of first gap<br />

GAPLEN(2) = Length of second gap<br />

GAPLEN(3) = Length of third gap<br />

HAPART R Length of the space between hachures, in plotter<br />

units (in or cm).<br />

HSHLEN R Length of the hachure marks, in plotter units (in<br />

or cm).<br />

HSHWAY R Direction of the hachure marks:<br />

–1 = Pointing uphill<br />

1 = Pointing downhill<br />

5000.0.0 Draw and Plot Features: Internal Routines – Contents 75


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Argument<br />

Name<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

BWIDTH R Width of bold lines, in plotter units (in or cm).<br />

SYMSIZ R Symbol size, in plotter units (in or cm).<br />

Data<br />

Type<br />

Description<br />

and Default<br />

Description<br />

and Default<br />

ISTAT I Status flag:<br />

0 = Operation was successful<br />

1 = Error, problem drawing lines<br />

76 Draw and Plot Features 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Introduction<br />

Internal Routines<br />

Graphics Utilities<br />

Use the Graphics Utilities subroutines for these tasks:<br />

initialize and terminate the graphics environment<br />

attach and detach graphics files<br />

open and close pictures<br />

use graphics and picture utilities<br />

design and create pictures from basic elements<br />

extract graphics elements<br />

Some library routines are not included in the documentation. These<br />

routines are used internally by other library routines and are typically<br />

not used by application programmers. The internal routines used for<br />

graphics utilities are:<br />

SICPCL Close out the picture copying environment by closing<br />

files<br />

SICPIT Initialize picture copying environment for the assemble/<br />

overlay routine SIPCAS<br />

5000.0.0 Graphics Utilities: Introduction 77


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Graphic Routines<br />

S2GMRK<br />

Function Draw markers<br />

This subroutine draws marker symbols to the current height, color, and<br />

type at an array of locations.<br />

This routine is only used for working on graphics features: It does not<br />

apply to the standard applications elsewhere in this guide.<br />

Environment The ZPI/O and ZIGS environments must be initialized and a graphics<br />

file, a picture and a graphics feature must be opened before this routine<br />

is called.<br />

Format CALL S2GMRK (<br />

1 NUMMRK , XCORS , YCORS , ROTATE , ISTAT )<br />

Input Arguments<br />

Argument<br />

Name<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

NUMMRK I Number of markers to draw.<br />

XCORS R Array, of length NUMMRK, containing the x<br />

coordinates of the center of the markers, in the<br />

currently defined coordinate system.<br />

YCORS R Array, of length NUMMRK, containing the y<br />

coordinates of the center of the markers, in the<br />

currently defined coordinate system.<br />

ROTATE R Array, of length NUMMRK, containing the<br />

angles of rotation for the markers, in degrees.<br />

Range Options: 0.0–360.0<br />

Data<br />

Type<br />

Description<br />

and Default<br />

ISTAT I Status flag:<br />

0 = Operation was successful<br />

1 = Error, number of markers is zero<br />

2 = Error, graphics feature is not open<br />

78 Graphics Utilities: Internal Routines – S2GMRK 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Graphic Routines<br />

S2ZGIN<br />

Name S2ZGIN<br />

Function Transfer the contents (pictures) of a neutral file to a graphics file<br />

This subroutine transfers all of the pictures in a neutral graphics file to<br />

a ZGF graphics file.<br />

Environment The ZPI/O and ZIGS environments must be initialized and the graphics<br />

file must not exist before this routine is called.<br />

Format CALL S2ZGIN (<br />

1 NAMFLT , NAMZGF , LEVRPT , LUNFLT , LUNZGF ,<br />

2 ISTAT )<br />

Input Arguments<br />

Argument<br />

Name<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

NAMFLT C*80 Name of neutral (disk) file.<br />

NAMZGF C*80 Name of new graphics file. If blank, the name of<br />

the graphics file is assumed to be the first record<br />

in the neutral file of the form:<br />

Col. 1–14 = $HT 88 NAMZGF<br />

Col. 15–80 = Name of the graphics file<br />

LEVRPT I Type of status report:<br />

0 = No status report<br />

1 = Status report output to unit LUNSTA<br />

specified by SIISIL<br />

LUNFLT I Number of logical unit on which to open the<br />

neutral file.<br />

Range Options: 0–99<br />

Recommend: 10<br />

LUNZGF I Number of logical unit on which to open the<br />

graphics file.<br />

Range Options: 0–99<br />

Recommend: 27<br />

Data<br />

Type<br />

Description<br />

and Default<br />

ISTAT I Status flag:<br />

0 = Operation was successful<br />

1 = Error, opening neutral file<br />

2 = Error, the input graphics filename is blank<br />

and the graphics name specified in the<br />

neutral file is blank also<br />

5000.0.0 Graphics Utilities: Internal Routines – S2ZGIN 79


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Graphic Routines<br />

S2ZGOT<br />

Function Transfer a set of pictures from a graphics file to a neutral file<br />

This subroutine transfers the requested pictures in a ZGF graphics file<br />

to a neutral graphics file.<br />

Environment The ZPI/O and ZIGS environments must be initialized before this<br />

routine is called.<br />

Format CALL S2ZGOT (<br />

1 NAMZGF , NAMFLT , NAMPIC , SELECT , NUMPIC ,<br />

3 LEVRPT , LUNZGF , LUNFLT , ISTAT )<br />

Input Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

NAMZGF C*80 Name of the input graphics file.<br />

NAMFLT C*80 Name of output neutral (disk) file.<br />

NAMPIC C*80 Array, of length NUMPIC, containing the names<br />

of pictures to be output. Required if SELECT =<br />

ONLY or EXCEPT.<br />

SELECT C*8 Which pictures in the graphics file to export.:<br />

ALL = Export all pictures on import graphics<br />

file<br />

ONLY = Export only the pictures specified in<br />

NAMPIC<br />

EXCEPT = Export all pictures except those<br />

specified by NAMPIC<br />

NUMPIC I Number of pictures to transfer from the graphics<br />

file to the neutral file. Required if SELECT =<br />

ONLY or EXCEPT.<br />

LEVRPT I Type of status report:<br />

0 = No status report<br />

1 = Status report output to unit LUNSTA<br />

specified by SIISIL<br />

LUNZGF I Number of logical unit on which to open the<br />

graphics file.<br />

Range Options: 0–99<br />

Recommend: 27<br />

LUNFLT I Number of logical unit on which to open the<br />

neutral file.<br />

Range Options: 0–99<br />

Recommend: 99<br />

80 Graphics Utilities: Internal Routines – S2ZGOT 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Graphic Routines<br />

S3GELM<br />

Function Obtain the next valid graphics element from a picture<br />

This subroutine returns the next valid graphics element decoded from a<br />

picture.<br />

Note Text is positioned by the method designated by ITXJUS, at the location<br />

specified by XARRAY,YARRAY.<br />

If ITXJUS = 1, the lower left corner of the text string is positioned at<br />

the specified coordinate.<br />

If ITXJUS = 2, the lower right corner of the text string is positioned at<br />

the specified coordinate.<br />

If ITXJUS = 3, the center of the text string is positioned at the<br />

specified coordinate.<br />

Environment A call to SOGLBG to retrieve the next graphics feature must be done<br />

before this routine is called.<br />

Format CALL S3GELM (<br />

1 LENARY , CTXSTR , ADRSTR , QGREND, QWINDW ,<br />

2 QVTSYM , ITYELM , ITMCLR , ITXFNT , ITXJUS ,<br />

3 NUMCHR , ITXCLR , ILINPAT , LINWID , LINCLR ,<br />

4 IFILCL , IVTSYM , NUMPTS , APID , APLEN ,<br />

5 MARKER , XARRAY , YARRAY , SYMANG, SYMHGT ,<br />

6 TXTANG , TXTHGT , DASLEN , DASGAP , HACLEN ,<br />

7 HACGAP , HACDIR , XWINDW , YWINDW, ISTAT )<br />

Input Arguments<br />

Argument<br />

Name<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

LENARY I Length of output arrays.<br />

Data<br />

Type<br />

Description<br />

and Default<br />

CTXSTR C*80 String containing output text, left justified.<br />

ADRSTR C*512 Application data information.<br />

QGREND L Logical for end of this group of graphics<br />

elements:<br />

.TRUE. = Get the next graphics feature<br />

.FALSE. = No more graphics elements<br />

5000.0.0 Graphics Utilities: Internal Routines – S3GELM 81


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

QWINDW L Whether there is a clipping window:<br />

.TRUE. = Clipping window is defined by XWINDW<br />

and YWINDW<br />

.FALSE. = No clipping window<br />

QVTSYM L Whether to post a symbol at each vertex of the<br />

line:<br />

.TRUE. = Post symbol at each vertex<br />

.FALSE. = Do not post symbol at each vertex<br />

ITMCLR I Color index of symbol, from color index section<br />

of color table.<br />

ITYELM I Type of element returned:<br />

1 = Lines<br />

2 = Text<br />

3 = Symbols<br />

4 = Colorfilled polygon<br />

ITXFNT I Type of text font. See “Appendix C. Symbols,<br />

Fonts, and Line Patterns ” in the Z-<strong>MAP</strong> <strong>Plus</strong><br />

Reference Manual.<br />

1 = Plain<br />

2 = Roman simplex<br />

3 = Roman complex<br />

4 = Italics<br />

5 = Duplex<br />

ITXJUS I Justification method:<br />

1 = Lower left<br />

2 = Lower right<br />

3 = Center<br />

NUMCHR I Number of characters in text string.<br />

ITXCLR I Color index of text, from color index section of<br />

color table.<br />

LINPAT I Type of line pattern:<br />

1 = Plain<br />

2 = Dashed<br />

3 = Hachured<br />

LINWID I Line width as integer multiple of plain line width.<br />

LINCLR I Color index of lines, from color index section of<br />

color table.<br />

82 Graphics Utilities: Internal Routines – S3GELM 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

IFILCL I Color index of polygon fill, from color index<br />

section of color table.<br />

IVTSYM I Symbol code for symbol to post at each vertex of<br />

a line. Needed if ITYELM = 1 and QVTSYM =<br />

.TRUE.<br />

NUMPTS I Number of points in the point string. This is the<br />

number of points returned and may be greater<br />

than LENARY.<br />

APID I Application data identifier.<br />

APLEN I Number of characters of application data<br />

information.<br />

MARKER I Array, of length LENARY, containing the codes<br />

of symbols to post at x,y locations.<br />

XARRAY R Array, of length LENARY, containing the x<br />

locations of points.<br />

YARRAY R Array, of length LENARY, containing the y<br />

locations of points.<br />

SYMANG R Array, of length LENARY, containing the<br />

symbol rotation angles, in degrees.<br />

Range Options: 0.0–360.0<br />

SYMHGT R Height of symbol, in plotter units (in or cm).<br />

TXTANG R Text rotation, in degrees.<br />

Range Options: 0.0–360.0<br />

TXTHGT R Text height, in plotter units (in or cm).<br />

DASLEN R Length of dashes, in plotter units (in or cm).<br />

DASGAP R Length of gap between dashes, in plotter units (in<br />

or cm).<br />

HACLEN R Length of hachure lines, in plotter units (in or<br />

cm).<br />

HACGAP R Length of gaps between hachure lines, in plotter<br />

units (in or cm).<br />

5000.0.0 Graphics Utilities: Internal Routines – S3GELM 83


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

HACDIR R Direction of hachures:<br />

–1 = Pointing uphill<br />

1 = Pointing downhill<br />

XWINDW R Array, of length 2, containing the x locations of<br />

the lower left and upper right corners of the<br />

clipping rectangle. Given if QWINDW = .TRUE.<br />

YWINDW R Array, of length 2, containing the y locations of<br />

the lower left and upper right corners of the<br />

clipping rectangle. Given if QWINDW = .TRUE.<br />

ISTAT I Status flag:<br />

–1 = Warning, length of output array exceeded<br />

0 = Operation was successful<br />

1 = Error, problem obtaining the next element<br />

84 Graphics Utilities: Internal Routines – S3GELM 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Graphic Routines<br />

S3IPIC<br />

Function Open a new or old picture<br />

This subroutine opens a picture in the current ZGF graphics file. When<br />

making a new picture, define parameters for the Area of Interest (AOI),<br />

map scale, cartographic projection, etc. See the projections table<br />

following the Output Arguments for correlative arguments. See the<br />

figure following the Output Arguments for reference to picture<br />

coordinates and offsets.<br />

If IBRTIP = 1, (lat/long border), use LONMND, LONMNM,<br />

LONMNS, etc., through LATMXS to describe the<br />

map AOI.<br />

If IBRTIP = 2, (rectilinear border) use VXMIN, VXMAX, VYMIN,<br />

VYMAX to describe the map border.<br />

Three methods are available for defining the map scale:<br />

assign values for map scale using variables X<strong>MAP</strong>SC and<br />

Y<strong>MAP</strong>SC<br />

compute values for map scale from variables XLONG, YLONG,<br />

and the map boundary<br />

compute values for map scale from variable IABSSC (absolute<br />

scale)<br />

Environment The ZPI/O and ZIGS environments must be initialized and a graphics<br />

file opened before this routine is called.<br />

Format CALL S3IPIC (<br />

1 PICTUR , IFOLD , IFABSC , IFPRJ , IBRTIP ,<br />

2 IABSSC , LONMND , LONMNM , LONMNS, LONMXD ,<br />

3 LONMXM , LONMXS , LATMND , LATMNM, LATMNS ,<br />

4 LATMXD , LATMXM , LATMXS , IHEM , IUTMCD ,<br />

5 IPJCOD , ISPCOD , IUNCOD , IRADTY , VXMIN ,<br />

6 VXMAX , VYMIN , VYMAX , XOFFST , FREEX ,<br />

7 YOFFST , FREEY , XSC<strong>MAP</strong> , YSC<strong>MAP</strong>, XLONG ,<br />

8 YLONG , BOTPAR , TOPPAR , REFLAT , SFLAT ,<br />

9 REFLON , SFLON , FNORTH , FEAST , UNTFAC ,<br />

AXISA , AXISB , AZMTH , SCALE , XLNVEW ,<br />

1 YLNVEW , ISTAT )<br />

5000.0.0 Graphics Utilities: Internal Routines – S3IPIC 85


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Input Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

PICTUR C*80 Name of picture.<br />

IFOLD C*3 Whether picture is new or old:<br />

NEW = Open a new picture<br />

OLD = Open an old picture<br />

IFABSC I Type of scale input:<br />

0 = Map/plotter scale input<br />

1 = Absolute scale input<br />

Output Arguments Input for new picture, Output for old picture<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

IFPRJ I Whether a projection is active:<br />

1 = No projection specified<br />

2 = Projection specified<br />

IBRTIP I Type of border:<br />

1 = Latitude/longitude border<br />

2 = Rectilinear border<br />

IABSSC I Absolute scale used if IFABSC = 1.<br />

Absolute scale can be used only if a map<br />

projection is defined. For an old picture, if IFPRJ<br />

= 2, a calculated value is returned. Otherwise it is<br />

set to zero.<br />

LONMND I Longitude minimum, in degrees or 10,000ths of a<br />

grad.<br />

LONMNM I Longitude minimum, in minutes. Not used for<br />

grads.<br />

LONMNS I Longitude minimum, in seconds. Not used for<br />

grads.<br />

LONMXD I Longitude maximum, in degrees or 10,000ths of<br />

a grad.<br />

LONMXM I Longitude maximum, in minutes. Not used for<br />

grads.<br />

LONMXS I Longitude maximum, in seconds. Not used for<br />

grads.<br />

LATMND I Latitude minimum, in degrees or 10,000ths of a<br />

grad.<br />

86 Graphics Utilities: Internal Routines – S3IPIC 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

LATMNM I Latitude minimum, in minutes. Not used for<br />

grads.<br />

LATMNS I Latitude minimum, in seconds. Not used for<br />

grads.<br />

LATMXD I Latitude maximum, in degrees or 10,000ths of a<br />

grad.<br />

LATMXM I Latitude maximum, in minutes. Not used for<br />

grads.<br />

LATMXS I Latitude maximum, in seconds. Not used for<br />

grads.<br />

IHEM * I Hemisphere. For an old picture, if IPJCOD = 1, a<br />

value of 1 or 2 is returned. Otherwise it is set to<br />

zero.<br />

1 = Northern<br />

2 = Southern<br />

IUTMCD * I UTM zone number. Used if IPJCOD = 1. (See<br />

“Appendix G. Mapping and Cartographic<br />

Projections” in the Z-<strong>MAP</strong> <strong>Plus</strong> Reference<br />

Manual.)<br />

5000.0.0 Graphics Utilities: Internal Routines – S3IPIC 87


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

IPJCOD * I Cartographic projection code:<br />

–17 = Grads and Van Der Grinten I<br />

–16 = Grads and Bipolar Oblique Conic<br />

Conformal<br />

–15 = Grads and Cassini-Soldner<br />

–14 = Grads and New Zealand Map Grid<br />

–13 = Grads and Oblique Transverse Mercator<br />

–12 = Grads and American Polyconic<br />

–11 = Currently not used<br />

–10 = Grads and Alber’s Equal Area<br />

(equivalent) with two standard parallels<br />

–9 = Grads and Modified Rectangular<br />

Orthotomic Polyconic<br />

–8 = Grads and Azimuthal Orthographic<br />

–7 = Grads and Azimuthal Stereographic<br />

–6 = Grads and Azimuthal Gnomonic<br />

–5 = Grads and Conformal Lambert with two<br />

standard parallels<br />

–4 = Grads and Conformal Lambert with one<br />

standard parallel<br />

–3 = Grads and Standard Mercator<br />

–2 = Grads and General Transverse Mercator<br />

–1 = Currently not used<br />

0 = Currently not used<br />

1 = Degrees and Universal Transverse<br />

Mercator<br />

2 = Degrees and General Transverse Mercator<br />

3 = Degrees and Standard Mercator<br />

4 = Degrees and Conformal Lambert with one<br />

standard parallel<br />

5 = Degrees and Conformal Lambert with two<br />

standard parallels<br />

6 = Degrees and Azimuthal Gnomonic<br />

7 = Degrees and Azimuthal Stereographic<br />

8 = Degrees and Azimuthal Orthographic<br />

9 = Degrees and Modified Rectangular<br />

Orthotomic (Polyconic)<br />

10 = Degrees and Alber’s Equal Area<br />

equivalent with two standard parallels<br />

11 = Currently not used<br />

12 = Degrees and American Polyconic<br />

13 = Degrees and Oblique Transverse<br />

Mercator<br />

14 = Degrees and New Zealand Map Grid<br />

15 = Degrees and Cassini-Soldner<br />

16 = Degrees and Bipolar Oblique Conic<br />

Conformal<br />

17 = Degrees and Van Der Grinten I<br />

88 Graphics Utilities: Internal Routines – S3IPIC 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

ISPCOD * I Reference spheroid:<br />

1 = User defined<br />

2 = Everest 1830<br />

3 = Malayan Everest 1830<br />

4 = Bessel 1841<br />

5 = Airy 1858<br />

6 = Clarke 1858<br />

7 = Clarke 1866<br />

8 = Clarke 1880<br />

9 = Hayford 1909<br />

10 = Krassovsky 1940<br />

11 = Hough 1956<br />

12 = Fischer 1960 (Mercury)<br />

13 = Kaula 1961<br />

14 = IUGG 1967 (Australian National 1967/<br />

South American 1969)<br />

15 = Fischer 1968 (Mercator modified)<br />

16 = WGS-72 1972<br />

17 = IUGG 1975<br />

18 = Helmert<br />

19 = Ghana National<br />

20 = WGS-84 (GRS-80)<br />

IUNCOD * I Units for projected coordinates:<br />

1 = User defined<br />

2 = Meters<br />

3 = Feet<br />

4 = Yards<br />

5 = Inches<br />

6 = Kilometers<br />

7 = Nautical miles<br />

8 = Statute miles<br />

9 = U S Survey feet<br />

IRADTY * I Type of calculation to use to convert spheroid<br />

dimensions A & B to radius:<br />

1 = Equatorial<br />

2 = Equal Surface Area<br />

3 = Equal Volume<br />

4 = Gaussian<br />

VXMIN D Minimum x value, in engineering units.<br />

VXMAX D Maximum x value, in engineering units.<br />

VYMIN D Minimum y value, in engineering units.<br />

VYMAX D Maximum y value, in engineering units.<br />

5000.0.0 Graphics Utilities: Internal Routines – S3IPIC 89


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

XOFFST R Border width around left of map, in plotter units<br />

(in or cm).<br />

FREEX R Border width around right of map, in plotter units<br />

(in or cm).<br />

YOFFST R Border width below map, in plotter units (in or<br />

cm).<br />

FREEY R Border width above map, in plotter units (in or<br />

cm).<br />

XSC<strong>MAP</strong> R Map scale x direction, in map units per plotter<br />

unit.<br />

YSC<strong>MAP</strong> R Map scale y direction, in map units per plotter<br />

units.<br />

XLONG R The x direction AOI length, in plotter units (in or<br />

cm).<br />

(VXMAX–VXMIN)/XSC<strong>MAP</strong>.<br />

YLONG R The y direction AOI length, in plotter units (in or<br />

cm).<br />

(VYMAX–VYMIN)/YSC<strong>MAP</strong>.<br />

BOTPAR * R Standard parallel closest to the equator (least), in<br />

degrees.<br />

TOPPAR * R Standard parallel farthest from the equator<br />

(greatest), in degrees.<br />

REFLAT * R Reference latitude.<br />

SFLAT * R Scale factor along reference latitude.<br />

NOTE: Set this variable to a value greater than<br />

0.0.<br />

REFLON * R Reference longitude.<br />

SFLON * R Scale factor along reference longitude.<br />

NOTE: Set this variable to a value greater than 0.0.<br />

FNORTH * R False northing.<br />

FEAST * R False easting.<br />

90 Graphics Utilities: Internal Routines – S3IPIC 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

UNTFAC * R Projected coordinates units factor. Needed only if<br />

IUNCOD = 1.<br />

AXISA * R Semimajor axis A. Needed only if ISPCOD = 1.<br />

AXISB * R Semiminor axis B. Needed only if ISPCOD = 1.<br />

AZMTH * R Azimuth of central line at skew origin.<br />

SCALE * R Scale factor at origin.<br />

XLNVEW R The x direction length of the whole plot.<br />

XLNVEW = XOFFST + XLONG + FREEX.<br />

YLNVEW R The y direction length of the whole plot.<br />

YLNVEW = YOFFST + YLONG + FREEY.<br />

ISTAT I Status flag:<br />

0 = Operation was successful<br />

1 = Error, opening picture<br />

2 = Error, reading picture header<br />

3 = Error, invalid use of absolute scale<br />

4 = Error, invalid picture type<br />

5 = Error, problem with old picture<br />

6 = Error, problem with new picture<br />

Note: Map projection is required for absolute<br />

scale.<br />

5000.0.0 Graphics Utilities: Internal Routines – S3IPIC 91


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Graphic Routines<br />

S3NPIC<br />

Function Open a new picture<br />

This subroutine opens a new picture on the current graphics file. When<br />

making a new picture, define parameters for the Area of Interest (AOI),<br />

map scale, cartographic projection, etc. See the projections table<br />

following the Output Arguments for correlative arguments. See the<br />

figure following the Output Arguments for reference to picture<br />

coordinates and offsets.<br />

If IBRTIP = 1, (lat/long border), use LONMND, LONMNM,<br />

LONMNS, etc., through LATMXS to describe the<br />

map AOI.<br />

If IBRTIP = 2, (rectilinear border) use VXMIN, VXMAX, VYMIN,<br />

VYMAX to describe the map border.<br />

Three methods are available for defining the map scale:<br />

assign values for map scale using variables X<strong>MAP</strong>SC and<br />

Y<strong>MAP</strong>SC<br />

compute values for map scale from variables XLONG, YLONG,<br />

and the map boundary<br />

compute values for map scale from variable IABSSC (absolute<br />

scale)<br />

Note If the left longitude is greater than the right longitude, the map is made<br />

across the dateline.<br />

You cannot map across the dateline if using grads. For grads, left<br />

longitude cannot be greater than right longitude.<br />

Environment The ZPI/O and ZIGS environments must be initialized and a graphics<br />

file opened before this routine is called.<br />

Format CALL S2NPIC (<br />

1 PICTUR , IFABSC , IFPRJ , IBRTIP , IABSSC ,<br />

2 LONMND , LONMNM , LONMNS , LONMXD, LONMXM ,<br />

3 LONMXS , LATMND , LATMNM , LATMNS, LATMXD ,<br />

4 LATMXM , LATMXS , IHEM , IUTMCD , IPJCOD ,<br />

5 ISPCOD , IUNCOD , IRADTY , VXMIN , VXMAX ,<br />

6 VYMIN , VYMAX , XOFFST , FREEX , YOFFST ,<br />

7 FREEY , XSC<strong>MAP</strong> , YSC<strong>MAP</strong> , XLONG , YLONG ,<br />

8 BOTPAR , TOPPAR , REFLAT , SFLAT , REFLON ,<br />

9 SFLON , FNORTH , FEAST , UNTFAC , AXISA ,<br />

* AXISB , AZMTH , SCALE , XLNVEW, YLNVEW ,<br />

1 ISTAT )<br />

92 Graphics Utilities: Internal Routines – S3NPIC 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Input Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

PICTUR C*80 Name of picture.<br />

IFABSC I Type of scale input:<br />

0 = Map/Plotter units scale input<br />

1 = Absolute scale input<br />

IFPRJ I Whether a projection is active:<br />

1 = No projection specified<br />

2 = Projection specified<br />

IBRTIP I Type of border:<br />

1 = Latitude/Longitude border<br />

2 = Rectilinear border<br />

IABSSC I Absolute scale used if IFABSC = 1.<br />

Absolute scale may be used only if a map<br />

projection is defined.<br />

LONMND I Longitude minimum, in degrees or 10,000ths of a<br />

grad.<br />

LONMNM I Longitude minimum, in minutes. Not used for<br />

grads.<br />

LONMNS I Longitude minimum, in seconds. Not used for<br />

grads.<br />

LONMXD I Longitude maximum, in degrees or 10,000ths of<br />

a grad.<br />

LONMXM I Longitude maximum, in minutes. Not used for<br />

grads.<br />

LONMXS I Longitude maximum, in seconds. Not used for<br />

grads.<br />

LATMND I Latitude minimum, in degrees or 10,000ths of a<br />

grad.<br />

LATMNM I Latitude minimum, in minutes. Not used for<br />

grads.<br />

LATMNS I Latitude minimum, in seconds. Not used for<br />

grads.<br />

5000.0.0 Graphics Utilities: Internal Routines – S3NPIC 93


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Argument<br />

Name<br />

LATMXD I Latitude maximum, in degrees or 10,000ths of a<br />

grad.<br />

LATMXM I Latitude maximum, in minutes. Not used for<br />

grads.<br />

LATMXS I Latitude maximum, in seconds. Not used for<br />

grads.<br />

IHEM * I Hemisphere. Required if IPJCOD = 1:<br />

1 = Northern<br />

2 = Southern<br />

IUTMCD<br />

*<br />

Data<br />

Type<br />

Description<br />

and Default<br />

I UTM zone number. (See “Appendix G. Mapping<br />

and Cartographic Projections” in the Z-<strong>MAP</strong> <strong>Plus</strong><br />

Reference Manual.)<br />

94 Graphics Utilities: Internal Routines – S3NPIC 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

IPJCOD * I Cartographic projection code:<br />

–17 = Grads and Van Der Grinten I<br />

–16 = Grads and Bipolar Oblique Conic<br />

Conformal<br />

–15 = Grads and Cassini-Soldner<br />

–14 = Grads and New Zealand Map Grid<br />

–13 = Grads and Oblique Transverse Mercator<br />

–12 = Grads and American Polyconic<br />

–11 = Currently not used<br />

–10 = Grads and Alber’s Equal Area<br />

(equivalent) with two standard parallels<br />

–9 = Grads and Modified Rectangular<br />

Orthotomic Polyconic<br />

–8 = Grads and Azimuthal Orthographic<br />

–7 = Grads and Azimuthal Stereographic<br />

–6 = Grads and Azimuthal Gnomonic<br />

–5 = Grads and Conformal Lambert with two<br />

standard parallels<br />

–4 = Grads and Conformal Lambert with one<br />

standard parallel<br />

–3 = Grads and Standard Mercator<br />

–2 = Grads and General Transverse Mercator<br />

–1 = Currently not used<br />

0 = Currently not used<br />

1 = Degrees and Universal Transverse<br />

Mercator<br />

2 = Degrees and General Transverse Mercator<br />

3 = Degrees and Standard Mercator<br />

4 = Degrees and Conformal Lambert with one<br />

standard parallel<br />

5 = Degrees and Conformal Lambert with two<br />

standard parallels<br />

6 = Degrees and Azimuthal Gnomonic<br />

7 = Degrees and Azimuthal Stereographic<br />

8 = Degrees and Azimuthal Orthographic<br />

9 = Degrees and Modified Rectangular<br />

Orthotomic Polyconic)<br />

10 = Degrees and Alber’s Equal Area<br />

equivalent with two standard parallels<br />

11 = Currently not used<br />

12 = Degrees and American Polyconic<br />

13 = Degrees and Oblique Transverse<br />

Mercator<br />

14 = Degrees and New Zealand Map Grid<br />

15 = Degrees and Cassini-Soldner<br />

16 = Degrees and Bipolar Oblique Conic<br />

Conformal<br />

17 = Degrees and Van Der Grinten I<br />

5000.0.0 Graphics Utilities: Internal Routines – S3NPIC 95


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

ISPCOD * I Reference spheroid:<br />

1 = User defined<br />

2 = Everest 1830<br />

3 = Malayan Everest 1830<br />

4 = Bessel 1841<br />

5 = Airy 1858<br />

6 = Clarke 1858<br />

7 = Clarke 1866<br />

8 = Clarke 1880<br />

9 = Hayford 1909<br />

10 = Krassovsky 1940<br />

11 = Hough 1956<br />

12 = Fischer 1960 (Mercury)<br />

13 = Kaula 1961<br />

14 = IUGG 1967 (Australian National 1967/<br />

South American 1969)<br />

15 = Fischer 1968 (Mercator modified)<br />

16 = WGS-72 1972<br />

17 = IUGG 1975<br />

18 = Helmert<br />

19 = Ghana National<br />

20 = WGS-84 (GRS-80)<br />

IUNCOD * I Units for projected coordinates:<br />

1 = User defined<br />

2 = Meters<br />

3 = Feet<br />

4 = Yards<br />

5 = Inches<br />

6 = Kilometers<br />

7 = Nautical miles<br />

8 = Statute miles<br />

9 = U S Survey feet<br />

IRADTY * I Type of calculation to use to convert spheroid<br />

dimensions A & B to radius:<br />

1 = Equatorial<br />

2 = Equal Surface Area<br />

3 = Equal Volume<br />

4 = Gaussian<br />

VXMIN D Minimum x value, in engineering units.<br />

VXMAX D Maximum x value, in engineering units.<br />

VYMIN D Minimum y value, in engineering units.<br />

VYMAX D Maximum y value, in engineering units.<br />

96 Graphics Utilities: Internal Routines – S3NPIC 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Argument<br />

Name<br />

XOFFST R Border width around left of map, in plotter units<br />

(in or cm).<br />

FREEX R Border width around right of map, in plotter units<br />

(in or cm).<br />

YOFFST R Border width below map, in plotter units (in or<br />

cm).<br />

FREEY R Border width above map, in plotter units (in or<br />

cm).<br />

XSC<strong>MAP</strong> R Map scale x direction, in map/plotter units.<br />

YSC<strong>MAP</strong> R Map scale y direction, in map/plotter units.<br />

XLONG R The x direction AOI length, in map/plotter units.<br />

(VXMAX – VXMIN)/XSC<strong>MAP</strong>.<br />

YLONG R The y direction AOI length, in map/plotter units.<br />

(VYMAX – VYMIN)/YSC<strong>MAP</strong>.<br />

BOTPAR<br />

*<br />

R Standard parallel closest to equator (least), in<br />

degrees.<br />

TOPPAR * R Standard parallel farthest from equator (greatest),<br />

in degrees.<br />

REFLAT * R Reference latitude.<br />

SFLAT * R Scale factor along reference latitude.<br />

REFLON * R Reference longitude.<br />

SFLON * R Scale factor along reference longitude.<br />

FNORTH<br />

*<br />

R False northing.<br />

FEAST * R False easting.<br />

UNTFAC<br />

*<br />

Data<br />

Type<br />

Description<br />

and Default<br />

R Projected coordinates units factor. Needed only if<br />

IUNCOD = 1.<br />

AXISA * R Semimajor axis A. Needed only if ISPCOD = 1.<br />

5000.0.0 Graphics Utilities: Internal Routines – S3NPIC 97


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Output Arguments<br />

Argument<br />

Name<br />

AXISB * R Semiminor axis B. Needed only if ISPCOD = 1.<br />

AZMTH * R Azimuth of central line at skew origin.<br />

SCALE * R Scale factor at origin.<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Data<br />

Type<br />

Description<br />

and Default<br />

Description<br />

and Default<br />

XLNVEW R The x direction length of the whole plot.<br />

XLNVEW = XOFFST + XLONG + FREEX.<br />

YLNVEW R The y direction length of the whole plot.<br />

YLNVEW = YOFFST + YLONG + FREEY.<br />

ISTAT I Status flag:<br />

0 = Operation was successful.<br />

1 = Error, opening picture.<br />

2 = Error, illegal use of absolute scale.<br />

3 = Error, invalid reference longitude if UTM<br />

ZONE is not specified.<br />

4 = Error, in inverse projection.<br />

5 = Error, insufficient workspace to develop<br />

lat/long border.<br />

6 = Error, less than three points in lat/long<br />

border. Cannot do clipping.<br />

Note: Map projection is required for absolute<br />

scale.<br />

98 Graphics Utilities: Internal Routines – S3NPIC 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Name Description<br />

Table 2: Checklist for Projection Arguments and Projection Type<br />

Arguments<br />

Alber’s Equal Area<br />

American Polyconic<br />

Azimuthal Gnomonic<br />

Azimuthal Orthographic<br />

Azimuthal Stereographic<br />

Bipolar Oblique Conic Conformal<br />

Projection Type<br />

Cassini-Soldner<br />

Double Parallel Lambert<br />

General Transverse Mercator<br />

5000.0.0 Graphics Utilities: Internal Routines – S3NPIC 99<br />

Modified Polyconic<br />

New Zealand Map Grid<br />

Oblique Transverse Mercator<br />

AXISA Semimajor Radius A if ISPCOD = 1* O N O O O N O O O O N O O O O O<br />

AXISB Semiminor Radius B if ISPCOD = 1* O N O O O N O O O O N O O O O O<br />

AZMTH Azimuth of center line at skew origin N N N N N N N N N N N Y N N N N<br />

BOTPAR Least Standard Parallel Y N N N N N N Y N N N N Y 1 N N N<br />

FEAST False Easting O O O O O O N O O O O O O O N O<br />

FNORTH False Northing O O O O O O O O O O N O O O O O<br />

IHEM Hemisphere N N N N N N N N N N N N N N O N<br />

IPJCOD Projection Code Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y<br />

ISPCOD Spheroid Code Y Y Y Y N N Y Y Y Y N Y Y Y Y Y<br />

IUNCOD Units Code Y Y Y Y Y Y Y Y Y Y N Y Y Y N Y<br />

IUTMCD UTM Zone N N N N N N N N N N N N N N O 4 N<br />

IRADTY Radius Calculation Method N N N N N N N N N N N N N N N Y<br />

REFLAT Reference Latitude Y 1 Y Y Y Y N Y Y Y Y 1 N Y Y N N N<br />

REFLON Reference Longitude Y 2 Y Y Y Y N Y Y Y Y 2 N Y Y Y O 3 Y<br />

SCALE Scale factor at origin N N N N N N N N N N N Y N N N N<br />

SFLAT Latitude Scale Factor N N N N N N N N N Y N N N N N N<br />

SFLON Longitude Scale Factor N N N N N N N N Y Y 2 N N N N N N<br />

TOPPAR Greatest Standard Parallel Y N N N N N N Y N N N N N N N N<br />

UNTFAC Unit Factor if IUNCOD = 1* O O O O O O O O O O N O O O N O<br />

Key:<br />

Y = argument required<br />

N = argument not required<br />

O = argument optional. If not<br />

specified, default value is used<br />

1<br />

Also serves as a single standard parallel<br />

2<br />

Polyconic projection also has a central meridian with associated scale factor<br />

3<br />

Hemisphere defines false northing for UTM<br />

4<br />

One or the other is required<br />

* User defined<br />

Single Parallel Lambert<br />

Standard Mercator<br />

Universal Transverse Mercator<br />

Van Der Grinten I


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

YLNVEW<br />

YLONG<br />

Cutline<br />

*<br />

(0.0,0.0)<br />

XOFFST<br />

(VXMIN,VYMIN)<br />

FREEY<br />

Scaled Area<br />

(“User” units)<br />

YOFFST<br />

XLONG<br />

XLNVEW<br />

No graphics may appear outside “Unscaled” Area<br />

Display Area for a Picture<br />

(VXMAX,VYMAX)<br />

User Units. For example, Northing/Easting, etc.<br />

Used for “Scaled” area of the picture<br />

Range for x is VXMIN to VXMAX<br />

for y is VYMIN to VYMAX<br />

Length in x is XLONG = (VXMAX – VXMIN)<br />

y is YLONG = (VYMAX – VYMIN)<br />

Plotter Units. Inches or centimeters<br />

Used for “Unscaled” area of the picture<br />

Range for x is 0.0 to XLNVEW<br />

for y is 0.0 to YLNVEW<br />

Length in x is XLNVEW<br />

y is YLNVEW<br />

XOFFST Border width around left of map<br />

YOFFST Border width below map<br />

FREEX Border width around right of map<br />

FREEY Border width above map<br />

(XLNVEW,YLNVEW)<br />

FREEX<br />

Unscaled Area<br />

(“Plotter” units)<br />

In General<br />

TOP/BOTTOM Refers to longitude or eastings<br />

LEFT/RIGHT SIDES Refers to latitude or northings<br />

100 Graphics Utilities: Internal Routines – S3NPIC 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Graphic Routines<br />

S3OPIC<br />

Function Open an old picture<br />

This subroutine opens an old picture on the current graphics file. See<br />

the figure following Output Arguments for reference to picture<br />

coordinates and offsets.<br />

Environment The ZPI/O and ZIGS environments must be initialized and the graphics<br />

file opened before this routine is called.<br />

Format CALL S3OPIC (<br />

1 PICTUR , IFPRJ , IBRTIP , IABSSC , LONMND ,<br />

2 LONMNM , LONMNS , LONMXD , LONMXM, LONMXS ,<br />

3 LATMND , LATMNM , LATMNS , LATMXD, LATMXM ,<br />

4 LATMXS , IHEM , IUTMCD , IPJCOD , ISPCOD ,<br />

5 IUNCOD , IRADTY , VXMIN , VXMAX , VYMIN ,<br />

6 VYMAX , XOFFST , FREEX , YOFFST , FREEY ,<br />

7 XSC<strong>MAP</strong> , YSC<strong>MAP</strong> , XLONG , YLONG , BOTPAR ,<br />

8 TOPPAR , REFLAT , SFLAT , REFLON , SFLON ,<br />

9 FNORTH , FEAST , UNTFAC , AXISA , AXISB ,<br />

* AZMTH , SCALE , XLNVEW , YLNVEW, ISTAT )<br />

Input Arguments<br />

Argument<br />

Name<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

PICTUR C*80 Name of picture.<br />

Data<br />

Type<br />

Description<br />

and Default<br />

IFPRJ I Whether a projection is active:<br />

1 = No projection specified<br />

2 = Projection specified<br />

IBRTIP I Type of border:<br />

1 = Latitude/Longitude border<br />

2 = Rectilinear border<br />

IABSSC I Absolute scale. A value is returned if IFPRJ = 2;<br />

otherwise, it is set to zero.<br />

LONMND I Longitude minimum, in degrees or 10,000ths of a<br />

grad.<br />

5000.0.0 Graphics Utilities: Internal Routines – S3OPIC 101


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

LONMNM I Longitude minimum, in minutes. Not used for<br />

grads.<br />

LONMNS I Longitude minimum, in seconds. Not used for<br />

grads.<br />

LONMXD I Longitude maximum, in degrees or 10,000ths of<br />

a grad.<br />

LONMXM I Longitude maximum, in minutes. Not used for<br />

grads.<br />

LONMXS I Longitude maximum, in seconds. Not used for<br />

grads.<br />

LATMND I Latitude minimum, in degrees or integer<br />

10,000ths of a grad.<br />

LATMNM I Latitude minimum, in minutes. Not used for<br />

grads.<br />

LATMNS I Latitude minimum, in seconds. Not used for<br />

grads.<br />

LATMXD I Latitude maximum, in degrees or 10,000ths of a<br />

grad.<br />

LATMXM I Latitude maximum, in minutes. Not used for<br />

grads.<br />

LATMXS I Latitude maximum, in seconds. Not used for<br />

grads.<br />

IHEM * I Hemisphere. A value is returned if IPJCOD = 1;<br />

otherwise, it is set to zero:1<br />

1 = Northern<br />

2 = Southern<br />

IUTMCD * I UTM zone number. (See “Appendix G. Mapping<br />

and Cartographic Projections” in the Z-<strong>MAP</strong> <strong>Plus</strong><br />

Reference Manual.)<br />

102 Graphics Utilities: Internal Routines – S3OPIC 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Argument<br />

Name<br />

IPJCOD * I Cartographic projection code:<br />

–17 = Grads and Van Der Grinten I<br />

–16 = Grads and Bipolar Oblique Conic<br />

Conformal<br />

–15 = Grads and Cassini-Soldner<br />

–14 = Grads and New Zealand Map Grid<br />

–13 = Grads and Oblique Transverse Mercator<br />

–12 = Grads and American Polyconic<br />

–11 = Currently not used<br />

–10 = Grads and Alber’s Equal Area<br />

(equivalent) with two standard parallels<br />

–9 = Grads and Modified Rectangular<br />

Orthotomic Polyconic<br />

–8 = Grads and Azimuthal Orthographic<br />

–7 = Grads and Azimuthal Stereographic<br />

–6 = Grads and Azimuthal Gnomonic<br />

–5 = Grads and Conformal Lambert with two<br />

standard parallels<br />

–4 = Grads and Conformal Lambert with one<br />

standard parallel<br />

–3 = Grads and Standard Mercator<br />

–2 = Grads and General Transverse Mercator<br />

–1 = Currently not used<br />

0 = Currently not used<br />

IPJCOD *<br />

(cont.)<br />

Data<br />

Type<br />

Description<br />

and Default<br />

I Cartographic projection code (cont.):<br />

1 = Degrees and Universal Transverse<br />

Mercator<br />

2 = Degrees and General Transverse Mercator<br />

3 = Degrees and Standard Mercator<br />

4 = Degrees and Conformal Lambert with one<br />

standard parallel<br />

5 = Degrees and Conformal Lambert with two<br />

standard parallels<br />

6 = Degrees and Azimuthal Gnomonic<br />

7 = Degrees and Azimuthal Stereographic<br />

8 = Degrees and Azimuthal Orthographic<br />

9 = Degrees and Modified Rectangular<br />

Orthotomic Polyconic)<br />

10 = Degrees and Alber’s Equal Area<br />

equivalent with two standard parallels<br />

11 = Currently not used<br />

12 = Degrees and American Polyconic<br />

13 = Degrees and Oblique Transverse<br />

Mercator<br />

14 = Degrees and New Zealand Map Grid<br />

15 = Degrees and Cassini-Soldner<br />

16 = Degrees and Bipolar Oblique Conic<br />

Conformal<br />

17 = Degrees and Van Der Grinten I<br />

5000.0.0 Graphics Utilities: Internal Routines – S3OPIC 103


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

ISPCOD * I Reference spheroid:<br />

1 = User defined<br />

2 = Everest 1830<br />

3 = Malayan Everest 1830<br />

4 = Bessel 1841<br />

5 = Airy 1858<br />

6 = Clarke 1858<br />

7 = Clarke 1866<br />

8 = Clarke 1880<br />

9 = Hayford 1909<br />

10 = Krassovsky 1940<br />

11 = Hough 1956<br />

12 = Fischer 1960 (Mercury)<br />

13 = Kaula 1961<br />

14 = IUGG 1967 (Australian National 1967/<br />

South American 1969)<br />

15 = Fischer 1968 (Mercator modified)<br />

16 = WGS-72 1972<br />

17 = IUGG 1975<br />

18 = Helmert<br />

19 = Ghana National<br />

20 = WGS-84 (GRS-80)<br />

IUNCOD * I Units for projected coordinates:<br />

1 = User-supplied<br />

2 = Meters<br />

3 = Feet<br />

4 = Yards<br />

5 = Inches<br />

6 = Kilometers<br />

7 = Nautical miles<br />

8 = Statute miles<br />

9 = U S Survey feet<br />

IRADTY * I Type of calculation to use to convert spheroid<br />

dimensions A & B to radius:<br />

1 = Equatorial<br />

2 = Equal Surface Area<br />

3 = Equal Volume<br />

4 = Gaussian<br />

VXMIN D Minimum x value, in engineering units.<br />

VXMAX D Maximum x value, in engineering units.<br />

VYMIN D Minimum y value, in engineering units.<br />

VYMAX D Maximum y value, in engineering units.<br />

104 Graphics Utilities: Internal Routines – S3OPIC 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

XOFFST R Border width around left of map, in plotter units<br />

(in or cm).<br />

FREEX R Border width around right of map, in plotter units<br />

(in or cm).<br />

YOFFST R Border width below map, in plotter units (in or<br />

cm).<br />

FREEY R Border width above map, in plotter units (in or<br />

cm).<br />

XSC<strong>MAP</strong> R Map scale x direction, in map/plotter units.<br />

YSC<strong>MAP</strong> R Map scale y direction, in map/plotter units.<br />

XLONG R The x direction AOI length, in map/plotter units.<br />

(VXMAX – VXMIN)/XSC<strong>MAP</strong>.<br />

YLONG R The y direction AOI length, in map/plotter units.<br />

(VYMAX – VYMIN)/YSC<strong>MAP</strong>.<br />

BOTPAR * R Standard parallel closest to equator (least), in<br />

degrees.<br />

TOPPAR * R Standard parallel farthest from equator (greatest),<br />

in degrees.<br />

REFLAT * R Reference latitude.<br />

SFLAT * R Scale factor along reference latitude.<br />

REFLON * R Reference longitude.<br />

SFLON * R Scale factor along reference longitude.<br />

FNORTH * R False northing.<br />

FEAST * R False easting.<br />

UNTFAC * R Projected coordinates units factor. Needed only if<br />

IUNCOD =1.<br />

AXISA * R Semimajor axis A. Needed only if ISPCOD = 1.<br />

AXISB * R Semiminor axis B. Needed only if ISPCOD = 1.<br />

AZMTH * R Azimuth of central line at skew origin.<br />

5000.0.0 Graphics Utilities: Internal Routines – S3OPIC 105


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

SCALE * R Scale factor at origin.<br />

XLNVEW R The x direction length of the whole plot.<br />

XLNVEW = YOFFST + XLONG + FREEX.<br />

YLNVEW R The y direction length of the whole plot.<br />

YLNVEW = YOFFST + YLONG + FREEX.<br />

ISTAT I Status flag:<br />

0 = Operation was successful<br />

1 = Error, opening picture<br />

2 = Error, reading picture header<br />

3 = Error, problem with picture<br />

4 = Error, insufficient workspace to develop<br />

lat/long border<br />

5 = Error, less than three points in lat/long<br />

border. Cannot do clipping.<br />

106 Graphics Utilities: Internal Routines – S3OPIC 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Name Description<br />

Table 3: Checklist for Projection Arguments vs. Projection Type<br />

Arguments<br />

Alber’s Equal Area<br />

American Polyconic<br />

Azimuthal Gnomonic<br />

Azimuthal Orthographic<br />

Azimuthal Stereographic<br />

Bipolar Oblique Conic Conformal<br />

Projection Type<br />

Cassini-Soldner<br />

Double Parallel Lambert<br />

General Transverse Mercator<br />

5000.0.0 Graphics Utilities: Internal Routines – S3OPIC 107<br />

Modified Polyconic<br />

New Zealand Map Grid<br />

Oblique Transverse Mercator<br />

AXISA Semimajor Radius A if ISPCOD = 1* O N O O O N O O O O N O O O O O<br />

AXISB Semiminor Radius B if ISPCOD = 1* O N O O O N O O O O N O O O O O<br />

AZMTH Azimuth of center line at skew origin N N N N N N N N N N N Y N N N N<br />

BOTPAR Least Standard Parallel Y N N N N N N Y N N N N Y 1 N N N<br />

FEAST False Easting O O O O O O N O O O O O O O N O<br />

FNORTH False Northing O O O O O O O O O O N O O O O O<br />

IHEM Hemisphere N N N N N N N N N N N N N N O N<br />

IPJCOD Projection Code Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y<br />

ISPCOD Spheroid Code Y Y Y Y N N Y Y Y Y N Y Y Y Y Y<br />

IUNCOD Units Code Y Y Y Y Y Y Y Y Y Y N Y Y Y N Y<br />

IUTMCD UTM Zone N N N N N N N N N N N N N N O 4 N<br />

IRADTY Radius Calculation Method N N N N N N N N N N N N N N N Y<br />

REFLAT Reference Latitude Y 1 Y Y Y Y N Y Y Y Y 1 N Y Y N N N<br />

REFLON Reference Longitude Y 2 Y Y Y Y N Y Y Y Y 2 N Y Y Y O 3 Y<br />

SCALE Scale factor at origin N N N N N N N N N N N Y N N N N<br />

SFLAT Latitude Scale Factor N N N N N N N N N Y N N N N N N<br />

SFLON Longitude Scale Factor N N N N N N N N Y Y 2 N N N N N N<br />

TOPPAR Greatest Standard Parallel Y N N N N N N Y N N N N N N N N<br />

UNTFAC Unit Factor if IUNCOD = 1* O O O O O O O O O O N O O O N O<br />

Key<br />

Y = argument required<br />

N = argument not required<br />

O = argument optional. If not<br />

specified, default value is used.<br />

1<br />

Also serves as a single standard parallel<br />

2<br />

Polyconic projection also has a central meridian with associated scale factor<br />

3<br />

Hemisphere defines false northing for UTM<br />

4<br />

One or the other is required<br />

* User defined<br />

Single Parallel Lambert<br />

Standard Mercator<br />

Universal Transverse Mercator<br />

Van Der Grinten I


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

YLNVEW<br />

YLONG<br />

Cutline<br />

*<br />

(0.0,0.0)<br />

XOFFST<br />

(VXMIN,VYMIN)<br />

FREEY<br />

Scaled Area<br />

(“User” units)<br />

YOFFST<br />

XLONG<br />

XLNVEW<br />

No graphics may appear outside “Unscaled” Area<br />

Display Area for a Picture<br />

(VXMAX,VYMAX)<br />

User Units. For example, Northing/Easting, etc.<br />

Used for “Scaled” area of the picture<br />

Range for x is VXMIN to VXMAX<br />

for y is VYMIN to VYMAX<br />

Length in x is XLONG = (VXMAX – VXMIN)<br />

y is YLONG = (VYMAX – VYMIN)<br />

Plotter Units. Inches or centimeters<br />

Used for “Unscaled” area of the picture<br />

Range for x is 0.0 to XLNVEW<br />

for y is 0.0 to YLNVEW<br />

Length in x is XLNVEW<br />

y is YLNVEW<br />

XOFFST Border width around left of map<br />

YOFFST Border width below map<br />

FREEX Border width around right of map<br />

FREEY Border width above map<br />

(XLNVEW,YLNVEW)<br />

FREEX<br />

Unscaled Area<br />

(“Plotter” units)<br />

In General<br />

TOP/BOTTOM Refers to longitude or eastings<br />

LEFT/RIGHT SIDES Refers to latitude or northings<br />

108 Graphics Utilities: Internal Routines – S3OPIC 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Graphic Routines<br />

S4PCIN<br />

Function Obtain general, projection and graphics feature information for a<br />

picture<br />

Since each graphics file is based on size and not on the number of<br />

pictures, this routine should be used in a loop. Use the routine SIPCFL<br />

to obtain a list of picture names.<br />

Environment The ZPI/O and ZIGS environments must be initialized, the graphics<br />

file opened, and all pictures on that file closed before this routine is<br />

called.<br />

Format CALL S3PCIN (<br />

1 NAMPIC , LGBNAM , LGBTYP , LGBNUM, IBRTIP ,<br />

2 IFPRJ , IABSSC , IUTMCD , IPJCOD , ISPCOD ,<br />

3 IUNCOD , LONMND , LONMNM , LONMNS, LONMXD ,<br />

4 LONMXM , LONMXS , LATMND , LATMNM, LATMNS ,<br />

5 LATMXD , LATMXM , LATMXS , IHEM , IDTLN ,<br />

6 IRADTY , VXMIN , VXMAX , XRANGE, XSC<strong>MAP</strong> ,<br />

7 XLONG , XOFFST , FREEX , XLNVEW, VYMIN ,<br />

8 VYMAX , YRANGE , YSC<strong>MAP</strong> , YLONG , YOFFST ,<br />

9 FREEY , YLNVEW , BOTPAR , TOPPAR , REFLAT ,<br />

* SFLAT , REFLON , SFLON , FNORTH , FEAST ,<br />

1 UNTFAC , AXISA , AXISB , AZMTH , SCALE ,<br />

2 ISTAT )<br />

Input Arguments<br />

Argument<br />

Name<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

NAMPIC C*80 Name of the picture.<br />

Data<br />

Type<br />

Description<br />

and Default<br />

LGBNAM C*40 Array, of length 50, containing the graphics<br />

feature (LGB) names. For the list of names, see<br />

“Appendix A. Graphics Feature Codes” in the<br />

Z-<strong>MAP</strong> <strong>Plus</strong> Reference Manual.<br />

LGBTYP I Array, of length 50, containing the graphics<br />

feature (LGB) type numbers. For the list of<br />

codes, see “Appendix A. Graphics Feature<br />

Codes” in the Z-<strong>MAP</strong> <strong>Plus</strong> Reference Manual.<br />

LGBNUM I Number of graphics features.<br />

5000.0.0 Graphics Utilities: Internal Routines – S4PCIN 109


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Argument<br />

Name<br />

IBRTIP I Type of border:<br />

1 = Latitude/longitude<br />

2 = Rectilinear<br />

IFPRJ I Whether a projection is active:<br />

1 = No projection specified<br />

2 = Projection specified<br />

IABSSC I Absolute scale. If IFPRJ = 2, an absolute scale is<br />

calculated, otherwise it is set to zero.<br />

IUTMCD<br />

*<br />

Data<br />

Type<br />

Description<br />

and Default<br />

I UTM zone number. (See “Appendix G. Mapping<br />

and Cartographic Projections” in the Z-<strong>MAP</strong> <strong>Plus</strong><br />

Reference Manual.)<br />

110 Graphics Utilities: Internal Routines – S4PCIN 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Argument<br />

Name<br />

IPJCOD * I Cartographic projection:<br />

–17 = Grads and Van Der Grinten I<br />

–16 = Grads and Bipolar Oblique Conic<br />

Conformal<br />

–15 = Grads and Cassini-Soldner<br />

–14 = Grads and New Zealand Map Grid<br />

–13 = Grads and Oblique Transverse Mercator<br />

–12 = Grads and American Polyconic<br />

–11 = Currently not used<br />

–10 = Grads and Alber’s Equal Area<br />

(equivalent) with two standard parallels<br />

–9 = Grads and Modified Rectangular<br />

Orthotomic Polyconic<br />

–8 = Grads and Azimuthal Orthographic<br />

–7 = Grads and Azimuthal Stereographic<br />

–6 = Grads and Azimuthal Gnomonic<br />

–5 = Grads and Conformal Lambert with two<br />

standard parallels<br />

–4 = Grads and Conformal Lambert with one<br />

standard parallel<br />

–3 = Grads and Standard Mercator<br />

–2 = Grads and General Transverse Mercator<br />

–1 = Currently not used<br />

0 = Currently not used<br />

1 = Degrees and Universal Transverse<br />

Mercator<br />

2 = Degrees and General Transverse Mercator<br />

3 = Degrees and Standard Mercator<br />

4 = Degrees and Conformal Lambert with one<br />

standard parallel<br />

5 = Degrees and Conformal Lambert with two<br />

standard parallels<br />

6 = Degrees and Azimuthal Gnomonic<br />

7 = Degrees and Azimuthal Stereographic<br />

8 = Degrees and Azimuthal Orthographic<br />

9 = Degrees and Modified Rectangular<br />

Orthotomic Polyconic)<br />

10 = Degrees and Alber’s Equal Area<br />

equivalent with two standard parallels<br />

IPJCOD *<br />

(cont.)<br />

Data<br />

Type<br />

Description<br />

and Default<br />

I Cartographic projection (cont.):<br />

11 = Currently not used<br />

12 = Degrees and American Polyconic<br />

13 = Degrees and Oblique Transverse<br />

Mercator<br />

14 = Degrees and New Zealand Map Grid<br />

15 = Degrees and Cassini-Soldner<br />

16 = Degrees and Bipolar Oblique Conic<br />

Conformal<br />

17 = Degrees and Van Der Grinten I<br />

5000.0.0 Graphics Utilities: Internal Routines – S4PCIN 111


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

ISPCOD * I Reference spheroid:<br />

1 = User defined<br />

2 = Everest 1830<br />

3 = Malayan Everest 1830<br />

4 = Bessel 1841<br />

5 = Airy 1858<br />

6 = Clarke 1858<br />

7 = Clarke 1866<br />

8 = Clarke 1880<br />

9 = Hayford 1909<br />

10 = Krassovsky 1940<br />

11 = Hough 1956<br />

12 = Fischer 1960 (Mercury)<br />

13 = Kaula 1961<br />

14 = IUGG 1967 (Australian National 1967/<br />

South American 1969)<br />

15 = Fischer 1968 (Mercator modified)<br />

16 = WGS-72 1972<br />

17 = IUGG 19<br />

18 = Helmert<br />

19 = Ghana National<br />

20 = WGS-84 (GRS-80)<br />

IUNCOD * I Units for projected coordinates:<br />

1 = User defined<br />

2 = Meters<br />

3 = Feet<br />

4 = Yards<br />

5 = Inches<br />

6 = Kilometers<br />

7 = Nautical miles<br />

8 = Statute miles<br />

9 = U S Survey feet<br />

LONMND I Longitude minimum, in degrees or 10,000ths of a<br />

grad.<br />

LONMNM I Longitude minimum, in minutes. Not used for<br />

grads.<br />

LONMNS I Longitude minimum, in seconds. Not used for<br />

grads.<br />

LONMXD I Longitude maximum, in degrees or 10,000ths of<br />

a grad.<br />

LONMXM I Longitude maximum, in minutes. Not used for<br />

grads.<br />

112 Graphics Utilities: Internal Routines – S4PCIN 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

LONMXS I Longitude maximum, in seconds. Not used for<br />

grads.<br />

LATMND I Latitude minimum, in degrees or 10,000ths of a<br />

grad.<br />

LATMNM I Latitude minimum, in minutes. Not used for<br />

grads.<br />

LATMNS I Latitude minimum, in seconds. Not used for<br />

grads.<br />

LATMXD I Latitude maximum, in degrees or 10,000ths of a<br />

grad.<br />

LATMXM I Latitude maximum, in minutes. Not used for<br />

grads.<br />

LATMXS I Latitude maximum, in seconds. Not used for<br />

grads.<br />

IHEM * I Which hemisphere:<br />

0 = Cannot be determined<br />

1 = Northern<br />

2 = Southern<br />

IDTLN I Whether mapping across the dateline:<br />

0 = Not mapping cross the dateline<br />

1 = Mapping across the dateline<br />

VXMIN D Minimum x value, in engineering units.<br />

VXMAX D Maximum x value, in engineering units.<br />

XRANGE R Range of x, in engineering units.<br />

XSC<strong>MAP</strong> R The x direction map scale, in map/plotter units.<br />

XLONG R The x direction AOI length, in map/plotter units.<br />

XOFFST R Border width around left of map, in plotter units<br />

(in or cm).<br />

FREEX R Border width around right of map, in plotter units<br />

(in or cm).<br />

XLNVEW R The x direction length of whole plot, in plotter<br />

units (in or cm).<br />

5000.0.0 Graphics Utilities: Internal Routines – S4PCIN 113


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Argument<br />

Name<br />

VYMIN D Minimum y value, in engineering units.<br />

VYMAX D Maximum y value, in engineering units.<br />

YRANGE R Range of x, in engineering units.<br />

YSC<strong>MAP</strong> R The y direction map scale, in map/plotter units.<br />

YLONG R The y direction AOI length, in map/plotter units.<br />

YOFFST R Border width below map, in plotter units (in or<br />

cm).<br />

FREEY R Border width above map, in plotter units (in or<br />

cm).<br />

YLNVEW R The y direction length of whole plot, in plotter<br />

units (in or cm).<br />

BOTPAR<br />

*<br />

R Standard parallel (least).<br />

TOPPAR * R Standard parallel (greatest).<br />

REFLAT * R Reference latitude.<br />

SFLAT * R Reference latitude scale factor.<br />

REFLON * R Reference longitude.<br />

SFLON * R Reference longitude scale factor.<br />

FNORTH<br />

*<br />

R False northing.<br />

FEAST * R False easting.<br />

UNTFAC<br />

*<br />

Data<br />

Type<br />

Description<br />

and Default<br />

R Projected coordinates units factor.<br />

AXISA * R Semimajor axis A.<br />

AXISB * R Semiminor axis B.<br />

AZMTH * R Azimuth of central line at skew origin for<br />

Oblique Transverse Mercator.<br />

114 Graphics Utilities: Internal Routines – S4PCIN 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

SCALE * R Scale factor at origin for Oblique Transverse<br />

Mercator.<br />

ISTAT I Status flag:<br />

0 = Operation was successful<br />

1 = Error, picture not found<br />

2 = Error, problem obtaining picture<br />

information<br />

5000.0.0 Graphics Utilities: Internal Routines – S4PCIN 115


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Name Description<br />

Table 4: Checklist for Projection Arguments vs. Projection Type<br />

Arguments<br />

Alber’s Equal Area<br />

American Polyconic<br />

Azimuthal Gnomonic<br />

Azimuthal Orthographic<br />

Azimuthal Stereographic<br />

Bipolar Oblique Conic Conformal<br />

Projection Type<br />

Cassini-Soldner<br />

Double Parallel Lambert<br />

General Transverse Mercator<br />

116 Graphics Utilities: Internal Routines – S4PCIN 5000.0.0<br />

Modified Polyconic<br />

New Zealand Map Grid<br />

Oblique Transverse Mercator<br />

AXISA Semimajor Radius A if ISPCOD = 1* O N O O O N O O O O N O O O O O<br />

AXISB Semiminor Radius B if ISPCOD = 1* O N O O O N O O O O N O O O O O<br />

AZMTH Azimuth of center line at skew origin N N N N N N N N N N N Y N N N N<br />

BOTPAR Least Standard Parallel Y N N N N N N Y N N N N Y 1 N N N<br />

FEAST False Easting O O O O O O N O O O O O O O N O<br />

FNORTH False Northing O O O O O O O O O O N O O O O O<br />

IHEM Hemisphere N N N N N N N N N N N N N N O N<br />

IPJCOD Projection Code Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y<br />

ISPCOD Spheroid Code Y Y Y Y N N Y Y Y Y N Y Y Y Y Y<br />

IUNCOD Units Code Y Y Y Y Y Y Y Y Y Y N Y Y Y N Y<br />

IUTMCD UTM Zone N N N N N N N N N N N N N N O 4 N<br />

IRADTY Radius Calculation Method N N N N N N N N N N N N N N N Y<br />

REFLAT Reference Latitude Y 1 Y Y Y Y N Y Y Y Y 1 N Y Y N N N<br />

REFLON Reference Longitude Y 2 Y Y Y Y N Y Y Y Y 2 N Y Y Y O 3 Y<br />

SCALE Scale factor at origin N N N N N N N N N N N Y N N N N<br />

SFLAT Latitude Scale Factor N N N N N N N N N Y N N N N N N<br />

SFLON Longitude Scale Factor N N N N N N N N Y Y 2 N N N N N N<br />

TOPPAR Greatest Standard Parallel Y N N N N N N Y N N N N N N N N<br />

UNTFAC Unit Factor if IUNCOD = 1* O O O O O O O O O O N O O O N O<br />

Key<br />

Y = argument required<br />

N = argument not required<br />

O = argument optional. If not<br />

specified, default value is used.<br />

1<br />

Also serves as a single standard parallel<br />

2<br />

Polyconic projection also has a central meridian with associated scale factor<br />

3<br />

Hemisphere defines false northing for UTM<br />

4<br />

One or the other is required<br />

* User defined<br />

Single Parallel Lambert<br />

Standard Mercator<br />

Universal Transverse Mercator<br />

Van Der Grinten I


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Graphic Routines<br />

SIEPIC<br />

Function Close the last picture opened<br />

This subroutine insures that a picture is properly closed.<br />

Environment The ZPI/O and ZIGS environments must be initialized and a picture<br />

opened before this routine is called.<br />

Format CALL SIEPIC ( ISTAT )<br />

Input Arguments None<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

ISTAT I Status flag:<br />

0 = Operation was successful<br />

1 = Error, problem closing the currently open<br />

picture<br />

5000.0.0 Graphics Utilities: Internal Routines – SIEPIC 117


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Graphic Routines<br />

SIEZGF<br />

Function Close a graphics file<br />

This subroutine terminates operations in a ZGF graphics file. This<br />

subroutine should be called after work on a graphics file is complete so<br />

that another graphics file can be opened.<br />

Environment The ZPI/O and ZIGS environments must be initialized and a graphics<br />

file opened before this routine is called.<br />

Format CALL SIEZGF<br />

Input Arguments None<br />

Output Arguments None<br />

118 Graphics Utilities: Internal Routines – SIEZGF 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Graphic Routines<br />

SIEZIG<br />

Function Terminate the Z-<strong>MAP</strong> Interactive Graphics Environment (ZIGS)<br />

This subroutine should be called after all graphics operations have<br />

been completed.<br />

Environment The ZPI/O and ZIGS environments must be initialized before this<br />

routine is called.<br />

Format CALL SIEZIG<br />

Input Arguments None<br />

Output Arguments None<br />

5000.0.0 Graphics Utilities: Internal Routines – SIEZIG 119


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Graphic Routines<br />

SIGLCL<br />

Function Set line color<br />

This subroutine sets the line color. All lines are drawn in the specified<br />

color until the next call to this routine.<br />

This routine is only used for working on graphics features: It does not<br />

apply to the standard applications elsewhere in this guide.<br />

Environment The ZPI/O and ZIGS environments must be initialized, and a graphic<br />

file and a picture opened before this routine is called.<br />

Format CALL SIGLCL ( ICOLOR , ISTAT )<br />

Input Arguments<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

ICOLOR I Color index for drawing lines, from the color<br />

table currently defined.<br />

Range Options: 0–255<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

ISTAT I Status flag:<br />

0 = Operation was successful<br />

1 = Error, invalid line color index<br />

120 Graphics Utilities: Internal Routines – SIGLCL 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Graphic Routines<br />

SIGLIN<br />

Function Draw connected line segments<br />

This subroutine draws line segments in the current units system, using<br />

the currently defined line color, type, and width.<br />

This routine is only used for working on graphics features: It does not<br />

apply to the standard applications elsewhere in this guide.<br />

Environment The ZPI/O and ZIGS environments must be initialized and a graphics<br />

file, a picture, and a graphics feature must be opened before this<br />

routine is called.<br />

Format CALL SIGLIN ( NUMPTS , XCORS , YCORS , ISTAT )<br />

Input Arguments<br />

Argument<br />

Name<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

NUMPTS I Number of points.<br />

XCORS R Array, of length NUMPTS, containing the x<br />

coordinate values.<br />

YCORS R Array, of length NUMPTS, containing the y<br />

coordinate values.<br />

Data<br />

Type<br />

Description<br />

and Default<br />

ISTAT I Status flag:<br />

0 = Operation was successful<br />

1 = Error, number of points is zero<br />

2 = Error, graphics feature is not open<br />

5000.0.0 Graphics Utilities: Internal Routines – SIGLIN 121


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Graphic Routines<br />

SIGLPM<br />

Function Set dash line and hachure mark parameters<br />

This subroutine sets the length and gap for dash lines and the length,<br />

gap and direction of hachure marks. All lines or hachures are drawn<br />

with the prescribed values until the next call to this subroutine.<br />

This routine is only used for working on graphics features: It does not<br />

apply to the standard applications elsewhere in this guide.<br />

Environment The ZPI/O and ZIGS environments must be initialized and a graphics<br />

file, picture, and graphics feature must be opened before this routine is<br />

called.<br />

Format CALL SIGLPM (<br />

1 DSHLEN , DSHGAP , HSHLEN , HSHGAP , HSHWAY ,<br />

2 ISTAT )<br />

Input Arguments<br />

Argument<br />

Name<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

DSHLEN R Length of dash.<br />

Default = 0.2 in or 0.5 cm<br />

DSHGAP R Length of gap between dashes.<br />

Default = 0.1 in or 0.25 cm<br />

HSHLEN R Length of hachure marks.<br />

Default = 0.04 in or 0.10 cm<br />

HSHGAP R Length of gap between hachures.<br />

Default = 0.4 in or 1.0 cm<br />

HSHWAY R Direction of hachures:<br />

–1 = Pointing uphill<br />

1 = Pointing downhill<br />

Data<br />

Type<br />

Description<br />

and Default<br />

ISTAT I Status flag:<br />

0 = Operation was successful<br />

1 = Error, dash length is negative<br />

2 = Error, dash gap length is negative<br />

3 = Error, hachure length is negative<br />

4 = Error, hachure gap length is negative<br />

122 Graphics Utilities: Internal Routines – SIGLPM 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Graphic Routines<br />

SIGLTY<br />

Name SIGLTY<br />

Function Set line type<br />

This subroutine sets the line type. All line segments drawn are type<br />

LTYP until the next call to this routine.<br />

This routine is only used for working on graphics features: It does not<br />

apply to the standard applications elsewhere in this guide.<br />

Environment The ZPI/O and ZIGS environments must be initialized and a graphics<br />

file, a picture, and a graphics feature must be opened before this<br />

routine is called.<br />

Format CALL SIGLTY ( LTYP , ISTAT )<br />

Input Arguments<br />

Argument<br />

Name<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

LTYP I Type of line:<br />

1 = Plain<br />

2 = Dashed<br />

3 = Hachured<br />

Data<br />

Type<br />

Description<br />

and Default<br />

ISTAT I Status flag:<br />

0 = Operation was successful<br />

1 = Error, invalid line type<br />

5000.0.0 Graphics Utilities: Internal Routines – SIGLTY 123


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Graphic Routines<br />

SIGLWD<br />

Function Set line width<br />

This subroutine sets the line width. All lines are drawn with a width<br />

determined by WIDTH until the next call to this routine.<br />

This routine is only used for working on graphics features: It does not<br />

apply to the standard applications elsewhere in this guide.<br />

Environment The ZPI/O and ZIGS environments must be initialized and a graphics<br />

file, a picture, and a graphics feature must be opened before this<br />

routine is called.<br />

Format CALL SIGLWD ( WIDTH , ISTAT )<br />

Input Arguments<br />

Argument<br />

Name<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

WIDTH R Line width. This is a scalar by which the standard<br />

line width is multiplied to get a new line width.<br />

Range Options: 1–8<br />

Data<br />

Type<br />

Description<br />

and Default<br />

ISTAT I Status flag:<br />

0 = Operation was successful<br />

1 = Error, invalid line width<br />

124 Graphics Utilities: Internal Routines – SIGLWD 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Graphic Routines<br />

SIGMCL<br />

Function Set marker color<br />

This subroutine sets the marker color. All marker symbols are drawn in<br />

the specified color until the next call to this routine.<br />

This routine is only used for working on graphics features: It does not<br />

apply to the standard applications elsewhere in this guide.<br />

Environment The ZPI/O and ZIGS environments must be initialized and a graphics<br />

file, a picture and a graphics feature must be opened before this routine<br />

is called.<br />

Format CALL SIGMCL ( ICOLOR , ISTAT )<br />

Input Arguments<br />

Argument<br />

Name<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

ICOLOR I Color index for drawing markers, from the color<br />

table currently defined.<br />

Range Options: 0–255<br />

Data<br />

Type<br />

Description<br />

and Default<br />

ISTAT I Status flag:<br />

0 = Operation was successful<br />

1 = Error, invalid marker color index<br />

5000.0.0 Graphics Utilities: Internal Routines – SIGMCL 125


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Graphic Routines<br />

SIGMHT<br />

Function Set marker height<br />

This subroutine sets the marker height. All marker symbols are drawn<br />

the specified height until the next call to this routine.<br />

This routine is only used for working on graphics features: It does not<br />

apply to the standard applications elsewhere in this guide.<br />

Environment The ZPI/O and ZIGS environments must be initialized and a graphics<br />

file, a picture, and a graphics feature must be opened before this<br />

routine is called.<br />

Format CALL SIGMHT ( HEIGHT , ISTAT )<br />

Input Arguments<br />

Argument<br />

Name<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

HEIGHT R Height for markers, in plotter units (in or cm).<br />

Data<br />

Type<br />

Description<br />

and Default<br />

ISTAT I Status flag:<br />

0 = Operation was successful<br />

1 = Error, marker height is less than or equal<br />

to zero<br />

126 Graphics Utilities: Internal Routines – SIGMHT 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Graphic Routines<br />

SIGMTY<br />

Function Set marker type<br />

This subroutine sets marker type. All marker symbols drawn are of the<br />

designated type until the next call to this routine.<br />

This routine is only used for working on graphics features: It does not<br />

apply to the standard applications elsewhere in this guide.<br />

Environment The ZPI/O and ZIGS environments must be initialized and a graphics<br />

file, a picture, and a graphics feature must be opened before this<br />

routine is called.<br />

Format CALL SIGMTY( MARKER , ISTAT )<br />

Input Arguments<br />

Argument<br />

Name<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

MARKER I Symbol code for type of marker. (See “Appendix<br />

C. Symbols, Fonts, and Line Patterns ” in the<br />

Z-<strong>MAP</strong> <strong>Plus</strong> Reference Manual.)<br />

Data<br />

Type<br />

Description<br />

and Default<br />

ISTAT I Status flag:<br />

0 = Operation was successful<br />

1 = Error, invalid marker type<br />

5000.0.0 Graphics Utilities: Internal Routines – SIGMTY 127


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Graphic Routines<br />

SIGPCL<br />

Function Set polygon fill color<br />

This subroutine sets the polygon fill color. All filled polygons are<br />

drawn in the color designated until the next call to this routine.<br />

This routine is only used for working on graphics features: It does not<br />

apply to the standard applications elsewhere in this guide.<br />

Environment The ZPI/O and ZIGS environments must be initialized and a graphics<br />

file, a picture, and a graphics feature must be opened before this<br />

routine is called.<br />

Format CALL SIGPCL ( ICOLOR , ISTAT )<br />

Input Arguments<br />

Argument<br />

Name<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

ICOLOR I Color index for filling polygons, from the color<br />

table currently defined.<br />

Range Options: 0–255<br />

Data<br />

Type<br />

Description<br />

and Default<br />

ISTAT I Status flag:<br />

0 = Operation was successful<br />

1 = Error, invalid polygon color index<br />

128 Graphics Utilities: Internal Routines – SIGPCL 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Graphic Routines<br />

SIGPDF<br />

Function Set defaults for lines, markers, text, and polygons<br />

This subroutine sets the defaults for the line color, type, and width;<br />

marker symbol color, height, and type; polygon fill color; and text<br />

color, font, justification, and rotation angle. You can call this routine<br />

multiple times to reset these values.<br />

This routine is only used for working on graphics features: It does not<br />

apply to the standard applications elsewhere in this guide.<br />

Values of zero are set with the defined defaults. Otherwise valid user<br />

inputs are used.<br />

Environment The ZPI/O and ZIGS environments must be initialized and a graphics<br />

file, a picture, and a graphic feature must be opened before this routine<br />

is called.<br />

Format CALL SIGPDF (<br />

1 KLNCLR , KLNTYP , KMKCLR , KMKTYP , KTXTCL ,<br />

2 KTXTFO , KTXTJU , KPOLCL , KSCLTY , WDLINE ,<br />

3 HTMARK , HTTEXT , ROTEXT , DSHLEN , DSHGAP ,<br />

4 HSHLEN , HSHGAP , HSHWAY , ISTAT )<br />

Input Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

KLNCLR I Color index for drawing lines, from the color<br />

table currently defined.<br />

Default = 1 (black on plotter, white on screen)<br />

Range Options: 0–255<br />

KLNTYP I Type of line:<br />

1 = Plain<br />

2 = Dashed<br />

3 = Hachured<br />

Default = 1<br />

KMKCLR I Color index for drawing marker symbols, from<br />

the color table currently defined.<br />

Default = 1 (black on plotter, white on screen)<br />

Range Options: 0–255<br />

KMKTYP I Symbol code for marker type. (See “Appendix C.<br />

Symbols, Fonts, and Line Patterns ” in the<br />

Z-<strong>MAP</strong> <strong>Plus</strong> Reference Manual.)<br />

Default = 1 (little cross)<br />

Range Options: 1–100<br />

5000.0.0 Graphics Utilities: Internal Routines – SIGPDF 129


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

KTXTCL I Color index for drawing text, from the color table<br />

currently defined.<br />

Default = 1 (black on plotter, white on screen)<br />

Range Options: 0–255<br />

KTXTFO I Type of text font. (See “Appendix C. Symbols,<br />

Fonts, and Line Patterns ” in the Z-<strong>MAP</strong> <strong>Plus</strong><br />

Reference Manual.)<br />

1 = Plain<br />

2 = Roman simplex<br />

3 = Roman complex<br />

4 = Italics<br />

5 = Duplex<br />

Default = 1<br />

KIXTJU I Text justification:<br />

1 = Lower left<br />

2 = Lower right<br />

3 = Centered<br />

Default = 1<br />

KPOLCL I Color index for drawing colorfilled polygons,<br />

from the color table currently defined.<br />

Default = 1 (black on plotter, white on screen)<br />

Range Options: 0–255<br />

KSCLTY I Coordinate system:<br />

1 = Engineering coordinates<br />

2 = Plotter coordinates (in or cm)<br />

Default = 2<br />

WDLINE R Line width multiplier. This is a scalar by which<br />

the standard line width is multiplied to get a new<br />

line width<br />

Default = 1.0<br />

Range Options: 1.0–8.0<br />

HTMARK R Marker height, in plotter units (in or cm).<br />

Default = 0.1 in or 0.25 cm<br />

HTTEXT R Text height, in plotter units (in or cm).<br />

Default = 0.1 in or 0.25 cm<br />

130 Graphics Utilities: Internal Routines – SIGPDF 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Argument<br />

Name<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

ROTEXT R Text rotation angle, in degrees.<br />

Default = 0.0<br />

Range Options: 0.0–360.0<br />

DSHLEN R Length of the solid part of the dash, in plotter<br />

units (in or cm).<br />

Default = 0.2 in or 0.5 cm<br />

DSHGAP R Length of the gap part of the dash, in plotter units<br />

(in or cm).<br />

Default = 0.1 in or 0.25 cm<br />

HSHLEN R Length of the hachure marks, in plotter units (in<br />

or cm).<br />

Default = 0.04 in or 0.10 cm<br />

HSHGAP R Distance between hachures, in plotter units (in or<br />

cm).<br />

Default = 0.4 in or 1.0 cm<br />

HSHWAY R Direction of the hachure marks:<br />

–1 = Pointing uphill<br />

1 = Pointing downhill<br />

Default = 1.0<br />

Data<br />

Type<br />

Description<br />

and Default<br />

Description<br />

and Default<br />

ISTAT I Status flag:<br />

0 = Operation was successful<br />

1 = Error, invalid scale type<br />

2 = Error, invalid color index<br />

3 = Error, invalid line type<br />

4 = Error, invalid line width multiplier<br />

5 = Error, invalid marker type<br />

6 = Error, invalid text font<br />

7 = Error, invalid text justification<br />

8 = Error, invalid text rotation<br />

9 = Error, marker height is negative<br />

10 = Error, text height is negative<br />

11 = Error, dash length is negative<br />

12 = Error, dash gap is negative<br />

13 = Error, hachure length is negative<br />

14 = Error, hachure gap is negative<br />

15 = Error, invalid hachure direction<br />

5000.0.0 Graphics Utilities: Internal Routines – SIGPDF 131


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Graphic Routines<br />

SIGPFL<br />

Function Draw a shaded or colorfilled polygon<br />

This subroutine draws a shaded or colorfilled polygon. The given<br />

polygon is colorfilled with the current polygon fill color.<br />

This routine is only used for working on graphics features: It does not<br />

apply to the standard applications elsewhere in this guide.<br />

The polygon must be closed before this routine is called, i.e., last point<br />

equals first point.<br />

Environment The ZPI/O and ZIGS environments must be initialized and a graphics<br />

file, a picture, and a graphic feature must be opened before this routine<br />

is called.<br />

Format CALL SIGPFL ( NVERT , XCORS , YCORS , ISTAT )<br />

Input Arguments<br />

Argument<br />

Name<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

NVERT I Number of vertices of the polygon.<br />

XCORS R Array, of length NVERT, containing the x<br />

coordinates of polygon vertices, in the currently<br />

defined coordinate system.<br />

YCORS R Array, of length NVERT, containing the y<br />

coordinates of polygon vertices, in the currently<br />

defined coordinate system.<br />

Data<br />

Type<br />

Description<br />

and Default<br />

ISTAT I Status flag:<br />

0 = Operation was successful<br />

1 = Error, number of vertices is zero<br />

2 = Error, graphics segment is not open<br />

3 = Error, polygon is not closed<br />

4 = Error, maximum number of vertices<br />

allowed has been exceeded<br />

5 = Error, problem colorfilling the polygons<br />

132 Graphics Utilities: Internal Routines – SIGPFL 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Graphic Routines<br />

SIGSCL<br />

Function Close current graphics feature<br />

This routine is only used for working on graphics features: It does not<br />

apply to the standard applications elsewhere in this guide.<br />

Environment The ZPI/O and ZIGS environments must be initialized and a graphics<br />

file, a picture, and a graphics feature must be opened before this<br />

routine is called.<br />

Format CALL SIGSCL ( ISTAT )<br />

Input Arguments None<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

ISTAT I Status flag:<br />

0 = Operation was successful<br />

1 = Error, closing graphic feature<br />

2 = Error, no graphics feature is currently<br />

open<br />

5000.0.0 Graphics Utilities: Internal Routines – SIGSCL 133


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Graphic Routines<br />

SIGSCS<br />

Function Define coordinate system<br />

This subroutine defines the coordinate system applied to all<br />

coordinates input to graphics subroutines until the next call to this<br />

subroutine.<br />

This routine is only used for working on graphics features: It does not<br />

apply to the standard applications elsewhere in this guide.<br />

Environment The ZPI/O and ZIGS environments must be initialized and a graphics<br />

file, a picture, and a graphics feature must be opened before this<br />

routine is called.<br />

Format CALL SIGSCS ( ISCALE , ISTAT )<br />

Input Arguments<br />

Argument<br />

Name<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

ISCALE I Type of coordinate system:<br />

1 = Engineering units<br />

2 = Plotter units (in or cm)<br />

Data<br />

Type<br />

Description<br />

and Default<br />

ISTAT I Status flag:<br />

0 = Operation was successful<br />

1 = Error, invalid scale type<br />

134 Graphics Utilities: Internal Routines – SIGSCS 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Graphic Routines<br />

SIGSDL<br />

Function Delete a graphics feature from a picture file<br />

This subroutine deletes all instances of a particular type of a graphics<br />

feature from the open picture. If SIPCCP is done afterwards to the<br />

same picture, the actual graphic segments are deleted from the picture<br />

file, rather than just from what is being displayed.<br />

This routine is only used for working on graphics features: It does not<br />

apply to the standard applications elsewhere in this guide.<br />

Environment The ZPI/O and ZIGS environments must be initialized and a graphics<br />

file, a picture, and a graphics feature must be opened before this<br />

routine is called.<br />

Format CALL SIGSDL ( ISEGTY , ISTAT )<br />

Input Arguments<br />

Argument<br />

Name<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

ISEGTY I Graphics feature number for the graphics feature<br />

to delete. (See “Appendix A. Graphics Feature<br />

Codes” in the Z-<strong>MAP</strong> <strong>Plus</strong> Reference Manual.)<br />

Data<br />

Type<br />

Description<br />

and Default<br />

ISTAT I Status flag:<br />

–1 = Warning, graphics feature has been closed<br />

0 = Operation was successful<br />

1 = Error, invalid graphics feature number<br />

2 = Error, unsuccessful delete<br />

3 = Error, problem closing graphics feature<br />

5000.0.0 Graphics Utilities: Internal Routines – SIGSDL 135


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Graphic Routines<br />

SIGSOP<br />

Function Open a new graphics feature<br />

This subroutine opens a new graphics feature. If a feature is currently<br />

open, it is closed before opening a new one. All graphics following a<br />

call to this routine are assumed to belong to the segment.<br />

This routine is only used for working on graphics features: It does not<br />

apply to the standard applications elsewhere in this guide.<br />

Environment The ZPI/O and ZIGS environments must be initialized and a graphics<br />

file, a picture, and a graphics feature must be opened before this<br />

routine is called.<br />

Format CALL SIGSOP ( ISEGTY , ISTAT )<br />

Input Arguments<br />

Argument<br />

Name<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

ISEGTY I Graphics feature number for the graphics feature<br />

to open. (See “Appendix A. Graphics Feature<br />

Codes” in the Z-<strong>MAP</strong> <strong>Plus</strong> Reference Manual.)<br />

Data<br />

Type<br />

Description<br />

and Default<br />

ISTAT I Status flag:<br />

0 = Operation was successful<br />

1 = Error, invalid graphics feature number<br />

2 = Error, problem opening graphics feature<br />

136 Graphics Utilities: Internal Routines – SIGSOP 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Graphic Routines<br />

SIGTCL<br />

Function Set text color<br />

This subroutine sets text color. All text is drawn in the designated color<br />

until the next call to this routine.<br />

This routine is only used for working on graphics features: It does not<br />

apply to the standard applications elsewhere in this guide.<br />

Environment The ZPI/O and ZIGS environments must be initialized and a graphics<br />

file, a picture, and a graphic feature must be opened before this routine<br />

is called.<br />

Format CALL SIGTCL ( ICOLOR , ISTAT )<br />

Input Arguments<br />

Argument<br />

Name<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

ICOLOR I Color index for drawing text, from the color table<br />

currently defined.<br />

Range Options: 0–255<br />

Data<br />

Type<br />

Description<br />

and Default<br />

ISTAT I Status flag:<br />

0 = Operation was successful<br />

1 = Error, invalid text color index<br />

5000.0.0 Graphics Utilities: Internal Routines – SIGTCL 137


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Graphic Routines<br />

SIGTFO<br />

Function Set text font<br />

This subroutine sets the text font. All text is drawn with the designated<br />

font until the next call to this routine.<br />

This routine is only used for working on graphics features: It does not<br />

apply to the standard applications elsewhere in this guide.<br />

Environment The ZPI/O and ZIGS environments must be initialized and a graphics<br />

file, a picture, and a graphics feature must be opened before this<br />

routine is called.<br />

Format CALL SIGTFO ( IFONT , ISTAT )<br />

Input Arguments<br />

Argument<br />

Name<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

IFONT I Type of text font. (See “Appendix C. Symbols,<br />

Fonts, and Line Patterns ” in the Z-<strong>MAP</strong> <strong>Plus</strong><br />

Reference Manual.)<br />

Data<br />

Type<br />

1 = Plain<br />

2 = Roman simplex<br />

3 = Roman complex<br />

4 = Italics<br />

5 = Duplex<br />

Description<br />

and Default<br />

ISTAT I Status flag:<br />

0 = Operation was successful<br />

1 = Error, invalid font type<br />

138 Graphics Utilities: Internal Routines – SIGTFO 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Graphic Routines<br />

SIGTHT<br />

Function Set text height<br />

This subroutine sets text height. All text is drawn at the designated<br />

height until the next call to this routine.<br />

This routine is only used for working on graphics features: It does not<br />

apply to the standard applications elsewhere in this guide.<br />

Environment The ZPI/O and ZIGS environments must be initialized and a graphics<br />

file, a picture, and a graphics feature must be opened before this<br />

routine is called.<br />

Format CALL SIGTHT ( HEIGHT , ISTAT )<br />

Input Arguments<br />

Argument<br />

Name<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

HEIGHT R Height of text, in plotter units (in or cm).<br />

Data<br />

Type<br />

Description<br />

and Default<br />

ISTAT I Status flag:<br />

0 = Operation was successful<br />

1 = Error, text height is less than or equal to<br />

zero<br />

5000.0.0 Graphics Utilities: Internal Routines – SIGTHT 139


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Graphic Routines<br />

SIGTJU<br />

Function Set text justification<br />

This subroutine sets text justification. Text is positioned by the method<br />

designated by JUSTIF, at the location specified by SIGTXT, until the<br />

next call to this routine.<br />

If JUSTIF = 1, the lower left corner of the text string is positioned at<br />

the specified coordinate.<br />

If JUSTIF = 2, the lower right corner of the text string is positioned at<br />

the specified coordinate.<br />

If JUSTIF = 3, the center of the text string is positioned at the<br />

specified coordinate.<br />

This routine is only used for working on graphics features: It does not<br />

apply to the standard applications elsewhere in this guide.<br />

Environment The ZPI/O and ZIGS environments must be initialized and a graphics<br />

file, a picture, and a graphics feature must be opened before this<br />

routine is called.<br />

Format CALL SIGTJU ( JUSTIF , ISTAT )<br />

Input Arguments<br />

Argument<br />

Name<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

JUSTIF I Justification method:<br />

1 = Lower left<br />

2 = Lower right<br />

3 = Center<br />

Data<br />

Type<br />

Description<br />

and Default<br />

ISTAT I Status flag:<br />

0 = Operation was successful<br />

1 = Error, invalid justification type<br />

140 Graphics Utilities: Internal Routines – SIGTJU 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Graphic Routines<br />

SIGTRO<br />

Name SIGTRO<br />

Function Set text rotation<br />

This subroutine rotates all text strings at an angle defined by ANGLE<br />

until the next call to this routine.<br />

This routine is only used for working on graphics features: It does not<br />

apply to the standard applications elsewhere in this guide.<br />

Environment The ZPI/O and ZIGS environments must be initialized and a graphics<br />

file, a picture, and a graphics feature must be opened before this<br />

routine is called.<br />

Format CALL SIGTRO ( ANGLE , ISTAT )<br />

Input Arguments<br />

Argument<br />

Name<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

ANGLE R Angle at which to draw text, in degrees from<br />

horizontal.<br />

Range Options: 0.0–360.0<br />

Data<br />

Type<br />

Description<br />

and Default<br />

ISTAT I Status flag:<br />

0 = Operation was successful<br />

1 = Error, invalid text rotation angle<br />

5000.0.0 Graphics Utilities: Internal Routines – SIGTRO 141


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Graphic Routines<br />

SIGTXT<br />

Function Draw text<br />

This subroutine draws text. The text string contained in TEXT is drawn<br />

at the location defined by XCORS and YCORS, with the currently<br />

defined height, color, font, justification method, and rotation angle.<br />

This routine is only used for working on graphics features: It does not<br />

apply to the standard applications elsewhere in this guide.<br />

Environment The ZPI/O and ZIGS environments must be initialized and a graphics<br />

file, a picture, and a graphics feature must be opened before this<br />

routine is called.<br />

Format CALL SIGTXT(<br />

1 TEXT , NCHAR , XCORS , YCORS , ISTAT )<br />

Input Arguments<br />

Argument<br />

Name<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

TEXT C*80 Text string of length NCHAR.<br />

NCHAR I Number of characters in text string.<br />

Range Options: 0–80<br />

XCORS R The x coordinate of text.<br />

YCORS R The y coordinate of text.<br />

Data<br />

Type<br />

Description<br />

and Default<br />

ISTAT I Status flag:<br />

0 = Operation was successful<br />

1 = Error, graphics feature is not open<br />

142 Graphics Utilities: Internal Routines – SIGTXT 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Name Description<br />

Table 5: Checklist for Projection Arguments vs. Projection Type<br />

Arguments<br />

Alber’s Equal Area<br />

American Polyconic<br />

Azimuthal Gnomonic<br />

Azimuthal Orthographic<br />

Azimuthal Stereographic<br />

Bipolar Oblique Conic Conformal<br />

Projection Type<br />

Cassini-Soldner<br />

Double Parallel Lambert<br />

General Transverse Mercator<br />

5000.0.0 Graphics Utilities: Internal Routines – SIGTXT 143<br />

Modified Polyconic<br />

New Zealand Map Grid<br />

Oblique Transverse Mercator<br />

AXISA Semimajor Radius A if ISPCOD = 1* O N O O O N O O O O N O O O O O<br />

AXISB Semiminor Radius B if ISPCOD = 1* O N O O O N O O O O N O O O O O<br />

AZMTH Azimuth of center line at skew origin N N N N N N N N N N N Y N N N N<br />

BOTPAR Least Standard Parallel Y N N N N N N Y N N N N Y 1 N N N<br />

FEAST False Easting O O O O O O N O O O O O O O N O<br />

FNORTH False Northing O O O O O O O O O O N O O O O O<br />

IHEM Hemisphere N N N N N N N N N N N N N N O N<br />

IPJCOD Projection Code Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y<br />

ISPCOD Spheroid Code Y Y Y Y N N Y Y Y Y N Y Y Y Y Y<br />

IUNCOD Units Code Y Y Y Y Y Y Y Y Y Y N Y Y Y N Y<br />

IUTMCD UTM Zone N N N N N N N N N N N N N N O 4 N<br />

IRADTY Radius Calculation Method N N N N N N N N N N N N N N N Y<br />

REFLAT Reference Latitude Y 1 Y Y Y Y N Y Y Y Y 1 N Y Y N N N<br />

REFLON Reference Longitude Y 2 Y Y Y Y N Y Y Y Y 2 N Y Y Y O 3 Y<br />

SCALE Scale factor at origin N N N N N N N N N N N Y N N N N<br />

SFLAT Latitude Scale Factor N N N N N N N N N Y N N N N N N<br />

SFLON Longitude Scale Factor N N N N N N N N Y Y 2 N N N N N N<br />

TOPPAR Greatest Standard Parallel Y N N N N N N Y N N N N N N N N<br />

UNTFAC Unit Factor if IUNCOD = 1* O O O O O O O O O O N O O O N O<br />

Key<br />

Y = argument required<br />

N = argument not required<br />

O = argument optional.If not<br />

specified, default value is used.<br />

1<br />

Also serves as a single standard parallel<br />

2<br />

Polyconic projection also has a central meridian with associated scale factor<br />

3<br />

Hemisphere defines false northing for UTM<br />

4<br />

One or the other is required<br />

* User defined<br />

Single Parallel Lambert<br />

Standard Mercator<br />

Universal Transverse Mercator<br />

Van Der Grinten I


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

YLNVEW<br />

YLONG<br />

Cutline<br />

*<br />

(0.0,0.0)<br />

XOFFST<br />

(VXMIN,VYMIN)<br />

FREEY<br />

Scaled Area<br />

(“User” units)<br />

YOFFST<br />

XLONG<br />

XLNVEW<br />

No graphics may appear outside “Unscaled” Area<br />

Display Area for a Picture<br />

(VXMAX,VYMAX)<br />

User Units. For example, Northing/Easting, etc.<br />

Used for “Scaled” area of the picture<br />

Range for x is VXMIN to VXMAX<br />

for y is VYMIN to VYMAX<br />

Length in x is XLONG = (VXMAX – VXMIN)<br />

y is YLONG = (VYMAX – VYMIN)<br />

Plotter Units. Inches or centimeters<br />

Used for “Unscaled” area of the picture<br />

Range for x is 0.0 to XLNVEW<br />

for y is 0.0 to YLNVEW<br />

Length in x is XLNVEW<br />

y is YLNVEW<br />

XOFFST Border width around left of map<br />

YOFFST Border width below map<br />

FREEX Border width around right of map<br />

FREEY Border width above map<br />

(XLNVEW,YLNVEW)<br />

FREEX<br />

Unscaled Area<br />

(“Plotter” units)<br />

In General<br />

TOP/BOTTOM Refers to longitude or eastings<br />

LEFT/RIGHT SIDES Refers to latitude or northings<br />

144 Graphics Utilities: Internal Routines – SIGTXT 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Graphic Routines<br />

SIIZGF<br />

Function Open a graphics file<br />

Environment The ZPI/O and ZIGS environments must be initialized before this<br />

routine is called.<br />

Format CALL SIIZGF (<br />

1 ZGFNAM , HISNEW , IFNEW , HISOLD , ISTAT )<br />

Input Arguments<br />

Argument<br />

Name<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

ZGFNAM C*80 Disk filename of graphics file. This name is a<br />

dummy variable on systems without dynamic file<br />

allocation, but good for documentation.<br />

HISNEW C*80 Header for the new graphics file.<br />

IFNEW C*3 File type:<br />

NEW = Open a new graphics file<br />

OLD = Open an old graphics file<br />

Data<br />

Type<br />

Description<br />

and Default<br />

HISOLD C*80 Header of an old graphics file.<br />

ISTAT I Status flag:<br />

0 = Operation was successful<br />

1 = Error, opening graphics file<br />

2 = Error, invalid graphics file type<br />

5000.0.0 Graphics Utilities: Internal Routines – SIIZGF 145


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Graphic Routines<br />

SIIZIG<br />

Function Initialize the Z-<strong>MAP</strong> Interactive Graphics Environment (ZIGS)<br />

Environment The ZPI/O environment must be initialized before this routine is called.<br />

Format CALL SIIZIG<br />

Input Arguments None<br />

Output Arguments None<br />

146 Graphics Utilities: Internal Routines – SIIZIG 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Graphic Routines<br />

SIOVLY<br />

Function Overlay maps or generate index maps<br />

This subroutine takes the parameters passed from a driver routine for<br />

overlaying graphics. It then copies the picture as instructed.<br />

Environment The ZPI/O and ZIGS environments must be initialized and a graphics<br />

file and Copy To picture opened before this routine is called.<br />

Format CALL SIOVLY (<br />

1 ZGFAUX , PICFRM , IMODE , NOTZGF , NTYPS ,<br />

2 LGBTYP , NDXPOS , XLWLF , YLWLF , HEIGHT ,<br />

3 ISTAT )<br />

Input Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

ZGFAUX C*80 Name of the auxiliary graphics file, if used.<br />

PICFRM C*80 Name of the Copy From picture.<br />

IMODE I Type of overlay graphics:<br />

1 = Copy one picture to another picture<br />

2 = Overlay one picture onto another picture<br />

3 = Currently not used<br />

4 = Overlay an index map or any other picture<br />

below the Copy To picture AOI. The<br />

height of the index map must be less than<br />

the height of the Copy To picture<br />

NOTZGF I Whether the Copy From picture is in an<br />

auxiliary graphics file rather than the same one as<br />

the Copy To picture:<br />

0 = An auxiliary graphics file is used<br />

1 = No auxiliary graphics file is used<br />

NTYPS I Number of types of graphics features to be<br />

copied.<br />

LGBTYP I Array, of length 40, containing the codes for the<br />

graphics features to be copied, one for each<br />

feature. For a list of codes and their descriptions,<br />

see “Appendix A. Graphics Feature Codes” in the<br />

Z-<strong>MAP</strong> <strong>Plus</strong> Reference Manual. If all available<br />

types of features are to be copied, set NTYPS = 1<br />

and set LGBTYP(1) = –100.<br />

5000.0.0 Graphics Utilities: Internal Routines – SIOVLY 147


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Output Arguments<br />

Argument<br />

Name<br />

NDXPOS I Position of the index map. Used if IMODE = 4.<br />

1 = Position the index map in the lower left<br />

corner of the Copy To picture<br />

2 = Position the index map in the lower right<br />

corner of the Copy To picture<br />

3 = The x,y coordinates of the lower left<br />

corner of the index map are given by<br />

XLWLF and YLWLF<br />

XLWLF R The x coordinate for the lower left corner of the<br />

index map overlay, in plotter units. Used if<br />

IMODE = 4 and NDXPOS = 3.<br />

YLWLF R The y coordinate for the lower left corner of the<br />

index map overlay, in plotter units. Used if<br />

IMODE = 4 and NDXPOS = 3.<br />

HEIGHT R The height of the index map, in plotter units.<br />

Used if IMODE = 4. The height of the index map<br />

must be less than the y offset of the Copy To<br />

picture.<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Data<br />

Type<br />

Description<br />

and Default<br />

Description<br />

and Default<br />

ISTAT I Status flag:<br />

0 = Operation was successful<br />

1 = Error, copying graphics information<br />

2 = Error, problem positioning index map<br />

148 Graphics Utilities: Internal Routines – SIOVLY 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Graphic Routines<br />

SIPCAS<br />

Function Assemble/overlay a picture<br />

This subroutine is a general purpose assembly and overlay routine.<br />

Overlays and composite maps can be created using this routine in<br />

conjunction with the default setup routine. See the illustration<br />

following Output Arguments for the relationship between the Copy<br />

From and Copy To space.<br />

Note The Copy From graphics file is opened on logical unit 27 and the<br />

Copy To graphics file is opened on logical unit 28.<br />

Environment The ZPI/O and ZIGS environments must be initialized and the graphics<br />

files and pictures exist and are closed.<br />

Format CALL SIPCAS (<br />

1 PICFRM , PICTO , ZGFFRM , ZGFTO , IFSAME ,<br />

2 LGBOUT , LGBNUM , LGBTYP , IFBORD , ICLIP ,<br />

3 XLL , YLL , RESCL , ISTAT )<br />

Input Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

PICFRM C*80 Name of input Copy From picture.<br />

PICTO C*80 Name of output Copy To picture.<br />

ZGFFRM C*80 Name of input Copy From graphics file.<br />

ZGFTO C*80 Name of output Copy To graphics file.<br />

IFSAME L Logical for whether both pictures are on the<br />

same graphics file:<br />

.TRUE. = Pictures are in the same graphics file<br />

.FALSE. = Pictures are in different graphics files<br />

LGBOUT I Maintain the individual graphics features or<br />

copy as a single block:<br />

1 = Copy into a single feature<br />

2 = Maintain divisions<br />

LGBNUM I Number of graphics features to copy.<br />

5000.0.0 Graphics Utilities: Internal Routines – SIPCAS 149


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Argument<br />

Name<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

LGBTYP I Array, of length 40, containing the codes for the<br />

graphics features to be copied. To copy entire<br />

picture set LGBTYP(1) to a negative number.<br />

For a list of codes, see “Appendix A. Graphics<br />

Feature Codes” in the Z-<strong>MAP</strong> <strong>Plus</strong> Reference<br />

Manual.<br />

IFBORD I Whether to draw the cutline around the copied<br />

picture:<br />

0 = Do not draw the cutline<br />

1 = Draw the cutline<br />

ICLIP I Whether to clip to Copy To picture border.<br />

0 = Do not clip picture<br />

1 = Clip picture<br />

XLL R The x coordinate of lower left corner of Copy<br />

From picture in plotter units (in or cm) for the<br />

Copy To picture. See the illustration following<br />

the Output Arguments.<br />

YLL R The y coordinate of lower left corner of Copy<br />

From picture in plotter units (in or cm) for the<br />

Copy To picture. See the illustration following<br />

the Output Arguments.<br />

RESCL R Rescaling factor between plotter units in Copy<br />

From and Copy To pictures.<br />

Data<br />

Type<br />

Description<br />

and Default<br />

Description<br />

and Default<br />

ISTAT I Status flag:<br />

–1 = Warning, clipping is currently<br />

unavailable. Reset to zero.<br />

0 = Operation was successful.<br />

1 = Error, logical not properly set.<br />

2 = Error, performing the copy process.<br />

3 = Error, from copying process.<br />

4 = Error, closing copy process.<br />

150 Graphics Utilities: Internal Routines – SIPCAS 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

YLNVEW<br />

YLONG<br />

YLNVEW<br />

YLONG<br />

Cutline<br />

(0.0,0.0)<br />

Cutline<br />

*<br />

(0.0,0.0)<br />

Border<br />

XOFFST<br />

(VXMIN,VYMIN)<br />

Border<br />

XOFFST<br />

(VXMIN,VYMIN)<br />

*<br />

(XLL,YLL)<br />

FREEY<br />

YOFFST<br />

XLONG<br />

XLNVEW<br />

“Copy To” Space<br />

FREEY<br />

Scaled Area<br />

(“User” units)<br />

YOFFST<br />

XLONG<br />

XLNVEW<br />

“Copy From” Space<br />

(VXMAX,VYMAX)<br />

(VXMAX,VYMAX)<br />

“Copy To” Space and “Copy From” Space<br />

(XLNVEW,YLNVEW)<br />

FREEX<br />

(XLNVEW,YLNVEW)<br />

FREEX<br />

Unscaled Area<br />

(“Plotter” units)<br />

5000.0.0 Graphics Utilities: Internal Routines – SIPCAS 151


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

User Units. For example, Northing/Easting, etc.<br />

“Scaled” area of the picture<br />

Range for x is VXMIN to VXMAX<br />

for y is VYMIN to VYMAX<br />

Length in x is XLONG = (VXMAX – VXMIN)<br />

y is YLONG = (VYMAX – VYMIN)<br />

Plotter Units. Inches or centimeters<br />

“Unscaled” area of the picture<br />

Range for x is 0.0 to XLNVEW<br />

for y is 0.0 to YLNVEW<br />

Length in x is XLNVEW<br />

y is YLNVEW<br />

XOFFST Border width around left of map<br />

YOFFST Border width below map<br />

FREEX Border width around right of map<br />

FREEY Border width above map<br />

In General<br />

TOP/BOTTOM Refers to longitude or eastings<br />

LEFT/RIGHT SIDES Refers to latitude or northings<br />

152 Graphics Utilities: Internal Routines – SIPCAS 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Graphic Routines<br />

SIPCCP<br />

Function Copy all or part of a picture to another picture<br />

This subroutine copies all of a picture or just a selected few logical<br />

graphics blocks to another picture on the same, an old, or a new<br />

graphics file. The graphics features can be copied individually or into a<br />

single feature (the graphics feature type is Index Map).<br />

If an auxiliary graphics file is used, it should be closed before calling<br />

this routine. It is opened on logical unit 28.<br />

Environment The ZPI/O and ZIGS environments must be initialized and the graphics<br />

file which contains the Copy From picture must be open. The Copy<br />

From picture is closed by this routine.<br />

Format CALL SIPCCP (<br />

1 PICFRM , PICTO , ZGFAUX , HISNEW , NOTZGF ,<br />

2 LGBOUT , LGBNUM , LGBTYP , ISTAT )<br />

Input Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

PICFRM C*80 Name of the input Copy From picture.<br />

PICTO C*80 Name of the new Copy To picture. If blank, the<br />

Copy From picture name is to be used.<br />

ZGFAUX C*80 Name of the output Copy To graphics file.<br />

Blanked if the same graphics file is to be used.<br />

HISNEW C*80 History for the new graphics file.<br />

NOTZGF I Which graphics file to copy the new picture into:<br />

0 = Same graphics file<br />

1 = Old graphics file<br />

2 = New graphics file<br />

LGBOUT I Maintain the individual graphics features or copy<br />

as a single block:<br />

1 = Copy into a single feature<br />

2 = Maintain divisions<br />

LGBNUM I Number of graphics features to copy. Set to zero<br />

if all graphics features are to be copied and<br />

LGBTYP(1) is set to a negative number.<br />

LGBTYP I Array, of length 40, containing the codes for the<br />

graphics features to be copied. To copy entire<br />

picture, set LGBTYP(1) to a negative number.<br />

For a list of codes, see “Appendix A. Graphics<br />

Feature Codes” in the Z-<strong>MAP</strong> <strong>Plus</strong> Reference<br />

Manual.<br />

5000.0.0 Graphics Utilities: Internal Routines – SIPCCP 153


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

ISTAT I Status flag:<br />

0 = Operation was successful<br />

1 = Error, problem initializing copying<br />

2 = Error, picture not found<br />

3 = Error, problem opening Copy To graphics<br />

file<br />

4 = Error, problem opening picture<br />

5 = Error, problem copying headers<br />

6 = Error, problem copying picture<br />

7 = Error, problem closing picture<br />

8 = Error, copying to the same graphics file<br />

and the Copy To picture name is the same<br />

as the Copy From picture<br />

9 = Error, invalid type of graphics file to copy<br />

to<br />

154 Graphics Utilities: Internal Routines – SIPCCP 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Graphic Routines<br />

SIPCDF<br />

Function Compute four corners of one picture relative to another picture for<br />

assembly/overlay<br />

This subroutine computes defaults used to perform picture composition<br />

and overlay tasks in the ZPI/O environment. Its primary function is to<br />

provide the lower left corner of the Copy From picture in terms of the<br />

Copy To space. (See the illustration following Output Arguments.)<br />

Note The arrays XBOUND and YBOUND are stored as follows:<br />

The Copy From graphics file is opened on logical unit 27, and the<br />

Copy To graphics file is opened on logical unit 28.<br />

Environment The ZPI/O and ZIGS environments must be initialized and the graphics<br />

files and pictures must exist and be closed.<br />

Format CALL SIPCDF (<br />

1 PICFRM , PICTO , ZGFFRM , ZGFTO , IFSAME ,<br />

2 IRESCL , IFCOFS , XLLIN , YLLIN , XLRIN ,<br />

3 YLRIN , RESCL , XLLOT , YLLOT , RESCOT ,<br />

4 XBOUND , YBOUND , ISTAT )<br />

Input Arguments<br />

( XBOUND(1) YBOUND(1) ) = (X1, Y1)<br />

( XBOUND(2) YBOUND(2) ) = (X1, Y2)<br />

( XBOUND(3) YBOUND(3) ) = (X2, Y2)<br />

( XBOUND(4) YBOUND(4) ) = (X2, Y1)<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

PICFRM C*80 Name of input Copy From picture.<br />

PICTO C*80 Name of output Copy To picture.<br />

(X1,Y2) (X2,Y2)<br />

(X1,Y1) (X2,Y1)<br />

ZGFFRM C*80 Name of graphics file containing input Copy<br />

From picture.<br />

ZGFTO C*80 Name of graphics file to contain output Copy To<br />

picture.<br />

IFSAME L Logical for whether both pictures are in the same<br />

graphics file:<br />

.TRUE. = Pictures are in the same graphics file<br />

.FALSE. = Pictures are in different graphics files<br />

5000.0.0 Graphics Utilities: Internal Routines – SIPCDF 155


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Argument<br />

Name<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

IRESCL I Type of rescaling used to position picture:<br />

0 = No rescaling<br />

1 = Use width<br />

2 = Use rescaling factor<br />

3 = Rescale for overlay<br />

IFCOFS I Positioning method:<br />

1 = Use lower left corner of cutline<br />

2 = Use lower left corner of map border<br />

3 = Position for overlay<br />

XLLIN R The x coordinate of lower left corner of Copy<br />

From picture in the Copy To picture coordinate<br />

space. Needed if IRESCL = 0, 1, or 2.<br />

YLLIN R The y coordinate of lower left corner of Copy<br />

From picture in the Copy To picture coordinate<br />

space. Needed if IRESCL = 0, 1, or 2.<br />

XLRIN R The x coordinate of lower right corner of Copy<br />

From picture in Copy To picture coordinate<br />

space. Needed if IRESCL = 1.<br />

YLRIN R The y coordinate of lower right corner of Copy<br />

From picture in Copy To picture coordinate<br />

space. Needed if IRESCL = 1.<br />

RESCL R Input rescaling factor. Needed if IRESCL = 2.<br />

Data<br />

Type<br />

Description<br />

and Default<br />

Description<br />

and Default<br />

XLLOT R Output x coordinate of lower left corner. Output if<br />

IFCOFS = 3, overlay.<br />

YLLOT R Output y coordinate of lower left corner. Output if<br />

IFCOFS = 3, overlay.<br />

RESCOT R Output rescaling factor. Output if IRESCL = 1 or<br />

3.<br />

XBOUND R Array, of length 4, containing the x coordinates of<br />

the box around Copy From picture given in Copy<br />

To coordinate space.<br />

YBOUND R Array, of length 4, containing the y coordinates of<br />

the box around Copy From picture given in Copy<br />

To coordinate space.<br />

156 Graphics Utilities: Internal Routines – SIPCDF 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

“Copy To”<br />

Space<br />

“Copy From”<br />

Space<br />

YLNVEW<br />

YLONG<br />

YLNVEW<br />

YLONG<br />

Cutline<br />

(0.0,0.0)<br />

Cutline<br />

*<br />

(0.0,0.0)<br />

Border<br />

XOFFST<br />

XOFFST<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

ISTAT R Status flag:<br />

0 = Operation was successful<br />

1 = Error, logical not properly set<br />

2 = Error, problem initializing pictures and<br />

graphics files<br />

3 = Error, problem calculating box coordinates<br />

4 = Error, problem closing pictures and<br />

graphics files<br />

(VXMIN,VYMIN)<br />

Border<br />

(VXMIN,VYMIN)<br />

*<br />

(XLLIN,YLLIN)<br />

FREEY<br />

YOFFST<br />

XLONG<br />

XLNVEW<br />

FREEY<br />

Scaled Area<br />

(“User” units)<br />

YOFFST<br />

XLONG<br />

XLNVEW<br />

(XLRIN,YLRIN)<br />

“Copy To” Space and “Copy From” Space<br />

(VXMAX,VYMAX)<br />

FREEX<br />

(VXMAX,VYMAX)<br />

(XLNVEW,YLNVEW)<br />

(XLNVEW,YLNVEW)<br />

FREEX<br />

Unscaled Area<br />

(“Plotter” units)<br />

5000.0.0 Graphics Utilities: Internal Routines – SIPCDF 157


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

User Units. For example, Northing/Easting, etc.<br />

Used for “Scaled” area of the picture<br />

Range for x is VXMIN to VXMAX<br />

for y is VYMIN to VYMAX<br />

Length in x is XLONG = (VXMAX – VXMIN)<br />

y is YLONG = (VYMAX – VYMIN)<br />

Plotter Units. Inches or centimeters<br />

Used for “Unscaled” area of the picture<br />

Range for x is 0.0 to XLNVEW<br />

for y is 0.0 to YLNVEW<br />

Length in x is XLNVEW<br />

y is YLNVEW<br />

XOFFST Border width around left of map<br />

YOFFST Border width below map<br />

FREEX Border width around right of map<br />

FREEY Border width above map<br />

In General<br />

TOP/BOTTOM Refers to longitude or eastings<br />

LEFT/RIGHT SIDES Refers to latitude or northings<br />

158 Graphics Utilities: Internal Routines – SIPCDF 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Graphic Routines<br />

SIPCDL<br />

Function Mark a picture for deletion<br />

This subroutine marks a picture on the current graphics file for<br />

deletion.<br />

If the graphics file is compressed (as described in ”SIZGCM” on page<br />

163), the picture information for those pictures marked for deletion is<br />

erased.<br />

Environment The ZPI/O and ZIGS environments must be initialized and the graphics<br />

file containing the picture(s) to be deleted must be open before this<br />

routine is called.<br />

Format CALL SIPCDL ( NAMPIC , ISTAT )<br />

Input Arguments<br />

Argument<br />

Name<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

NAMPIC C*80 Name of the picture to be marked for deletion.<br />

Data<br />

Type<br />

Description<br />

and Default<br />

ISTAT I Status flag:<br />

0 = Operation was successful<br />

1 = Error, problem reading picture header<br />

2 = Error, problem writing picture header<br />

3 = Error, picture not found<br />

5000.0.0 Graphics Utilities: Internal Routines – SIPCDL 159


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Graphic Routines<br />

SIPCFL<br />

Function Obtain a picture name by picture index<br />

Environment The ZPI/O and ZIGS environments must be initialized before this<br />

routine is called. The graphics file is opened and closed by this routine.<br />

Format CALL SIPCFL (<br />

1 NAMZGF , NUMPIC , INXPIC , NAMPIC , NUMPCS,<br />

2 ISTAT )<br />

Input Arguments<br />

Argument<br />

Name<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

NAMZGF C*80 Name of the graphics file.<br />

NUMPIC I Number of pictures to obtain information for.<br />

Range Options: >0<br />

INXPIC I Array, of length NUMPIC, containing the<br />

indices of the pictures for which information is to<br />

be obtained. Set INXPIC(1) to –NUMPIC or a<br />

large negative number to obtain all pictures.<br />

Data<br />

Type<br />

Description<br />

and Default<br />

NAMPIC C*80 Array, of length NUMPIC, containing the names<br />

of the pictures associated with the picture<br />

indices.<br />

NUMPCS I Number of pictures for which actual information<br />

was obtained.<br />

ISTAT I Status flag:<br />

–2 = Warning, picture does not exist for that<br />

index.<br />

–1 = Warning, number of pictures requested is<br />

too large. Resetting to actual number of<br />

pictures.<br />

0 = Operation was successful.<br />

1 = Error, invalid picture index.<br />

2 = Error, problem opening graphics file.<br />

160 Graphics Utilities: Internal Routines – SIPCFL 5000.0.0


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Graphic Routines<br />

SIPCRN<br />

Function Rename a picture<br />

This subroutine takes an old picture on the current graphics file and<br />

renames it to the name provided.<br />

Environment The ZPI/O and ZIGS environments must be initialized and a graphics<br />

file opened before this routine is called.<br />

Format CALL SIPCRN ( NAMOLD , NAMNEW , ISTAT )<br />

Input Arguments<br />

Argument<br />

Name<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

NAMOLD C*80 Name of the picture to be renamed.<br />

NAMNEW C*80 New name for the picture.<br />

Data<br />

Type<br />

Description<br />

and Default<br />

ISTAT I Status flag:<br />

0 = Operation was successful<br />

1 = Error, old picture not found<br />

2 = Error, new picture name blank or same as<br />

old picture<br />

3 = Error, no names on the file<br />

4 = Error, new picture name already exists<br />

5 = Error, problem renaming file<br />

161 Graphics Utilities: Internal Routines 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Graphic Routines<br />

SIRPIC<br />

Function Open an old picture in read-only mode<br />

This subroutine opens an old picture on the current graphics file for<br />

reading only, such as to display or plot an old picture.<br />

Environment The ZPI/O and ZIGS environments must be initialized and a graphics<br />

file opened before this routine is called.<br />

Format CALL SIRPIC ( PICNAM , ISTAT )<br />

Input Arguments<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

PICNAM C*80 Name of the picture.<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

ISTAT I Status flag:<br />

0 = Operation was successful<br />

1 = Error, opening picture<br />

5000.0.0 Graphics Utilities: Internal Routines 162


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Graphic Routines<br />

SIZGCM<br />

Function Compress a graphics file<br />

This subroutine takes an old graphics file with pictures that have been<br />

marked for deletion and compresses it into another graphics file with<br />

only the current pictures, using the history and other information from<br />

the old graphics file.<br />

The uncompressed graphics file is opened on logical unit 27 and the<br />

new compressed graphics file is opened on logical unit 28.<br />

Environment The ZPI/O and ZIGS environments must be initialized and the graphics<br />

files closed before this routine is called.<br />

Format CALL SIZGCM ( ZGFOLD , ZGFNEW , ISTAT )<br />

Input Arguments<br />

Argument<br />

Name<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

ZGFOLD C*80 Name of the graphics file to be compressed.<br />

ZGFNEW C*80 Name of the new compressed graphics file.<br />

Data<br />

Type<br />

Description<br />

and Default<br />

ISTAT I Status flag:<br />

0 = Operation was successful<br />

1 = Error, problem opening old graphics file<br />

2 = Error, problem initializing copy<br />

3 = Error, problem switching from one<br />

graphics file to the other<br />

4 = Error, problem opening new graphics file<br />

5 = Error, problem compressing graphics file<br />

163 Graphics Utilities: Internal Routines 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Output Arguments Which of these tables is the correct one?<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

ISTAT I Status flag:<br />

–3 = Warning, problem copying graphics<br />

segments<br />

–2 = Warning, problem writing picture<br />

information<br />

–1 = Warning, problem opening picture<br />

0 = Operation was successful<br />

1 = Error, number of pictures is zero<br />

2 = Error, invalid logical unit<br />

3 = Error, opening neutral file<br />

5000.0.0 Graphics Utilities: Internal Routines 164


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Graphic Routines<br />

SOGCLS<br />

Name SOGCLS<br />

Function Obtain the color representation for a color index<br />

This subroutine, for a given color index on the color table associated<br />

with the currently open picture, returns the percentage of red, green<br />

and blue as decimal fractions.<br />

Environment A call to S3GELM to obtain the next graphics element must be done<br />

before this routine is called.<br />

Format CALL SOGCLS (<br />

1 NDXCLR , REDPCT , GRNPCT , BLUPCT , ISTAT )<br />

Input Arguments<br />

Argument<br />

Name<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

NDXCLR I Color index.<br />

Range Options: 0–255<br />

Data<br />

Type<br />

Description<br />

and Default<br />

REDPCT R Fraction red.<br />

Range Options: 0.0–1.0<br />

GRNPCT R Fraction green.<br />

Range Options: 0.0–1.0<br />

BLUPCT R Fraction blue.<br />

Range Options: 0.0–1.0<br />

ISTAT I Status flag:<br />

0 = Operation was successful<br />

1 = Error, no color table on picture<br />

2 = Error, invalid color index<br />

165 Graphics Utilities: Internal Routines 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Graphic Routines<br />

SOGEND<br />

Function Terminate the ZPI/O output graphics environment<br />

This subroutine deactivates the output graphics subsystem. It can be<br />

reactivated by calling SOGINT.<br />

Environment This subroutine should be called after a picture has been completely<br />

decoded. The ZPI/O output graphics environment must be initialized<br />

before this routine is called.<br />

Format CALL SOGEND<br />

Input Arguments None<br />

Output Arguments None<br />

5000.0.0 Graphics Utilities: Internal Routines 166


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Graphic Routines<br />

SOGINT<br />

Function Initialize the ZPI/O output graphics environment<br />

Environment The application program must contain the declaration:<br />

COMMON/ZGSWRK/WORKSO(N)<br />

where N is normally greater than 10,000, though it may have to be<br />

larger depending on the number of decoded line segments. However, N<br />

must be equal to LENWRK.<br />

The ZPI/O and ZIGS environments must be initialized, a graphics file<br />

opened, and a picture opened read-only before this routine is called.<br />

Format CALL SOGINT (<br />

1 QTXTDC , QSYMDC , QLINDC , LENWRK , IOSCAL ,<br />

2 ISTAT )<br />

167 Graphics Utilities: Internal Routines 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Graphic Routines<br />

SOGLGB<br />

Function Obtain the next graphics feature for the picture<br />

This subroutine retrieves the next graphics feature for the picture being<br />

decoded.<br />

Environment The ZPI/O output graphics environment must be initialized before this<br />

routine is called.<br />

Format CALL SOGLGB ( QPCEND , LGBCOD , CTRLEV , ISTAT )<br />

Input Arguments None<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

QPCEND L Whether end of picture is found:<br />

.TRUE. = End of picture found<br />

.FALSE. = There are still more graphics features<br />

LGBCOD I Graphics feature number. (See “Appendix A.<br />

Graphics Feature Codes” in the Z-<strong>MAP</strong> <strong>Plus</strong><br />

Reference Manual.)<br />

CTRLEV R Contour level for contour graphics features.<br />

ISTAT I Status flag:<br />

0 = Operation was successful<br />

1 = Error, no graphics feature on this picture<br />

5000.0.0 Graphics Utilities: Internal Routines 168


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Introduction<br />

Internal Routines<br />

File Utilities<br />

Use the File Utilities subroutines to work with master files and their<br />

member files.<br />

Use the master file utilities to:<br />

initialize the ZIMS environment and attach master files<br />

open and close a master file<br />

attach, compress, create, detach, and list master files<br />

rename the internal name<br />

Use the member file utilities to:<br />

open, close, delete, list, and obtain information about member files<br />

position a member file, then read or write records sequentially<br />

read and write records with the member file at a random location<br />

read, write, and set defaults for field descriptors<br />

Some library routines are not included in the documentation. These<br />

routines are used internally by other library routines and are typically<br />

not used by application programmers. The internal routines for file<br />

utilities are:<br />

SICROC Open a file with prescribed attributes or close it. Used<br />

for creating a master file.<br />

5000.0.0 File Utilities: Introduction 169


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

File Management Routines<br />

S2DELE<br />

Function Delete a member file from a master file<br />

This subroutine marks a member file for deletion from a master file.<br />

The marked file is removed if the master file is compressed (as<br />

described in SIMFCM on page 199).<br />

Environment The ZPI/O and ZIMS environments must be initialized before you call<br />

this routine.<br />

Format CALL S2DELE ( NAMZIM , MFDNZM , IHISZM , ISTAT )<br />

170 File Utilities: Internal Routines – S2DELE 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

File Management Routines<br />

S2FLST<br />

Function List member files<br />

This subroutine lists member files in every master file that is attached.<br />

The contents of the report can be restricted by file types and/or<br />

filenames.<br />

Environment The ZPI/O and ZIMS environments must be initialized before you call<br />

this routine.<br />

Format CALL S2FLST (<br />

1 REPORT , NAME , TYPES , BYNAME, BYTYPE ,<br />

2 NUMTYP , LUNRPT , ISTAT )<br />

Input Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

REPORT C*7 Type of report listing.<br />

SUMMARY= List member filename, type, size<br />

PARTIAL = List member filename, type, size, any<br />

application program written history,<br />

and file header<br />

FULL = List member filename, type, size, any<br />

application program written history,<br />

file header, and field descriptors<br />

NAME C*24 Prefix filename text string. Only files that have a<br />

name starting with this prefix are listed.<br />

TYPES C*4 Array (of length NUMTYP) containing the file<br />

types to be listed.<br />

BYNAME L Whether report is to be restricted by member<br />

filename. Only files which have a prefix (or full<br />

name) equal to the prefix filename string<br />

(specified by NAME) are listed.<br />

.TRUE. = Restrict listing based upon filenames<br />

.FALSE. = Do not restrict listing based upon<br />

filenames<br />

BYTYPE L Whether report is to be restricted by member file<br />

type. Only files of type TYPES are listed.<br />

.TRUE. = Restrict listing based upon filenames<br />

.FALSE. = Do not restrict listing based upon<br />

filenames<br />

NUMTYP I Number of file types to be listed.<br />

5000.0.0 File Utilities: Internal Routines – S2FLST 171


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Argument<br />

Name<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

LUNRPT I Logical unit for the output report file. The unit<br />

must already be open. A zero outputs report to<br />

unit LUNSTA specified by SIISIL (page 41).<br />

Data<br />

Type<br />

Description<br />

and Default<br />

Range Options: 0–99<br />

Description<br />

and Default<br />

ISTAT I Status flag:<br />

–1 = No master files attached<br />

0 = Operation was successful<br />

1 = Error, invalid report type<br />

2 = Error, invalid number of file types<br />

3 = Error, problem creating files listing<br />

172 File Utilities: Internal Routines – S2FLST 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

File Management Routines<br />

S2IZIM<br />

Function Initialize the Z-<strong>MAP</strong> Information Management System (ZIMS) and<br />

attach master files<br />

This subroutine initializes up to four (4) master files for the file<br />

management system and must be called before any data files can be<br />

accessed. Each master file may contain any number of member files<br />

which may contain control point data, grid models, fault lines, digitized<br />

contours, well logs, etc.<br />

To specify the number of master files assigned, do either of the<br />

following:<br />

Set MFDNUM to the number of master files to be attached (not<br />

including the scratch file).<br />

Set MFDNUM to 4 and blank-fill the unused portion of the<br />

NAMMFD array.<br />

This routine is equivalent to SIIZIM, but enables the user to indicate<br />

read-only or read-write file access for the MFDs. SIIZIM assumes<br />

read-write access only.<br />

Environment The ZPI/O environment must be initialized before you call this routine.<br />

Call this subroutine only once in any one application.<br />

Format CALL S2IZIM (<br />

1 NAMMFD , MFDNUM , IROFLG , LUNDRC , ISTAT )<br />

Input Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

NAMMFD C*80 Array (of length 4) containing the name(s) of<br />

master file(s) to be opened.<br />

Note: These names are used only on systems<br />

that have dynamic file allocation, but it is<br />

good for documentation.<br />

MFDNUM I Number of master file(s) to be attached.<br />

Range Options: 0–4<br />

IROFLG I Array (of length 4) containing a file access<br />

indicator for each MFD.<br />

0 = Read-write permissions<br />

1= Read-only permissions<br />

LUNDRC I Runtime directory physical unit number. This<br />

variable is currently reset to 20.<br />

Note: This variable is reserved for future use.<br />

5000.0.0 File Utilities: Internal Routines – S2IZIM 173


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

ISTAT I Default = Status flag:<br />

–1 = Warning, runtime directory is being reset<br />

to 20<br />

0 = Operation was successful<br />

1–4 = Sequential number of the master file that<br />

could not be opened<br />

5 = Error, opening scratch file<br />

6 = Error, opening runtime directory<br />

7 = Error, invalid master file number<br />

174 File Utilities: Internal Routines – S2IZIM 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

File Management Routines<br />

S2LHIS<br />

Function List the history and ancestry of a member file<br />

This subroutine lists the history of the file development in the order<br />

that generations have been created, by ancestry. If the number of<br />

generations (NUMGEN) is positive, all the generations from child<br />

(NUMGEN=0) to the specified generation are printed. To print all<br />

generations up to the tenth ancestry, set NUMGEN to a negative<br />

number.<br />

Note If IPRINT (the type of history to print) is set to zero, the routine prints<br />

all standard invoked ZCL parameters. If set to one (1), it also prints<br />

proposed ZCL parameters. If there is an exclamation mark (!) in the<br />

printout, it is equivalent to a comment in ZCL. The resulting string of<br />

commands, with minor modification, should run in ZCL.<br />

NUMGEN = 0<br />

NUMGEN = 1<br />

Child (current)<br />

Parent Parent<br />

NUMGEN = 2 Ancestor Ancestor Ancestor Ancestor<br />

NUMGEN = 3<br />

Environment The ZPI/O and ZIMS environments must be initialized before you call<br />

this routine.<br />

Format CALL S2LHIS (<br />

1 NAMFIL , MFDFIL , IHSFIL , NUMGEN , LOGRPT ,<br />

2 IPRINT , ISTAT )<br />

5000.0.0 File Utilities: Internal Routines – S2LHIS 175<br />

Ancestor<br />

Ancestor<br />

Ancestor<br />

Ancestor<br />

Ancestor<br />

Ancestor<br />

Ancestor<br />

Ancestor


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Input Arguments<br />

Argument<br />

Name<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

NAMFIL C*24 Name of the file whose history is to be printed.<br />

MFDFIL I Number of the master file containing the input<br />

file.<br />

Range Options: 0–5<br />

IHSFIL I History display for input file:<br />

0 = Do not display the history information<br />

1 = Display the history information<br />

NUMGEN I Maximum generation to display. See the note.<br />

Set NUMGEN to a negative number to print all<br />

information.<br />

Range Options: 0–10<br />

LOGRPT I Logical unit on which to print the report.<br />

Default = 6<br />

Range Options: 0–99<br />

IPRINT I Type of history to print:<br />

0 = Print standard history parameters<br />

1 = Print standard and proposed history<br />

parameters<br />

Data<br />

Type<br />

Description<br />

and Default<br />

ISTAT I Status flag:<br />

–1 = Warning, there are no history records.<br />

0 = Operation was successful.<br />

1 = Error, invalid master file number or<br />

master file is read-only.<br />

2 = Error, duplicate files. Specify master file<br />

number.<br />

3 = Error, cannot find the file.<br />

4 = Error, 5 files already in use.<br />

176 File Utilities: Internal Routines – S2LHIS 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

File Management Routines<br />

S2MFAT<br />

Function Attach a master file indicating either read-only or read-write file access<br />

This subroutine attaches master files and reloads the runtime directory.<br />

If at the beginning of the application there are no master files, then for<br />

initialization purposes call the initialization routine with the number of<br />

master files being zero and the names of the master files blanked.<br />

This routine is equivalent to SIMFAT, but enables the user to indicate<br />

read-only or read-write file access. SIMFAT assumes read-write<br />

access.<br />

Environment The ZPI/O and ZIMS environments must be initialized before you call<br />

this routine.<br />

This capability is not available for nondynamic allocating systems.<br />

Format CALL S2MFAT ( NAMMFD , IROFLG , ISTAT )<br />

Input Arguments<br />

Argument<br />

Name<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

NAMMFD C*80 Disk name of the master file to be attached.<br />

IROFLG I Assigns file access permissions.<br />

0 = Read/write access<br />

1= Read-only access.<br />

Data<br />

Type<br />

Description<br />

and Default<br />

ISTAT I Status flag:<br />

–1 = Warning, this option is unavailable for<br />

nondynamic systems<br />

0 = Operation was successful<br />

1 = Error, master filename is blank<br />

2 = Error, 5 master files attached already<br />

3 = Error, master file not found<br />

4 = Error, locked by another user<br />

5000.0.0 File Utilities: Internal Routines – S2MFAT 177


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

File Management Routines<br />

S5DAFU<br />

Function Obtain parameter, projection, and field information about a data file<br />

This subroutine obtains information about a data file, such as file<br />

information, parameter information, projection information, and field<br />

descriptor information.<br />

Environment The ZPI/O and ZIMS environments must be initialized before you call<br />

this routine.<br />

Format CALL S5DAFU (<br />

1 NAMDAT , MFDDAT , IHSDAT , NAMFLD , DEFFMT ,<br />

2 NUMFLD , NUMWRD , NUMREC , ITYDAT , ISRTIX ,<br />

3 IFPRJ , IPJCOD , ISPCOD , IUNCOD , IUTMCD ,<br />

4 IHEM , IRADTY , IFDTYP , IFDINX , IFDWRD ,<br />

5 IFDSRT , ROTANG , SEPMRK , CTRINT , BOTPAR ,<br />

6 TOPPAR , REFLAT , SFLAT , REFLON , SFLON ,<br />

7 FNORTH , FEAST , UNTFAC , AXISA , AXISB ,<br />

8 AZMTH , SCALE , FDZNON , XMIN , XMAX ,<br />

9 YMIN , YMAX , ISTAT )<br />

Input Arguments<br />

Argument<br />

Name<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

NAMDAT C*24 Name of the input data file.<br />

MFDDAT I Number of the master file that contains the input<br />

data file.<br />

Range Options: 0–5<br />

IHSDAT I History display for input file:<br />

0 = Do not display history information<br />

Data<br />

Type<br />

Description<br />

and Default<br />

NAMFLD C*20 Array of the file’s field names (of length 50).<br />

DEFFMT C*6 Array of default field output formats (length 50)<br />

NUMFLD I Number of fields on the file.<br />

NUMWRDI Number of words per data record on the file.<br />

NUMREC I Number of records on the file.<br />

ITYDAT I Type of data on input file. 1 = grid, 2 = data, 3 =<br />

contour, etc. (See “Appendix B. File and Field<br />

Codes” in the Z-<strong>MAP</strong> <strong>Plus</strong> Reference Manual.)<br />

178 File Utilities: Internal Routines – S5DAFU 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

ISRTIX I Primary file sort index.<br />

IFPRJ I Type of projection information:<br />

1 = No projection information<br />

2 = Projection information<br />

3 = Projected but no information<br />

PJCOD * I Cartographic projection:<br />

–17 = Grads and Van Der Grinten I<br />

–16 = Grads and Bipolar Oblique Conic Conformal<br />

–15 = Grads and Cassini-Soldner<br />

–14 = Grads and New Zealand Map Grid<br />

–13 = Grads and Oblique Transverse Mercator<br />

–12 = Grads and American Polyconic<br />

–11 = Currently not used<br />

–10 = Grads and Alber’s Equal Area (equivalent)<br />

with two standard parallels<br />

–9 = Grads and Modified Rectangular Orthotomic<br />

Polyconic<br />

–8 = Grads and Azimuthal Orthographic<br />

–7 = Grads and Azimuthal Stereographic<br />

–6 = Grads and Azimuthal Gnomonic<br />

–5 = Grads and Conformal Lambert with two<br />

standard parallels<br />

–4 = Grads and Conformal Lambert with one<br />

standard parallel<br />

–3 = Grads and Standard Mercator<br />

–2 = Grads and General Transverse Mercator<br />

–1 = Currently not used<br />

0 = Currently not used<br />

1 = Degrees and Universal Transverse Mercator<br />

2 = Degrees & General Transverse Mercator<br />

3 = Degrees and Standard Mercator<br />

4 = Degrees and Conformal Lambert with one<br />

standard parallel<br />

5 = Degrees and Conformal Lambert with two<br />

standard parallels<br />

6 = Degrees and Azimuthal Gnomonic<br />

7 = Degrees and Azimuthal Stereographic<br />

8 = Degrees and Azimuthal Orthographic<br />

9 = Degrees and Modified Rectangular<br />

Orthotomic (Polyconic)<br />

10= Degrees and Alber’s Equal Area equivalent<br />

with two standard parallels<br />

11 = Currently not used<br />

12 = Degrees and American Polyconic<br />

13 = Degrees and Oblique Mercator<br />

14 = Degrees and New Zealand Map Grid<br />

15= Degrees and Cassini-Soldner<br />

16 = Degrees and Bipolar Oblique Conic<br />

Conformal<br />

17 = Degrees and Van Der Grinten I<br />

5000.0.0 File Utilities: Internal Routines – S5DAFU 179


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Argument<br />

Name<br />

ISPCOD * I Reference spheroid:<br />

1 = User defined<br />

2 = Everest 1830<br />

3 = Malayan Everest 1830<br />

4 = Bessel 1841<br />

5 = Airy 1858<br />

6 = Clarke 1858<br />

7 = Clarke 1866<br />

8 = Clarke 1880<br />

9 = Hayford 1909<br />

10 = Krassovsky 1940<br />

11 = Hough 1956<br />

12 = Fischer 1960 (Mercury)<br />

13 = Kaula 1961<br />

14 = IUGG 1967 (Australian National 1967/<br />

South American 1969)<br />

15 = Fischer 1968 (Mercator modified)<br />

16 = WGS-72 1972<br />

17 = IUGG 1975<br />

18 = Helmert<br />

19 = Ghana National<br />

20 = WGS-84 (GRS-80)<br />

IUNCOD<br />

*<br />

IUTMCD<br />

*<br />

Data<br />

Type<br />

Description<br />

and Default<br />

I Units for projected coordinates:<br />

1 = User defined<br />

2 = Meters<br />

3 = Feet<br />

4 = Yards<br />

5 = Inches<br />

6 = Kilometers<br />

7 = Nautical miles<br />

8 = Statute miles<br />

9 = U S Survey feet<br />

I UTM zone number. (See “Appendix G. Mapping<br />

and Cartographic Projections” in the Z-<strong>MAP</strong> <strong>Plus</strong><br />

Reference Manual.)<br />

IHEM * I Which hemisphere:<br />

0 = Cannot be determined<br />

1 = Northern<br />

2 = Southern<br />

IFDTYP I Array (of length 100) containing the field type<br />

codes.<br />

IFDINX I Array (of length 100) containing the index of the<br />

first word for each field.<br />

180 File Utilities: Internal Routines – S5DAFU 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Argument<br />

Name<br />

IFDWRD I Array (of length 100) containing the number of<br />

words for each field.<br />

IFDSRT I Array (of length 100) containing the secondary sort<br />

index for each field.<br />

ROTANG R Rotation angle for the file.<br />

SEPMRK R Separator or marker value for contour, seismic or<br />

cross-section files.<br />

CTRINT R Contour equal interval value. Zero if the contour<br />

intervals are unequal.<br />

BOTPAR<br />

*<br />

TOPPAR<br />

*<br />

REFLAT<br />

*<br />

R Standard parallel closest to the equator (least), in<br />

degrees.<br />

R Standard parallel closest to pole (greatest), in<br />

degrees.<br />

R Reference latitude.<br />

SFLAT * R Scale factor for the reference latitude.<br />

REFLON<br />

*<br />

R Reference longitude.<br />

SFLON * R Scale factor for the reference longitude.<br />

FNORTH<br />

*<br />

R False northing.<br />

FEAST * R False easting.<br />

UNTFAC<br />

*<br />

Data<br />

Type<br />

Description<br />

and Default<br />

R Projection coordinates units factor.<br />

AXISA * R Semimajor axis, if spheroid is user-defined<br />

(ISPCOD = 1).<br />

AXISB * R Semiminor axis, if spheroid is user-defined<br />

(ISPCOD = 1).<br />

FDZNON R Array (of length 100) containing the null (ZNON)<br />

values for the fields.<br />

AZMTH * R Azimuth of central line at skew origin.<br />

SCALE * R Scale factor at origin.<br />

5000.0.0 File Utilities: Internal Routines – S5DAFU 181


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

XMIN D Minimum x coordinate for the file.<br />

XMAX D Maximum x coordinate for the file.<br />

YMIN D Minimum y coordinate for the file.<br />

YMAX D Maximum y coordinate for the file.<br />

ISTAT I Status flag:<br />

0 = Operation was successful.<br />

1 = Error, invalid master file number or master<br />

file is read-only.<br />

2 = Error, duplicate files. Specify master file<br />

number.<br />

3 = Error, cannot find the file.<br />

4 = Error, 5 files already in use.<br />

5 = Error, this is a grid file not a data file.<br />

182 File Utilities: Internal Routines – S5DAFU 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Checklist for Projection Arguments vs. Projection Type<br />

Arguments<br />

Name Description<br />

Alber’s Equal Area<br />

American Polyconic<br />

Azimuthal Gnomonic<br />

Azimuthal Orthographic<br />

Azimuthal Stereographic<br />

Bipolar Oblique Conic Conformal<br />

Projection Type<br />

Cassini-Soldner<br />

Double Parallel Lambert<br />

General Transverse Mercator<br />

5000.0.0 File Utilities: Internal Routines – S5DAFU 183<br />

Modified Polyconic<br />

New Zealand Map Grid<br />

Oblique Transverse Mercator<br />

AXISA Semimajor Radius A if ISPCOD = 1* O N O O O N O O O O N O O O O O<br />

AXISB Semiminor Radius B if ISPCOD = 1* O N O O O N O O O O N O O O O O<br />

AZMTH Azimuth of center line at skew origin N N N N N N N N N N N Y N N N N<br />

BOTPAR Least Standard Parallel Y N N N N N N Y N N N N Y 1 N N N<br />

FEAST False Easting O O O O O O N O O O O O O O N O<br />

FNORTH False Northing O O O O O O O O O O N O O O O O<br />

IHEM Hemisphere N N N N N N N N N N N N N N O N<br />

IPJCOD Projection Code Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y<br />

ISPCOD Spheroid Code Y Y Y Y N N Y Y Y Y N Y Y Y Y Y<br />

IUNCOD Units Code Y Y Y Y Y Y Y Y Y Y N Y Y Y N Y<br />

IUTMCD UTM Zone N N N N N N N N N N N N N N O 4 N<br />

IRADTY Radius Calculation Method N N N N N N N N N N N N N N N Y<br />

REFLAT Reference Latitude Y 1 Y Y Y Y N Y Y Y Y 1 N Y Y N N N<br />

REFLON Reference Longitude Y 2 Y Y Y Y N Y Y Y Y 2 N Y Y Y O 3 Y<br />

SCALE Scale factor at origin N N N N N N N N N N N Y N N N N<br />

SFLAT Latitude Scale Factor N N N N N N N N N Y N N N N N N<br />

SFLON Longitude Scale Factor N N N N N N N N Y Y 2 N N N N N N<br />

TOPPAR Greatest Standard Parallel Y N N N N N N Y N N N N N N N N<br />

UNTFAC Unit Factor if IUNCOD = 1* O O O O O O O O O O N O O O N O<br />

Key:<br />

Y = argument required<br />

N = argument not required<br />

O = argument optional. If not<br />

specified, default value is used.<br />

1<br />

Also serves as a single standard parallel<br />

2<br />

Polyconic projection also has a central meridian with associated scale factor<br />

3 Hemisphere defines false northing for UTM<br />

4 One or the other is required<br />

* User defined<br />

Single Parallel Lambert<br />

Standard Mercator<br />

Universal Transverse Mercator<br />

Van Der Grinten I


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

File Management Routines<br />

SIDFFD<br />

Function Set default field descriptors<br />

This subroutine sets defaults for a field descriptor or allows the<br />

application program to override those defaults of interest. This<br />

subroutine should be used in conjunction with writing a field<br />

descriptor.<br />

Environment The ZPI/O and ZIMS environments must be initialized and a file<br />

opened before you call this routine.<br />

Format CALL SIDFFD (<br />

1 NAMFLD , IFDFMT , IFDTYP , IFDWID , IFDDEC ,<br />

2 INXFLD , IFDWDS , IFDSRT , ZNON , ZALMIN ,<br />

3 ZALMAX , VECTOR , ISTAT )<br />

Input Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

NAMFLD C*20 Field name. Blanked if the default name based<br />

on the field type (IFDTYP) is to be used.<br />

IFDFMT C*1 Output format type.<br />

Default = for CHARACTER, A or<br />

for REAL, G<br />

Range Options: A, I, F, E, G<br />

IFDTYP I Field type. (See “Appendix B. File and Field<br />

Codes” in the Z-<strong>MAP</strong> <strong>Plus</strong> Reference Manual.)<br />

IFDWID I Field width. It is recalculated if the number of<br />

decimals and the field width are not compatible.<br />

Default = for CHARACTER, “HOL” *<br />

IFDWDS<br />

or for REAL, 15<br />

IFDDEC I Number of decimals for the field.<br />

Default = for INTEGER, 0<br />

INXFLD I Index of first word for field in each record.<br />

IFDWDS I Number of words for field.<br />

Default = 1<br />

IFDSRT I Sort field index.<br />

Default = 0<br />

184 File Utilities: Internal Routines – SIDFFD 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Argument<br />

Name<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

ZNON R Null data value.<br />

ZALMIN R Minimum allowed z value.<br />

ZALMAX R Maximum allowed z value. Reset to 1E30 if the<br />

minimum and maximum allowed values are the<br />

same.<br />

Data<br />

Type<br />

Description<br />

and Default<br />

Description<br />

and Default<br />

VECTOR R Array (of length 20) containing the following<br />

information:<br />

1–5 = Field name<br />

6 = Field type<br />

7 = Field output format type<br />

8 = Field width<br />

9 = Number of decimals for the field<br />

10 = Index of the field’s first word<br />

11 = Number of words for the field<br />

12 = Currently not used<br />

13 = Null value<br />

14 = Minimum allowed z value<br />

15 = Maximum allowed z value<br />

16–19 = Currently not used<br />

20 = Sort field index<br />

5000.0.0 File Utilities: Internal Routines – SIDFFD 185


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

ISTAT I Status flag:<br />

–9 = Warning, maximum value allowed was<br />

less than or equal to minimum value<br />

allowed, it was reset to 1E30.<br />

–8 = Warning, the number of words was reset<br />

to 1.<br />

–7 = Warning, the width of the field is not large<br />

enough for the format type, it has been<br />

adjusted.<br />

–6 = Warning, the width of the field was zero<br />

and has been reset to 15.<br />

–5 = Warning, output type was integer, number<br />

of decimals was not zero, it has been reset<br />

to 0.<br />

–4 = Warning, not a valid format type, has been<br />

reset to G.<br />

–3 = Warning, format type was blank, has been<br />

reset to G.<br />

–2 = Warning, the number of words was zero,<br />

has been reset to one.<br />

–1 = Warning, field type does not have a<br />

known field name. The field name has<br />

been set to DATA FIELD.<br />

0 = Operation was successful.<br />

1 = Error, index of first word for field was<br />

zero.<br />

186 File Utilities: Internal Routines – SIDFFD 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

File Management Routines<br />

SIDNFL<br />

Function Retrieve information about a member file from the runtime directory<br />

This subroutine takes the index number in the runtime directory for the<br />

file and returns the name, type, and master file number for that file.<br />

Environment The ZPI/O and ZIMS environments must be initialized before you call<br />

this routine.<br />

Format CALL SIDNFL (<br />

1 NFILE , INXFIL , NAMZIM , FILTYP , MFDNZM ,<br />

2 NUMFIL , ISTAT )<br />

Input Arguments<br />

Argument<br />

Name<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

NFILE I Number of files to be obtained.<br />

Range Options: >0<br />

INXFIL I Array (of length NFILE) containing the indices<br />

of the files for which information is to be<br />

obtained. Set INXFIL(1) = –NFILE or a large<br />

negative number to obtain all files.<br />

Data<br />

Type<br />

Description<br />

and Default<br />

NAMZIM C*24 Array (of length NFILE) containing the name of<br />

each member file.<br />

FILTYP C*4 Array (of length NFILE) containing the file type<br />

for each member file, e.g., grid, data, etc.<br />

MFDNZM I Array (of length NFILE) containing the number<br />

of the master file for each member file.<br />

NUMFIL I Number of files for which information was<br />

actually obtained.<br />

ISTAT I Status flag:<br />

–1 = Warning, file has been deleted<br />

0 = Operation was successful<br />

1 = Error, invalid index<br />

2 = Error, end-of-file on runtime directory<br />

reached<br />

3 = Error, index is out of range<br />

5000.0.0 File Utilities: Internal Routines – SIDNFL 187


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

File Management Routines<br />

SIEZIM<br />

Function Close master files<br />

This subroutine closes the Z-<strong>MAP</strong> Information Management System<br />

master files. On Unix systems (which use lock files to limit access to<br />

master files) this routine removes the lock files. You can call this<br />

routine on other systems that do not use lock files, but it is<br />

unnecessary.<br />

Call this routine during exit processing for any programs that use<br />

master files. Call SIEZIM in such a way that normal and error exits call<br />

SIEZIM.<br />

Environment The ZPI/O and ZIMS environments must be initialized before you call<br />

this routine.<br />

Format CALL SIEZIM<br />

Input Arguments None<br />

Output Arguments None<br />

188 File Utilities: Internal Routines – SIEZIM 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

File Management Routines<br />

SIFCLO<br />

Function Close a member file<br />

This subroutine closes a dataset in a master file.<br />

Only five (5) datasets may be open at a time. Once that limit is reached,<br />

you must close a member file in order to open another one.<br />

Environment The ZPI/O and ZIMS environments must be initialized and a file<br />

opened before you call this routine.<br />

Format CALL SIFCLO ( LOGFIL , ISTAT )<br />

Input Arguments<br />

Argument<br />

Name<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

LOGFIL I Logical file code for the member file to be<br />

closed.<br />

Range Options: 1–5<br />

Data<br />

Type<br />

Description<br />

and Default<br />

ISTAT I Status flag:<br />

0 = Operation was successful<br />

1 = Error, problem closing file<br />

5000.0.0 File Utilities: Internal Routines – SIFCLO 189


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

File Management Routines<br />

SIFLDR<br />

Function Read a field descriptor<br />

This subroutine reads field descriptor values from a member file. The<br />

arguments IFMT, IFWID, and IDEC are used to synthesize<br />

FORTRAN format statements when reports are printed.<br />

Environment The ZPI/O and ZIMS environments must be initialized and the<br />

member file opened before you call this routine.<br />

Format CALL SIFLDR (<br />

1 LOGFIL , NUMFLD , FLDNAM , IFMT , ITYPE ,<br />

2 NWORDS , INDEX , IFWID , IDEC , NXSORT ,<br />

3 ZNON , FMIN , FMAX , ISTAT )<br />

Input Arguments<br />

Argument<br />

Name<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

LOGFIL I Logical file code to access the file.<br />

Range Options: 1–5<br />

NUMFLD I Number of field descriptor to be read.<br />

Data<br />

Type<br />

Description<br />

and Default<br />

FLDNAM C*20 Field name.<br />

IFMT C*1 Output conversion type.<br />

Range Options: A, I, F, E, or G<br />

ITYPE I Type of field. (See “Appendix B. File and Field<br />

Codes” in the Z-<strong>MAP</strong> <strong>Plus</strong> Reference Manual.)<br />

NWORDS I Number of words in field.<br />

INDEX I Position (word number) in the record where the<br />

data for this field starts.<br />

IFWID I Field width (characters) for output.<br />

IDEC I Number of significant digits right of the decimal<br />

for output.<br />

190 File Utilities: Internal Routines – SIFLDR 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

NXSORT I Index of next sort field (linked list):<br />

0 = None<br />

ZNON R Null data value.<br />

FMIN R Minimum allowed field value. Can be zero.<br />

FMAX R Maximum allowed field value. Can be zero.<br />

ISTAT I Status flag:<br />

0 = Operation was successful<br />

1 = Error, reading direct access file<br />

2 = Error, field number does not exist<br />

5000.0.0 File Utilities: Internal Routines – SIFLDR 191


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

File Management Routines<br />

SIFLDW<br />

Function Write a field descriptor<br />

This subroutine writes a field descriptor for a new file. The arguments<br />

IFMT, IFWID, and IDEC are used to synthesize FORTRAN Format<br />

statements when reports are printed. IFMT indicates type of data in the<br />

field. For alphanumeric fields, IFWID is the length of the string<br />

(number of characters) and IDEC is ignored.<br />

If the file has more than 24 fields, the field descriptors should be<br />

written before any data is written. You can use dummy information to<br />

write field descriptors and update the descriptors after you write the<br />

data.<br />

Environment The ZPI/O and ZIMS environments must be initialized and the<br />

member file opened before you call this routine.<br />

Format CALL SIFLDW (<br />

1 FLDNAM , IFMT , LOGFIL , NUMFLD , ITYPE ,<br />

2 NWORDS , INDEX , IFWID , IDEC , NXSORT ,<br />

3 ZNON , FMIN , FMAX , ISTAT )<br />

Input Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

FLDNAM C*20 Field name.<br />

IFMT C*1 Output conversion type.<br />

Range Options: A,I,F,E or G<br />

LOGFIL I Logical file code to access the file.<br />

Range Options: 1–5<br />

NUMFLD I Number of the field descriptor to be written.<br />

ITYPE I Type of field. (See “Appendix B. File and Field<br />

Codes” in the Z-<strong>MAP</strong> <strong>Plus</strong> Reference Manual.)<br />

NWORDS I Number of words in field.<br />

INDEX I Position (word number) in the record where data<br />

for this field starts.<br />

IFWID I Field width (characters) for output.<br />

IDEC I Number of significant digits to the right of<br />

decimal for output.<br />

192 File Utilities: Internal Routines – SIFLDW 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Argument<br />

Name<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

NXSORT I Index of next sort field (linked list):<br />

0 = None<br />

ZNON R Null data value.<br />

FMIN R Minimum allowed field value.<br />

FMAX R Maximum allowed field value.<br />

Data<br />

Type<br />

Description<br />

and Default<br />

Description<br />

and Default<br />

ISTAT I Status flag:<br />

0 = Operation was successful<br />

1 = Error, writing direct access file<br />

5000.0.0 File Utilities: Internal Routines – SIFLDW 193


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

File Management Routines<br />

SIFRED<br />

Function Read a record from a member file<br />

This subroutine reads a record from a file. The record length is<br />

determined from the parameter record for the file. For data files, it is<br />

NWORDS when calling the read data parameter information routine<br />

SIPRRD. For grid files, data is stored in column order so that the<br />

record length is specified in NROWS when calling the read grid<br />

parameter information routine SIPRRG.<br />

Note IREC has a special capability. If a number of sequential reads are to be<br />

performed after positioning the file, perform the following steps:<br />

1. Set IREC equal to the first record to be read, then call this routine.<br />

2. Set IREC = 0 for the remaining number of sequential reads.<br />

Environment The ZPI/O and ZIMS environments must be initialized and a file<br />

opened before you call this routine.<br />

Format CALL SIFRED (<br />

1 LOGFIL , IREC , NWRDS , IWORD , DATA ,<br />

2 ISTAT )<br />

Input Arguments<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

LOGFIL I Logical file code to access the file.<br />

Range Options: 1–5<br />

IREC I Record number to read. If IREC = 0, the next<br />

sequential record is read. See the note above.<br />

NWRDS I Number of words to read, usually the record<br />

length.<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

IWORD I Number of sequential words left to read.<br />

DATA R Array (of length NWRDS) containing the data<br />

(the data record read from the file).<br />

ISTAT I Status flag:<br />

0 = Operation was successful<br />

1 = Error, positioning file<br />

2 = Error, file error<br />

3 = Error, end of file detected while<br />

positioning file<br />

4 = Error, number of words to read is zero<br />

194 File Utilities: Internal Routines – SIFRED 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

File Management Routines<br />

SIFWRT<br />

Function Write a record to a member file<br />

This subroutine writes a record to a file. Record length is determined<br />

from the parameter record for the file. For data files, it is NWORDS<br />

when calling the write data parameter information routine SIPRWD.<br />

For grid files, data is stored in column order so that the record length is<br />

specified in NROWS when calling the write grid parameter<br />

information routine SIPRWG.<br />

Note IREC has a special capability. If a number of sequential writes are to be<br />

performed after positioning the file, follow these steps:<br />

1. Set IREC equal to the first record to be written, call this routine.<br />

2. Set IREC = 0 for the remaining number of sequential writes.<br />

Environment If this routine is used for random access I/O, the record to be written<br />

must already exist on the file. This routine cannot extend a file except<br />

through sequential writes.<br />

Format CALL SIFWRT (<br />

1 LOGFIL , IREC , NWRDS , DATA , IWORD ,<br />

2 ISTAT )<br />

Input Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

LOGFIL I Logical file code to access file.<br />

Range Options: 1–5<br />

IREC I Record number to write. If IREC = 0, the next<br />

sequential record is written. See the note above.<br />

NWRDS I Number of words to write, usually the record<br />

length.<br />

DATA R Array (of length NWRDS) containing the data to<br />

be written.<br />

5000.0.0 File Utilities: Internal Routines – SIFWRT 195


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

IWORD I Total number of words written sequentially, if<br />

IREC = 0.<br />

ISTAT I Status flag:<br />

0 = Operation was successful<br />

1 = Error, positioning file<br />

2 = Error, writing to file<br />

3 = Error, number of words to write is zero<br />

196 File Utilities: Internal Routines – SIFWRT 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

File Management Routines<br />

SIIZIM<br />

Function Initialize the Z-<strong>MAP</strong> Information Management System (ZIMS) and<br />

attach master files<br />

This subroutine initializes up to four (4) master files for the file<br />

management system and must be called before any data files can be<br />

accessed. Each master file may contain any number of member files<br />

which may contain control point data, grid models, fault lines, digitized<br />

contours, well logs, etc.<br />

To specify the number of master files assigned, do either of the<br />

following:<br />

Set MFDNUM to the number of master files to be attached (not<br />

including the scratch file).<br />

Set MFDNUM to 4 and blank-fill the unused portion of the<br />

NAMMFD array.<br />

Environment The ZPI/O environment must be initialized before you call this routine.<br />

This subroutine should be called only once in any one application.<br />

Format CALL SIIZIM (<br />

1 NAMMFD , MFDNUM , LUNDRC , ISTAT )<br />

Input Arguments<br />

Argument<br />

Name<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

NAMMFD C*80 Array (of length 4) containing the name(s) of<br />

master file(s) to be opened.<br />

Note: These names are used only on systems<br />

with dynamic file allocation, but it is<br />

good for documentation.<br />

MFDNUM I Number of master file(s) to be attached.<br />

Range Options: 0–4<br />

LUNDRC I Runtime directory physical unit number. This<br />

variable is currently reset to 20.<br />

Note: This variable is reserved for future use.<br />

Data<br />

Type<br />

Description<br />

and Default<br />

ISTAT I Status flag:<br />

–1 = Warning, runtime directory is reset to 20<br />

0 = Operation was successful<br />

1–4 = Sequential number of the master file that<br />

could not be opened<br />

5 = Error, opening scratch file<br />

6 = Error, opening runtime directory<br />

5000.0.0 File Utilities: Internal Routines – SIIZIM 197


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

File Management Routines<br />

SIMFAT<br />

Function Attach a master file<br />

This subroutine attaches master files and reloads the runtime directory.<br />

If at the beginning of the application there are no master files, then for<br />

initialization purposes call the initialization routine with the number of<br />

master files being zero and the names of the master files blanked.<br />

Note The following example shows how the current master file maintenance<br />

structure stores the location (logical units) of the master files:<br />

Environment The ZPI/O and ZIMS environments must be initialized before you call<br />

this routine. This capability is not available for nondynamic allocating<br />

systems.<br />

Format CALL SIMFAT ( NAMMFD , ISTAT )<br />

Input Arguments<br />

Routine SIIZIM SIMFAT SIMFDT SIMFAT SIMFDT<br />

Process<br />

Initialize Attach Detach Attach Detach<br />

ZIMS with Third Second Fourth All<br />

2 MFDs MFD MFD MFD MFDs<br />

Result 1 = MFD 1 1 = MFD 1 1 = MFD 1 1 = MFD 1 1 = Scratch<br />

2 = MFD 2 2 = MFD 2 2 = 2 = MFD 4 2 =<br />

3 = Scratch 3 = Scratch 3 = Scratch 3 = Scratch 3 =<br />

4 = 4 = MFD 3 4 = MFD 3 4 = MFD 3 4 =<br />

5 = 5 = 5 = 5 = 5 =<br />

Argument<br />

Name<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

NAMMFD C*80 Disk name of the master file to be attached.<br />

Data<br />

Type<br />

Description<br />

and Default<br />

ISTAT I Status flag:<br />

–1 = Warning, this option is unavailable for<br />

nondynamic systems<br />

0 = Operation was successful<br />

1 = Error, master filename is blank<br />

2 = Error, 5 master files attached already<br />

3 = Error, master file not found<br />

198 File Utilities: Internal Routines – SIMFAT 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

File Management Routines<br />

SIMFCM<br />

Function Compress a master file<br />

This subroutine copies the files from one master file into another<br />

master file, removing files that were marked for deletion.<br />

Environment The ZPI/O and ZIMS environments must be initialized before you call<br />

this routine.<br />

Format CALL SICPMF ( LUNCFM , LUNCTO , NUMCPY , ISTAT )<br />

Input Arguments<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

LUNCFM I Logical unit of master file to copy files from.<br />

Range Options: 1–5<br />

LUNCTO I Logical unit of master file to copy files into.<br />

Range Options: 1–5<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

NUMCPY I Number of member files copied.<br />

ISTAT I Status flag:<br />

0 = Operation was successful<br />

1 = Error, problem compressing master file<br />

5000.0.0 File Utilities: Internal Routines – SIMFCM 199


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

File Management Routines<br />

SIMFCR<br />

Function Create a new master file<br />

This subroutine creates a new empty master file.<br />

Environment The ZPI/O environment must be initialized before you call this routine.<br />

Format CALL SIMFCR (<br />

1 NAMMFD , INTMFD , MFDLUN , ISTAT )<br />

Input Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

NAMMFD C*80 Disk name of the new master file, fully<br />

qualified.<br />

This name is not used on systems that do not<br />

have dynamic file allocation, but it is good for<br />

documentation.<br />

INTMFD C*24 Internal name of master file, which appears<br />

when files are listed. If INTMFD is blank, the<br />

first 24 characters of NAMMFD are used.<br />

MFDLUN I Logical unit on which to create the master file.<br />

Note: If other master files have been attached<br />

by either SIIZIM or SIMFAT, some of<br />

the logical units have been used up. For<br />

example:<br />

If ZIMS was initialized with<br />

NUMMFD = 0 (See SIIZIM on<br />

page 197.) The first master file<br />

attached is the scratch file. It is<br />

attached to logical unit 21.<br />

If a second master file is then attached.<br />

(See SIMFAT on page 198.) This<br />

second master file is assigned to<br />

logical unit 22.<br />

If you then create a master file<br />

(SIMFCR), you may do so on logical<br />

unit 23, 24, or 25, but not on 21 or 22,<br />

since they are already allocated.<br />

Range Options: 21–25<br />

200 File Utilities: Internal Routines – SIMFCR 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

ISTAT I Status flag:<br />

0 = Operation was successful<br />

1 = Error, master filename is blank<br />

2 = Error, master file FORTRAN unit is zero<br />

3 = Error, opening FORTRAN file<br />

4 = Error, writing to file<br />

5000.0.0 File Utilities: Internal Routines – SIMFCR 201


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

File Management Routines<br />

SIMFDT<br />

Function Detach one or all master files<br />

This subroutine detaches master files and reloads the runtime directory.<br />

If at the beginning of the application there are no master files, then for<br />

initialization purposes call the initialization routine with the number of<br />

master files being zero and the names of the master files blanked.<br />

Note The following example shows how the current master file maintenance<br />

structure stores the location (logical units) of the master files:<br />

Environment The ZPI/O and ZIMS environments must be initialized before you call<br />

this routine.<br />

This capability is not available for nondynamic allocating systems.<br />

Format CALL SIMFDT ( NAMMFD , ISTAT )<br />

Input Arguments<br />

Routine SIIZIM SIMFAT SIMFDT SIMFAT SIMFDT<br />

Process<br />

Initialize Attach Detach Attach Detach<br />

ZIMS with Third Second Fourth All<br />

2 MFDs MFD MFD MFD MFDs<br />

Result<br />

1 = MFD 1 1 = MFD 1 1 = MFD 1 1 = MFD 1 1 = Scratch<br />

2 = MFD 2 2 = MFD 2 2 = 2 = MFD 4 2 =<br />

3 = Scratch 3 = Scratch 3 = Scratch 3 = Scratch 3 =<br />

4 = 4 = MFD 3 4 = MFD 3 4 = MFD 3 4 =<br />

5 = 5 = 5 = 5 = 5 =<br />

Argument<br />

Name<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

NAMMFD C*80 Disk name of master file to detach. Blanked if all<br />

master files, including the scratch file, are to be<br />

detached. A new blank scratch file is attached.<br />

The disk name for the scratch file is Scratch<br />

File.<br />

Data<br />

Type<br />

Description<br />

and Default<br />

ISTAT I Status flag:<br />

–1 = Warning, this option is unavailable for<br />

nondynamic systems<br />

0 = Operation was successful<br />

1 = Error, problem reinitializing ZIMS<br />

2 = Error, no match for the disk master file<br />

202 File Utilities: Internal Routines – SIMFDT 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

File Management Routines<br />

SIMFLS<br />

Function List attached master files<br />

This subroutine reads the attached master files and provides a listing of<br />

the disk names, the internal names, the number of records, and the<br />

number of records used.<br />

Environment The ZPI/O and ZIMS environments must be initialized before you call<br />

this routine.<br />

Format CALL SIMFLS (<br />

1 NAMMFD , NAMINT , MFDNUM , NUMREC, NUMUSE ,<br />

2 ISTAT )<br />

Input Arguments None<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

NAMMFD C*80 Array (of length 5) containing the disk names of<br />

the attached master files.<br />

NAMINT C*24 Array (of length 5) containing the internal names<br />

of the attached master files.<br />

MFDNUM I Number of master files attached.<br />

NUMREC I Array (of length 5) containing the number of<br />

records on the master file.<br />

NUMUSE I Array (of length 5) containing the number of<br />

records used.<br />

ISTAT I Status flag:<br />

–1 = Warning, no master files attached<br />

0 = Operation was successful<br />

5000.0.0 File Utilities: Internal Routines – SIMFLS 203


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

File Management Routines<br />

SIMFRN<br />

Function Rename the internal name of a master file<br />

This subroutine replaces the internal name of a master file with a new<br />

name.<br />

You can use SIMFLS to list internal names.<br />

Environment The ZPI/O and ZIMS environments must be initialized and the<br />

appropriate master file attached before you call this routine.<br />

Format CALL SIMFRN ( NAMMFD , NAMINT , ISTAT )<br />

Input Arguments<br />

Argument<br />

Name<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

NAMMFD C*80 Disk name of the master file.<br />

NAMINT C*24 New internal name of the master file.<br />

Data<br />

Type<br />

Description<br />

and Default<br />

ISTAT I Status flag:<br />

0 = Operation was successful<br />

1 = Error, the disk or internal master file<br />

name is blank<br />

2 = Error, the disk master file cannot be found<br />

3 = Error, problem reading/writing internal<br />

master file name<br />

204 File Utilities: Internal Routines – SIMFRN 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

File Management Routines<br />

SINOPN<br />

Function Open a new member file<br />

If there are no duplicate files, NAMRET is identical to NAMZIM.<br />

If there are duplicate files, characters 21–24 of NAMRET contain the<br />

version number.<br />

Environment The ZPI/O and ZIMS environments must be initialized before you call<br />

this routine.<br />

Format CALL SINOPN (<br />

1 NAMZIM , INWTYP , MFDNZM , NAMRET , LOGFIL ,<br />

2 ISTAT )<br />

Input Arguments<br />

Argument<br />

Name<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

NAMZIM C*24 Name of new member file. See the note above.<br />

INWTYP C*4 Type of new member file. (See “Appendix B.<br />

File and Field Codes” in the Z-<strong>MAP</strong> <strong>Plus</strong><br />

Reference Manual.)<br />

MFDNZM I Number of the master file to contain the new<br />

member file. A zero or the appropriate master<br />

file number may be used to point to the scratch<br />

master file.<br />

Range Options: 0–5<br />

Data<br />

Type<br />

Description<br />

and Default<br />

NAMRET C*24 Name of new member file, with version number<br />

added if there were duplicate files.<br />

LOGFIL I Logical file code for the new member file.<br />

Range Options: 1–5<br />

ISTAT I Status flag:<br />

–1 = Warning, duplicate files. A version<br />

number has been added.<br />

0 = Operation was successful.<br />

1 = Error, invalid master file number or<br />

master file is read-only.<br />

2 = Error, invalid version number.<br />

3 = Error, 5 files already in use.<br />

5000.0.0 File Utilities: Internal Routines – SINOPN 205


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

File Management Routines<br />

SIOOPN<br />

Function Open an old member file<br />

Environment The ZPI/O and ZIMS environments must be initialized before you call<br />

this routine.<br />

Format CALL SIOOPN (<br />

1 NAMZIM , MFDNZM , IHISZM , IOLTYP , LOGFIL ,<br />

2 ISTAT )<br />

Input Arguments<br />

Argument<br />

Name<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

NAMZIM C*24 Name of old member file.<br />

MFDNZM I Number of the master file containing the<br />

member file. A zero or the appropriate master<br />

file number can be used to search for the file.<br />

Range Options: 0–5<br />

IHISZM I History display for input file:<br />

0 = Do not display history information<br />

1 = Display history information<br />

Data<br />

Type<br />

Description<br />

and Default<br />

IOLTYP C*4 Type of old member file. (See “Appendix B. File<br />

and Field Codes” in the Z-<strong>MAP</strong> <strong>Plus</strong> Reference<br />

Manual.)<br />

LOGFIL I Logical file code for the old member file.<br />

Range Options: 1–5<br />

ISTAT I Status flag:<br />

0 = Operation was successful<br />

1 = Error, invalid master file number or<br />

master file is read-only<br />

2 = Error, duplicate files<br />

3 = Error, cannot find the file<br />

4 = Error, 5 files already in use<br />

206 File Utilities: Internal Routines – SIOOPN 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

File Management Routines<br />

SIPRRC<br />

Function Read a general data or contour parameter record<br />

This subroutine retrieves the parameter record for the general data or<br />

contour file connected to LOGFIL.<br />

Environment The ZPI/O and ZIMS environments must be initialized and the<br />

member file must be opened before you call this routine.<br />

Format CALL SIPRRC (<br />

1 LOGFIL , NFLDS , NWORDS , NRECS , ICNTSP ,<br />

2 ISORTF , XMIN , XMAX , YMIN , YMAX ,<br />

3 ZNON , VALMRK , CNTINC , ROTANG , ISTAT )<br />

Input Arguments<br />

Argument<br />

Name<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

LOGFIL I Logical file code to access file.<br />

Range Options: 1–5<br />

Data<br />

Type<br />

Description<br />

and Default<br />

NFLDS I Number of data fields on the file.<br />

NWORDS I Number of words on each data record.<br />

NRECS I Number of data records in the file.<br />

ICNTSP I Type of contour interval spacing. Needed only if<br />

file is a contour file:<br />

0 = Not needed<br />

1 = Equally spaced contour intervals<br />

2 = Unequally spaced contour intervals<br />

3 = Unknown spacing of contour intervals<br />

ISORTF I Index of primary sort field:<br />

0 = None<br />

XMIN D Minimum x coordinate for this file.<br />

XMAX D Maximum x coordinate for this file.<br />

YMIN D Minimum y coordinate for this file.<br />

YMAX D Maximum y coordinate for this file.<br />

5000.0.0 File Utilities: Internal Routines – SIPRRC 207


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

ZNON R Null data value for the file.<br />

VALMRK R Marker value for contour, cross-section or<br />

seismic section files.<br />

CNTINC R Contour increment for equally spaced contour<br />

intervals (ICNTSP = 1).<br />

ROTANG R Angle if the file has been rotated.<br />

ISTAT I Status flag:<br />

0 = Operation was successful<br />

1 = Error, reading direct access file<br />

208 File Utilities: Internal Routines – SIPRRC 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

File Management Routines<br />

SIPRRD<br />

Function Read a data parameter record<br />

This subroutine retrieves the parameter record for the data file<br />

connected to LOGFIL.<br />

Environment The ZPI/O and ZIMS environments must be initialized and the<br />

member file must be opened before you call this routine.<br />

Format CALL SIPRRD (<br />

1 LOGFIL , NFLDS , NWORDS , NRECS , ISORTF ,<br />

2 XMIN , XMAX , YMIN , YMAX , ZNON ,<br />

3 ISTAT )<br />

Input Arguments<br />

Argument<br />

Name<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

LOGFIL I Logical file code to access file.<br />

Range Options: 1–5<br />

Data<br />

Type<br />

Description<br />

and Default<br />

NFLDS I Number of data fields on the file.<br />

NWORDS I Number of words on each data record.<br />

NRECS I Number of data records in the file.<br />

ISORTF I Index of primary sort field:<br />

0 = None<br />

XMIN D Minimum x coordinate for this file.<br />

XMAX D Maximum x coordinate for this file.<br />

YMIN D Minimum y coordinate for this file.<br />

YMAX D Maximum y coordinate for this file.<br />

ZNON R Null data value for the file.<br />

ISTAT I Status flag:<br />

0 = Operation was successful<br />

1 = Error, reading direct access file<br />

5000.0.0 File Utilities: Internal Routines – SIPRRD 209


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

File Management Routines<br />

SIPRRG<br />

Function Read a grid parameter record<br />

This subroutine retrieves the parameter headers for the grid file<br />

referenced by LOGFIL.<br />

Environment The ZPI/O and ZIMS environments must be initialized and the<br />

member file must be opened before you call this routine.<br />

Format CALL SIPRRG (<br />

1 LOGFIL , NROWS , NCOLS , XMIN , XMAX ,<br />

2 YMIN , YMAX , GXINC , GYINC , ZNON ,<br />

3 GMAX , GMIN , ISTAT )<br />

Input Arguments<br />

Argument<br />

Name<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

LOGFIL I Logical file code to access the file.<br />

Range Options: 1–5<br />

Data<br />

Type<br />

Description<br />

and Default<br />

NROWS I Number of grid rows (record length).<br />

NCOLS I Number of grid columns (file length), in records.<br />

XMIN D Minimum x coordinate for this grid.<br />

XMAX D Maximum x coordinate for this grid.<br />

YMIN D Minimum y coordinate for this grid.<br />

YMAX D Maximum y coordinate for this grid.<br />

GXINC R Grid increment in the x direction.<br />

GYINC R Grid increment in the y direction.<br />

ZNON R Null data value for file.<br />

GMAX R Maximum grid z value.<br />

GMIN R Minimum grid z value.<br />

ISTAT I Status flag:<br />

0 = Operation was successful<br />

210 File Utilities: Internal Routines – SIPRRG 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

File Management Routines<br />

SIPRWC<br />

Function Write a general data or contour parameter record<br />

This subroutine writes information to the parameter record for the<br />

general data or contour file referenced by LOGFIL. This record should<br />

be written after the last record of the data has been written, to give the<br />

program the opportunity to calculate correct values for NRECS,<br />

XMIN, XMAX, YMIN, and YMAX.<br />

Environment The ZPI/O and ZIMS environments must be initialized and the<br />

member file must be opened before you call this routine.<br />

Format CALL SIPRWD (<br />

1 LOGFIL , NFLDS , NWORDS , NRECS , ICNTSP ,<br />

2 ISORTF , XMIN , XMAX , YMIN , YMAX ,<br />

3 ZNON , VALMRK , CNTINC , ROTANG , ISTAT )<br />

Input Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

LOGFIL I Logical file code to access file.<br />

Range Options: 1- 5<br />

NFLDS I Number of data fields in the file.<br />

NWORDS I Number of words on each data record.<br />

NRECS I Number of data records in the file.<br />

ICNTSP I Type of contour interval spacing. Needed only if<br />

file is a contour file.<br />

0 = Not needed<br />

1 = Equally spaced contour intervals<br />

2 = Unequally spaced contour intervals<br />

3 = Unknown spacing of contour intervals<br />

ISORTF I Index of primary sort field:<br />

0 = None<br />

XMIN D Minimum x coordinate for this file.<br />

XMAX D Maximum x coordinate for this file.<br />

YMIN D Minimum y coordinate for this file.<br />

5000.0.0 File Utilities: Internal Routines – SIPRWC 211


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Output Arguments<br />

Argument<br />

Name<br />

YMAX D Maximum y coordinate for this file.<br />

ZNON R Null data value for file.<br />

VALMRK R Marker value for contour, cross-section, or<br />

seismic section files.<br />

CNTINC R Contour increment for equally spaced contour<br />

intervals. Needed if ICNTSP = 1.<br />

ROTANG R Angle of the file rotation.<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Data<br />

Type<br />

Description<br />

and Default<br />

Description<br />

and Default<br />

ISTAT I Status flag:<br />

0 = Operation was successful<br />

212 File Utilities: Internal Routines – SIPRWC 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

File Management Routines<br />

SIPRWD<br />

Function Write a data parameter record<br />

This subroutine writes information to the parameter record for the data<br />

file referenced by LOGFIL. This record should be written after the last<br />

record of the data has been written, to give the program the opportunity<br />

to calculate correct values for NRECS, XMIN, XMAX, YMIN, and<br />

YMAX.<br />

Environment The ZPI/O and ZIMS environments must be initialized and the<br />

member file must be opened before you call this routine.<br />

Format CALL SIPRWD (<br />

1 LOGFIL , NFLDS , NWORDS , NRECS , ISORTF ,<br />

2 XMIN , XMAX , YMIN , YMAX , ZNON ,<br />

3 ISTAT )<br />

Input Arguments<br />

Argument<br />

Name<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

LOGFIL I Logical file code to access file.<br />

Range Options: 1- 5<br />

NFLDS I Number of data fields in the file.<br />

NWORDS I Number of words on each data record.<br />

NRECS I Number of data records in the file.<br />

ISORTF I Index of primary sort field:<br />

0 = None<br />

XMIN D Minimum x coordinate for this file.<br />

XMAX D Maximum x coordinate for this file.<br />

YMIN D Minimum y coordinate for this file.<br />

YMAX D Maximum y coordinate for this file.<br />

ZNON R Null data value for file.<br />

Data<br />

Type<br />

Description<br />

and Default<br />

ISTAT I Status flag:<br />

0 = Operation was successful<br />

5000.0.0 File Utilities: Internal Routines – SIPRWD 213


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

File Management Routines<br />

SIPRWG<br />

Function Write a grid parameter record<br />

This subroutine writes information to the parameter record for the grid<br />

file referenced by LOGFIL.<br />

Environment The ZPI/O and ZIMS environments must be initialized and the<br />

member file opened before you call this routine.<br />

Format CALL SIPRWG (<br />

1 LOGFIL , NROWS , NCOLS , XMIN , XMAX ,<br />

2 YMIN , YMAX , GXINC , GYINC , ZNON ,<br />

3 GMAX , GMIN , ISTAT )<br />

Input Arguments<br />

Argument<br />

Name<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

LOGFIL I Logical file code to access file.<br />

Range Options: 1–5<br />

NROWS I Number of grid rows (record length).<br />

NCOLS I Number of grid columns (file length) in records.<br />

XMIN D Minimum x coordinate for this grid.<br />

XMAX D Maximum x coordinate for this grid.<br />

YMIN D Minimum y coordinate for this grid.<br />

YMAX D Maximum y coordinate for this grid.<br />

GXINC R Grid increment in the x direction.<br />

GYINC R Grid increment in the y direction.<br />

ZNON R Null data value for file.<br />

GMAX R Maximum grid z value.<br />

GMIN R Minimum grid z value.<br />

Data<br />

Type<br />

Description<br />

and Default<br />

ISTAT I Status flag:<br />

0 = Operation was successful<br />

214 File Utilities: Internal Routines – SIPRWG 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

File Management Routines<br />

SIRDPO<br />

Function Position a member file for a sequential read<br />

To read additional information from the file, call the sequential read<br />

routine, SIRDSQ (page 217).<br />

Environment The ZPI/O and ZIMS environments must be initialized and the<br />

member file opened before you call this routine.<br />

Format CALL SIRDPO ( LOGFIL , IWORD , ISTAT )<br />

Input Arguments<br />

Argument<br />

Name<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

LOGFIL I Logical file code to access file.<br />

Range Options: 1–5<br />

IWORD I Word number to position file to.<br />

Data<br />

Type<br />

Description<br />

and Default<br />

ISTAT I Status flag:<br />

–1 = Warning, end of file<br />

0 = Operation was successful<br />

1 = Error, invalid member file unit<br />

2 = Error, invalid word position<br />

3 = Error, positioning file<br />

5000.0.0 File Utilities: Internal Routines – SIRDPO 215


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

File Management Routines<br />

SIRDRN<br />

Function Read from a member file at a random location<br />

This subroutine reads the requested number of words from a member<br />

file starting at the position that is input, this is a word position. The<br />

concept of records that are a certain number of words long is kept at<br />

user level and is not intrinsic to the routine. It simply does word<br />

operations.<br />

Environment The ZPI/O and ZIMS environments must be initialized and the<br />

member file opened before you call this routine.<br />

Format CALL SIRDRN (<br />

1 LOGFIL , IWORD , NWORDS , ARRAY , ISTAT )<br />

Input Arguments<br />

Argument<br />

Name<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

LOGFIL I Logical file code to access file.<br />

Range Options: 1–5<br />

IWORD I Word location at which to start reading.<br />

NWORDS I Number of words to be read.<br />

Data<br />

Type<br />

Description<br />

and Default<br />

ARRAY R Array (of length NWORDS) containing data that<br />

was read.<br />

ISTAT I Status flag:<br />

0 = Operation was successful<br />

1 = Error, invalid file unit<br />

2 = Error, invalid word position<br />

3 = Error, number of words to read is zero<br />

4 = Error, reading file<br />

216 File Utilities: Internal Routines – SIRDRN 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

File Management Routines<br />

SIRDSQ<br />

Function Read from a member file sequentially<br />

Position the file for a sequential read before you call this routine (as<br />

described in SIRDPO on page 215).<br />

Environment The ZPI/O and ZIMS environments must be initialized and the<br />

member file opened before you call this routine.<br />

Format CALL SIRDSQ (<br />

1 LOGFIL , NWORDS , IEOF , ARRAY , ISTAT )<br />

Input Arguments<br />

Argument<br />

Name<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

LOGFIL I Logical file code to access file.<br />

Range Options: 1–5<br />

NWORDS I Number of words to be read.<br />

Data<br />

Type<br />

Description<br />

and Default<br />

IEOF I End of file:<br />

0 = This record is not the last one<br />

1 = End of file (EOF) reached. This record is<br />

the last one.<br />

ARRAY R Array (of length NWORDS) containing data that<br />

is read.<br />

ISTAT I Status flag:<br />

0 = Operation was successful.<br />

1 = Error, invalid member file unit.<br />

2 = Error, number of words to read is zero.<br />

3 = Error, reading file.<br />

5000.0.0 File Utilities: Internal Routines – SIRDSQ 217


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

File Management Routines<br />

SIRHIS<br />

Function Read history information from a member file<br />

This subroutine reads a single record of history information or all of<br />

the history for a particular member file.<br />

Environment The ZPI/O and ZIMS environments must be initialized and the<br />

member file opened before you call this routine.<br />

Format CALL SIRHIS (<br />

1 LOGFIL , IHREC , INFHIS , NOHREC , ISTAT )<br />

Input Arguments<br />

Argument<br />

Name<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

LOGFIL I Logical file code to access file.<br />

Range Options: 1–5<br />

IHREC I Number of the history record to be retrieved or<br />

zero for all history records.<br />

Data<br />

Type<br />

Description<br />

and Default<br />

INFHIS C*80 Array (of length 20) containing the requested<br />

history information.<br />

NOHREC I Number of history records on the file.<br />

ISTAT I Status flag:<br />

0 = Operation was successful<br />

1 = Error, old (pre-1985) format history<br />

record, cannot be read<br />

2 = Error, no history records on the file<br />

3 = Error, history record requested does not<br />

exist<br />

218 File Utilities: Internal Routines – SIRHIS 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

File Management Routines<br />

SIWHIS<br />

Function Write history records to a member file<br />

This subroutine allows the application programs to write NORECS<br />

history records of 80 byte character strings to a known member file.<br />

Each file may contain up to 20 history records.<br />

Environment The ZPI/O and ZIMS environments must be initialized and the<br />

member file opened before you call this routine.<br />

Format CALL SIWHIS (<br />

1 INFHIS , NORECS , LOGFIL , NTHREC , ISTAT )<br />

Input Arguments<br />

Argument<br />

Name<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

INFHIS C*80 Array (of length NORECS) containing the<br />

history information.<br />

NORECS I Number of records to be written.<br />

Range Options: 1–20<br />

LOGFIL I Logical file code to access member file.<br />

Range Options: 1–5<br />

Data<br />

Type<br />

Description<br />

and Default<br />

NTHREC I Total number of history records on the member<br />

file.<br />

ISTAT I Status flag:<br />

0 = Operation was successful<br />

1 = Error, record number invalid<br />

2 = Error, writing the history information<br />

5000.0.0 File Utilities: Internal Routines – SIWHIS 219


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

File Management Routines<br />

SIWRPO<br />

Function Position a member file for a sequential write<br />

To write additional information to the file, call the sequential write<br />

routine, SIWRSQ (page 222).<br />

Environment The ZPI/O and ZIMS environments must be initialized and the<br />

member file opened before you call this routine.<br />

Format CALL SIWRPO ( LOGFIL , IWORD , ISTAT )<br />

Input Arguments<br />

Argument<br />

Name<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

LOGFIL I Logical file code to access file.<br />

Range Options: 1–5<br />

IWORD I Word number at which to position the file.<br />

Data<br />

Type<br />

Description<br />

and Default<br />

ISTAT I Status flag:<br />

0 = Operation was successful<br />

1 = Error, invalid member file unit<br />

2 = Error, invalid word position<br />

3 = Error, positioning file<br />

220 File Utilities: Internal Routines – SIWRPO 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

File Management Routines<br />

SIWRRN<br />

Function Write to a member file at a random location<br />

This subroutine writes to a file at a random location. If the file needs to<br />

be expanded, use the sequential write routine, preceded by positioning<br />

the file for a sequential write.<br />

Data may be overwritten if care is not taken in positioning the file.<br />

Environment The ZPI/O and ZIMS environments must be initialized and the<br />

member file must be opened before you call this routine.<br />

Format CALL SIWRRN (<br />

1 LOGFIL , IWORD , NWORDS , ARRAY , ISTAT )<br />

Input Arguments<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

LOGFIL I Logical file code to access file.<br />

Range Options: 1–5<br />

IWORD I Word location at which to start writing.<br />

NWORDS I Number of words to be written.<br />

ARRAY R Array (of length NWORDS) containing the data<br />

to be written.<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

ISTAT I Status flag:<br />

0 = Operation was successful<br />

1 = Error, invalid member file number<br />

2 = Error, invalid word position<br />

3 = Error, number of words to write is zero<br />

4 = Error, writing file<br />

5000.0.0 File Utilities: Internal Routines – SIWRRN 221


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

File Management Routines<br />

SIWRSQ<br />

Function Write to a member file sequentially<br />

This subroutine writes to a member file sequentially. This routine is<br />

used for expanding a file’s length. The random write routine cannot be<br />

used for this purpose.<br />

The file should be positioned for a sequential write before you call this<br />

routine (as described in SIWRPO on page 220).<br />

Data may be overwritten if care is not taken in positioning the file.<br />

Environment The ZPI/O and ZIMS environments must be initialized and the<br />

member file opened before you call this routine.<br />

Format CALL SIWRSQ ( LOGFIL , NWORDS , ARRAY , ISTAT )<br />

Input Arguments<br />

Argument<br />

Name<br />

Output Arguments<br />

Argument<br />

Name<br />

Data<br />

Type<br />

Description<br />

and Default<br />

LOGFIL I Logical file code to access file.<br />

Range Options: 1–5<br />

NWORDS I Number of words to be written.<br />

ARRAY R Array (of length NWORDS) containing the data<br />

to be written.<br />

Data<br />

Type<br />

Description<br />

and Default<br />

ISTAT I Status flag:<br />

0 = Operation was successful<br />

1 = Error, invalid member logical file<br />

2 = Error, number of words to write is zero<br />

3 = Error, writing file<br />

222 File Utilities 5000.0.0


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Introduction<br />

ZIGS File Structure<br />

Picture Components<br />

Appendix A.<br />

ZIGS Overview<br />

The Z-<strong>MAP</strong> Interactive Graphics System (ZIGS) is a comprehensive<br />

graphics software package that operates with a broad range of graphics<br />

peripherals. As a ZPI/O programmer, you will be most concerned with<br />

placing graphics into or extracting graphics from a Z-<strong>MAP</strong> Graphics<br />

File (ZGF). This file contains graphics in a packed form and, like a<br />

metafile, is device independent. Many of the routines in the Graphics<br />

Utilities section are involved with ZIGS operations.<br />

This appendix is an introduction to ZIGS for the new ZPI/O<br />

programmer and a ZIGS reference for the more experienced ZPI/O<br />

programmer. The next topic describes the ZIGS file structure, followed<br />

by a topic describing step-by-step how to write and read a picture in a<br />

ZIGS graphics file.<br />

The basic ZIGS file structure is the Z-<strong>MAP</strong> Graphics File (ZGF), a<br />

direct access binary file with fixed record length. Each ZGF is a<br />

collection of independent pictures. The number of pictures which can<br />

be written to a particular ZGF is limited only by the number of records<br />

allocated to that ZGF. The limitation is normally a very large number<br />

(like 600,000 records) so the usual limitation is running out of space on<br />

the disk where the ZGF resides.<br />

Each picture is composed of a set of graphics segment types (e.g.,<br />

contours, borders, cross-section lines, lithology columns, etc.) which<br />

are often called logical graphics blocks (LGBs) or graphics features.<br />

An LGB (graphics feature) is therefore a “marker” identifying some<br />

specific type of graphic data.<br />

Contours, posted well data, title block components, seismic lines and<br />

other features can also be grouped together in a single LGB.<br />

223 Appendix A. ZIGS Overview 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Headers<br />

All types of LGBs used in ZPI/O can be broken down into four groups<br />

of graphic primitives: lines, text, symbols and polygons. Any number<br />

of primitives can be written to an LGB, but picture editing is less<br />

efficient if massive amounts of graphics are created in a single LGB. A<br />

list of allowed LGB types can be found in “Appendix A. Graphics<br />

Feature Codes” in the Z-<strong>MAP</strong> <strong>Plus</strong> Reference Manual.<br />

A copy of the color table assigned to the logical name ZYCOLOR is<br />

attached to each picture. By assigning different tables to the logical<br />

name in different runs, you can change the color table from picture to<br />

picture. Different pictures on the same ZGF can have different color<br />

tables. The color index used in many ZPI/O routines is a reference to<br />

this color table. If no specific index is assigned, the default index<br />

assigned in the Color Index section of the table is used to define the<br />

color of the primitive. The Color Representation section defines the<br />

color used for each index. (See “Appendix F. Color Editing” in the<br />

Z-<strong>MAP</strong> <strong>Plus</strong> Reference Manual.)<br />

Each ZGF, picture and LGB has a header which stores pertinent<br />

information. The ZGF header contains file identification text, file status<br />

information, the number of records allocated to the file, and a pointer to<br />

the next unused record.<br />

The picture header contains the name of the picture, status information,<br />

a pointer to the first LGB header in that picture, the location of the next<br />

picture header, and the display parameters which define the scale and<br />

area of the plot.<br />

Each LGB header contains a pointer to a sequential list of graphic<br />

primitives. The LGB header begins with a unique three-integer name<br />

for the LGB. The first word identifies the type of LGB, the second<br />

word indicates the number of LGBs of this type already created and the<br />

third word indicates the number of modifications made to the LGB. As<br />

a picture is edited, new versions of an LGB are created. These versions<br />

have the same name as the original LGB, but the version number is<br />

changed.<br />

Also included in the LGB header are pointers to the actual primitive<br />

data, connections to both previous and later versions of the LGB, a<br />

display priority number and the coordinates of the “minimum enclosing<br />

box” around the LGB with lines parallel to the x and y axes.<br />

5000.0.0 Appendix A. ZIGS Overview 224


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

ZGF Header<br />

Header – Picture 1<br />

Header – Picture z<br />

LGB 1<br />

LGB 2<br />

LGB K<br />

Primitive 1<br />

Primitive 2<br />

Primitive n<br />

Primitive 1<br />

Primitive 2<br />

Primitive m<br />

ZIGS File Structure<br />

225 Appendix A. ZIGS Overview 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

ZIGS Programmer’s Guide<br />

Input Graphics to a Picture<br />

This section is a tutorial about using ZIGS in ZPI/O application<br />

programs. The first topic describes placing graphics into a ZGF. The<br />

second topic describes extracting graphics from a ZGF.<br />

The general procedure for placing graphics into a picture is:<br />

1. Initialize the ZPI/O environment.<br />

2. Initialize the ZIGS environment.<br />

3. Initialize a ZGF graphics file.<br />

4. Initialize a picture.<br />

5. Initialize a graphics feature (LGB).<br />

6. Set LGB attributes.<br />

7. Write graphics primitives to the picture.<br />

8. Close the LGB.<br />

9. Close the picture.<br />

10. Close the ZGF.<br />

11. Close the ZIGS environment.<br />

12. Close the ZPI/O environment.<br />

The steps for placing graphics into a picture are:<br />

1. Initialize ZPI/O environment.<br />

Call SICOMM or SIISIL to initialize the common blocks, logical<br />

units, etc., used in the entire ZPI/O system. SICOMM enables you<br />

to set IDBUG to print or not print debug messages and to set the<br />

length of the workspace, sending output messages to the default<br />

logical unit, 6. SIISIL sets the IDBUG flag, the workspace length,<br />

and the logical unit for five types of output messages.<br />

Warning – Call SICOMM or SIISIL First<br />

If SICOMM or SIISIL is not the first ZPI/O routine called, you could get<br />

serious errors and many types of errors when you call other ZPI/O routines.<br />

5000.0.0 Appendix A. ZIGS Overview 226


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

C<br />

C INITIALIZE SYSTEM-WIDE COMMON STORAGE<br />

C<br />

C<br />

C<br />

C<br />

C<br />

C<br />

CALL SIISIL(IDBUG, LTHWRK, LUNINF, LUNSTA, LUNWAR,<br />

. LUNERO, LUNBUG, LUNDM1, LUNDM2, IPROC, ISTAT)<br />

2. Initialize the ZIGS environment.<br />

CALL SIIZIG<br />

Call SIIZIG to initialize the ZIGS environment. This routine<br />

initializes common blocks used only by ZIGS and opens and reads<br />

the default color table into the system.<br />

3. Initialize a graphics file.<br />

Call SIIZGF to create and initialize a Z-<strong>MAP</strong> Graphics File (ZGF)<br />

on which to store the graphics information generated. If the ZGF<br />

already exists, the routine initializes and opens the file.<br />

ZGFNAM = ’/disk/directory/my.zgf’<br />

NEWZGF = ’NEW’<br />

HISNEW = ’TESTING ZPIO INPUT GRAPHICS ROUTINES’<br />

CALL SIIZGF (ZGFNAM, HISNEW, NEWZGF, HISOLD, ISTAT)<br />

IF (ISTAT .GT. 0) GO TO 800<br />

4. Initialize a picture.<br />

Call S3IPIC to open either a new or an old 2D (baseplane) picture.<br />

If the picture is new, input arguments must include the picture<br />

name, projection information, information on the Area of Interest<br />

(AOI) to be mapped and scaling information. If the picture is an<br />

old one (it has been previously created), you must only supply the<br />

picture name and all other information is returned from S3IPIC.<br />

Alternatively:<br />

• Call S3NPIC to open a new picture. All the same information as<br />

described above is needed here also.<br />

• Call S3OPIC to open an old picture supplying only the picture<br />

name. All information about the old picture is returned here<br />

also.<br />

• Call SIRPIC to open a picture in read-only state. You supply the<br />

picture name, but no information about the picture is returned.<br />

227 Appendix A. ZIGS Overview 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

C<br />

PICNAM = ’DEFAULT GRAPHICS ’<br />

IFOLD = ’NEW’<br />

IFABSC = 0<br />

IFPRJ = 1<br />

IBRTIP = 2<br />

IABSSC = 0<br />

LONMND = 0<br />

LONMNM = 0<br />

LONMNS = 0<br />

LONMXD = 0<br />

LONMXM = 0<br />

LONMXS = 0<br />

LATMND = 0<br />

LATMNM = 0<br />

LATMNS = 0<br />

LATMXD = 0<br />

LATMXM = 0<br />

LATMXS = 0<br />

IHEM = 0<br />

IUTMCD = 0<br />

IPJCOD = 0<br />

ISPCOD = 0<br />

IUNCOD = 0<br />

IRADTY = 0<br />

XOFFST = 1.0<br />

FREEX = 1.0<br />

YOFFST = 1.0<br />

FREEY = 1.0<br />

VXMIN = 0.0<br />

VXMAX = 10.0<br />

VYMIN = 0.0<br />

VYMAX = 10.0<br />

XSC<strong>MAP</strong> = 1.0<br />

YSC<strong>MAP</strong> = 1.0<br />

XLONG = 10.0<br />

YLONG = 10.0<br />

BOTPAR = 0.0<br />

TOPPAR = 0.0<br />

REFLAT = 0.0<br />

SFLAT = 0.0<br />

REFLON = 0.0<br />

SFLON = 0.0<br />

FNORTH = 0.0<br />

FEAST = 0.0<br />

UNTFAC = 0.0<br />

AXISA = 0.0<br />

AXISB = 0.0<br />

AZMTH = 0.0<br />

SCALE = 0.0<br />

XLNVEW = 0.0<br />

YLNVEW = 0.0<br />

5000.0.0 Appendix A. ZIGS Overview 228


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

C<br />

CALL S3IPIC (PICNAM, IFOLD, IFABSC, IFPRJ, IBRTIP,<br />

1 IABSSC, LONMND, LONMNM, LONMNS, LONMXD,<br />

2 LONMXM, LONMXS, LATMND, LATMNM, LATMNS,<br />

3 LATMXD, LATMXM, LATMXS, IHEM, IUTMCD,<br />

4 IPJCOD, ISPCOD, IUNCOD, IRADTY, VXMIN,<br />

5 VXMAX, VYMIN, VYMAX, XOFFST, FREEX,<br />

6 YOFFST, FREEY, XSC<strong>MAP</strong>, YSC<strong>MAP</strong>, XLONG,<br />

7 YLONG, BOTPAR, TOPPAR, REFLAT, SFLAT,<br />

8 REFLON, SFLON, FNORTH, FEAST, UNTFAC,<br />

9 AXISA, AXISB, AZMTH, SCALE, XLNVEW,<br />

. YLNVEW, ISTAT )<br />

IF (ISTAT .GT. 0) GO TO 800<br />

5. Initialize an LGB.<br />

Call SIGSOP to open a new LGB (graphics feature) on the<br />

currently opened picture and currently opened ZGF. The only<br />

input argument to this routine is the code assigned to the type of<br />

graphic segment to be opened. You can find these codes in<br />

“Appendix A. Graphics Feature Codes” in the Z-<strong>MAP</strong> <strong>Plus</strong><br />

Reference Manual.<br />

C<br />

C OPEN BORDER PICTURE SEGMENT<br />

C<br />

LGBTYP = 1<br />

CALL SIGSOP(LGBTYP, ISTAT)<br />

IF (ISTAT .GT. 0) GO TO 800<br />

6. Set attributes of the LGB.<br />

For any type of LGB, the coordinate system can be defined. The<br />

choices are engineering units (the units that data is measured in,<br />

i.e., meters, feet, etc.,) or plotter units (inches or centimeters,<br />

measured from the bottom left corner of the map). The default is<br />

engineering units because rarely is data stored in plotter units.<br />

All types of LGBs can be divided into four groups of graphic<br />

primitives: lines, text, symbols and polygons. The following<br />

routines are used depending on the type of graphics primitives to<br />

be generated.<br />

If the type of segment contains lines, the following attributes can<br />

be assigned:<br />

Attribute Routine<br />

line color SIGLCL<br />

line type SIGLTY (solid, bold, dashed)<br />

dash and hachure size SIGLPM<br />

line width SIGLWD<br />

229 Appendix A. ZIGS Overview 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

If the type of segment contains markers or symbols, the following<br />

attributes can be assigned:<br />

Attribute Routine<br />

marker color SIGMCL<br />

marker height SIGMHT<br />

marker type SIGMTY<br />

The marker type is the symbol code to use. You can find it in<br />

“Appendix C. Symbols, Fonts, and Line Patterns ” in the<br />

Z-<strong>MAP</strong> <strong>Plus</strong> Reference Manual.<br />

If the type of segment contains text, the following attributes can be<br />

assigned:<br />

Attribute Routine<br />

text color SIGTCL<br />

text font SIGTFO<br />

text height SIGTHT<br />

text justification SIGTJU<br />

text rotation SIGTRO<br />

The text fonts are illustrated in “Appendix C. Symbols, Fonts, and<br />

Line Patterns ” in the Z-<strong>MAP</strong> <strong>Plus</strong> Reference Manual. Text<br />

justification allows the location given for the text to be at the lower<br />

left corner, lower right corner or the exact center of the text string.<br />

If the type of segment contains polygons, only the fill color can be<br />

set, using SIGPCL.<br />

Alternatively, you could call SIGPDF to set all these attributes,<br />

and the coordinate system.<br />

C<br />

C SET DEFAULTS<br />

C<br />

CALL SIGPDF(<br />

1 KLNCLR, KLNTYP, KMKCLR, KMKTYP, KTXTCL,<br />

2 KTXTFO, KTXTJU, KPOLCL, KSCLTY, WDLINE,<br />

3 HTMARK, HTTEXT, ROTEXT, DSHLEN, DSHGAP,<br />

4 HSHLEN, HSHGAP, HSHWAY, ISTAT)<br />

IF (ISTAT .GT. 0) GO TO 800<br />

7. Write graphics primitives.<br />

After appropriate graphic attributes have been set, call routines to<br />

write the actual graphic primitives to the picture. Call SIGLIN to<br />

draw lines, call SIGMRK to draw symbols, call SIGTXT to draw<br />

text, and call SIGPFL to draw polygons.<br />

5000.0.0 Appendix A. ZIGS Overview 230


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

C<br />

C DO A BORDER USING LINES<br />

C<br />

NUMPTS = 5<br />

XCORS(1) = 1.0<br />

YCORS(1) = 1.0<br />

XCORS(2) = 11.0<br />

YCORS(2) = 1.0<br />

XCORS(3) = 11.0<br />

YCORS(3) = 11.0<br />

XCORS(4) = 1.0<br />

YCORS(4) = 11.0<br />

XCORS(5) = 1.0<br />

YCORS(5) = 1.0<br />

C<br />

CALL SIGLIN(NUMPTS, XCORS, YCORS, ISTAT )<br />

IF (ISTAT .GT. 0) GO TO 800<br />

8. Close the LGB.<br />

Call SIGSCL to close the currently open LGB after all graphics<br />

have been added. After closing the current LGB, you can open<br />

another one with another call to SIGSOP. See step 5 on page 229.<br />

C<br />

C CLOSE GRAPHIC SEGMENT<br />

C<br />

CALL SIGSCL(ISTAT)<br />

IF (ISTAT .GT. 0) GO TO 800<br />

9. Close the picture.<br />

After all graphics have been added to a picture, the picture must be<br />

closed. Call SIEPIC to close the currently open picture. After<br />

closing the current picture, you can open another new or old<br />

picture and continue processing.<br />

C<br />

C CLOSE THE FIRST PICTURE<br />

C<br />

CALL SIEPIC (ISTAT)<br />

IF (ISTAT .NE. 0) GO TO 800<br />

Warning – Close Picture before Closing ZIGS<br />

It is important to close the picture before exiting the program to avoid<br />

possible problems when you try to use the picture again.<br />

231 Appendix A. ZIGS Overview 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

10. Close the ZGF.<br />

When you finish processing all pictures on the currently attached<br />

ZGF, you must close it. Call SIEZGF to detach the current ZGF.<br />

After detaching the current ZGF, you can open another ZGF if<br />

necessary.<br />

C<br />

C CLOSE THE GRAPHICS FILE<br />

800 CALL SIEZGF<br />

11. Close the ZIGS environment.<br />

CALL SIEZIG<br />

Warning – Close ZGF before Closing ZIGS<br />

If the ZGF is not closed before exiting the program, you might have<br />

problems when you try to use the ZGF again.<br />

Unlike the ZIMS environment, the ZIGS environment needs to be<br />

closed before exiting the program. Call SIEZIG to close ZIGS.<br />

12. Close the ZPI/O environment.<br />

Call SIESIL to close the ZPI/O environment.<br />

5000.0.0 Appendix A. ZIGS Overview 232


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Output Graphics from a Picture<br />

Occasionally, you must extract data from a picture in a ZGF in order to<br />

add it to graphics data generated by another source. After the output<br />

graphics environment is activated, the LGBs (graphics features) are<br />

searched for those required for the project. If an LGB is found whose<br />

graphics contents are wanted, that information is extracted from the<br />

picture.<br />

The general procedure for extracting graphics from a picture is:<br />

1. Initialize the ZPI/O environment.<br />

2. Initialize the ZIGS environment.<br />

3. Initialize a ZGF graphics file.<br />

4. Initialize a picture.<br />

5. Initialize the output graphics environment.<br />

6. Obtain a graphics feature (LGB) from the picture.<br />

7. Retrieve the LGB.<br />

8. Close the output graphics environment.<br />

9. Close the picture.<br />

10. Close the ZGF.<br />

11. Close the ZIGS environment.<br />

12. Close the ZPI/O environment.<br />

To extract graphics from a picture, follow these steps:<br />

1. Initialize ZPI/O, ZIGS, the ZGF, and the picture.<br />

Call SICOMM or SIISIL, SIIZIG, SIIZGF, and S3IPIC, S3OPIC<br />

or SIRPIC to set up the environment for extraction of graphics. For<br />

more detail, see pages 226 to 227.<br />

2. Open the output graphics environment.<br />

Call SOGINT to activate the output graphics environment.<br />

Arguments sent to this routine control how the output is returned<br />

to the applications program. You can choose to have the system<br />

return text, symbol and line LGBs as entities or as vectors.<br />

3. Obtain an LGB.<br />

Call SOGLGB to return the first LGB (graphics feature) header.<br />

An output argument tells you what type of graphic segment has<br />

been retrieved. If you do not want to add this type of graphics<br />

feature to your application, call SOGLGB again to retrieve the<br />

next LGB header.<br />

233 Appendix A. ZIGS Overview 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

4. Retrieve output graphics.<br />

If the graphics segment retrieved by SOGLGB is of a type that you<br />

want to add to your application, call S3GELM to retrieve the data.<br />

Output arguments handle any of the four types of graphics<br />

primitives that can be retrieved (lines, text, symbols or polygons).<br />

Call S3GELM until a flag tells you the end of data for this LGB<br />

has been reached, then call SOGLGB to get the next LGB header.<br />

Stay in this SOGLGB/S3GELM loop until a flag from SOGLGB<br />

tells you that all data for the picture has been reviewed.<br />

5. Close the output graphics environment.<br />

After all data has been reviewed, call SOGEND to close the output<br />

graphics environment.<br />

6. Close the picture, the ZGF and the ZIGS environment.<br />

Call SIEPIC, SIEZGF and SIEZIG to close the picture, ZGF, and<br />

ZIGS environment, as described on page 231.<br />

7. Close the ZPI/O environment.<br />

Call SIESIL to close the ZPI/O environment.<br />

5000.0.0 Appendix A. ZIGS Overview 234


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Introduction<br />

Appendix B.<br />

ZIMS Overview<br />

On many computing systems, file handling is not as user friendly as it<br />

could be. Converting datasets (control points, grids, vertices, text, etc.)<br />

located on separate disk files into member files on one large Z-<strong>MAP</strong><br />

Information Management System (ZIMS) master file minimizes this<br />

type of problem. We have localized this interface to one level of<br />

application programming. Many of the routines in the File Utilities<br />

section of the Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> are the interface used<br />

for ZIMS. The ZIMS master file is commonly called an MFD.<br />

The ZIMS master file has a system of expanded member file headers<br />

which contain detailed information about the individual member file’s<br />

history and parameters. This header provides easy access to ZIMS’ file<br />

handling capabilities for all application programs, whether reading<br />

from or writing to a permanent, temporary or scratch ZIMS member<br />

file. This header also provides a standardized method for dealing with<br />

control point datasets having different record structures. The record<br />

structure information is stored in the member file’s header at the time<br />

of creating and is available on subsequent reads of the member file.<br />

As many as four master files can be attached to ZIMS simultaneously.<br />

In addition, a scratch file is available which can be used for member<br />

files that are only needed temporarily. The scratch master file is deleted<br />

automatically at the end of the ZPI/O run; therefore, information about<br />

the scratch master file cannot be accessed in future ZPI/O program<br />

runs.<br />

This appendix is an introduction to ZIMS for the new ZPI/O<br />

programmer and a ZIMS reference for the more experienced ZPI/O<br />

programmer. The next topic describes the ZIMS file structure followed<br />

by a topic that describes step-by-step how to write and read a ZIMS<br />

member file.<br />

235 Appendix B. ZIMS Overview 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

ZIMS File Structure<br />

Master File<br />

MFD Header<br />

The basic ZIMS structure is the master file, a direct access binary file<br />

with fixed record length. Each master file is a collection of independent<br />

member files. The general structure of a master file is illustrated below.<br />

Header – File 1<br />

Parameter Record (Grid)<br />

Header – File 2<br />

Grid Column 1 Data<br />

Grid Column 2 Data<br />

Grid Column n Data<br />

Parameter Record (Data)<br />

Field Descriptor 1<br />

Field Descriptor 2<br />

Field Descriptor n<br />

ZIMS File Structure<br />

Data Record 1<br />

Data Record n<br />

5000.0.0 Appendix B. ZIMS Overview 236


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Member File<br />

Each member file is conceptually separate from the other files and can<br />

be used without regard to the other member files. Several types of files<br />

have been defined, including grid files, data files, vertex files and fault<br />

files. (For a list, see “Appendix B. File and Field Codes” in the<br />

Z-<strong>MAP</strong> <strong>Plus</strong> Reference Manual. For examples of how these files are<br />

structured, see “Appendix D. Import/Export” in the Z-<strong>MAP</strong> <strong>Plus</strong><br />

Reference Manual.)<br />

In addition to the actual data, each member file can contain other<br />

optional information. A history block contains information about other<br />

files which were used in creating the fields, and can include text<br />

descriptions input by the user. A parameter record contains descriptive<br />

numerical information about the data in the file, and data field<br />

descriptors contain information about the various fields in the data file.<br />

There is no limit to the number of member files which can be in a<br />

master file. Files can be added or deleted during a run. Each member<br />

file in a given master file must have a unique name. If you try to create<br />

a new member file in a master file which already has a member file by<br />

that name, the ZPI/O routines place a version number (V-02, V-03, etc.)<br />

in columns 21-24 of the member filename. The new member file then<br />

has to be accessed by the name including version number. If the version<br />

number is left off the name when accessing it later, the old or original<br />

member file by that name is used.<br />

Each member file has a 32-word directory associated with it, which is<br />

sorted on the master file. At runtime, all directory entries from all the<br />

master files are combined in one runtime directory. If a member file is<br />

actually in use, a copy of the directory is placed in memory. The<br />

directory contains the name and length of the file, and points to various<br />

parts of the file and other information.<br />

Gaining <strong>Access</strong> to a Member File<br />

<strong>Access</strong>ing a member file is conceptually similar to accessing a master<br />

file on a FORTRAN logical unit. Instead of using a unit number, a<br />

ZIMS file is accessed through a file number, which is returned to the<br />

user by the routine which opens the file. This number is called the<br />

ZIMS logical file code and is used as an argument to the other routines<br />

that access the file. The logical file code relates to a buffer where the<br />

information about the file is stored. Since only a limited number of<br />

buffers are available and can be open at one time (five is the usual<br />

limit) the programmer must be sure to close the file when finished with<br />

it.<br />

237 Appendix B. ZIMS Overview 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Member File Structure<br />

Member files are stored in two basic ways. Grids use the first method<br />

while all other data types use the second method. For additional<br />

information and examples, see “Appendix D. Import/Export” in the<br />

Z-<strong>MAP</strong> <strong>Plus</strong> Reference Manual.<br />

Grid File Structure<br />

The first record of a grid file is a header record. This record contains<br />

information about the file such as file name, type (GRID), location of<br />

next file header, etc. This record is followed by a parameter record<br />

containing information such as minimum and maximum x, y, and z<br />

values, number of rows and columns in the grid, ZNON (missing or<br />

null data) value, and x and y grid intervals. Following the parameter<br />

record is the data, which is stored column-wise, from top to bottom,<br />

with the columns stored left to right.<br />

Parameter Record for Grids<br />

LENGTH = 32 words<br />

Word Type Content AKA<br />

1 Integer 0 (zero)<br />

2 Integer Number of grid rows NROWS<br />

3 Integer Number of grid columns NCOLS<br />

4<br />

5–6 Double Minimum x value XMIN<br />

7–8 Double Maximum x value XMAX<br />

9–10 Double Minimum y value YMIN<br />

11–12 Double Maximum y value YMAX<br />

13 Real The x grid increment GXINC<br />

14 Real The y grid increment GYINC<br />

15 Real The x expansion of collection region over AOI XBAND<br />

16 Real The y expansion of collection region over AOI YBAND<br />

17 Real Reach, data collection radius REACH<br />

18 Real Null data value for file ZNON<br />

19 Real Maximum grid value GMAX<br />

20 Real Minimum grid value GMIN<br />

21–32 Not used<br />

5000.0.0 Appendix B. ZIMS Overview 238


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

Data File Structure<br />

The second method of storing data is used by well data, seismic data,<br />

fault data, lineal features, etc. The first record is similar to the first<br />

record of a grid file., containing information about file name, type, etc.<br />

The second record is a parameter record. For data files, the parameter<br />

record contains the minimum and maximum x and y values, the number<br />

of fields on the file, the length of each record, the number of records,<br />

the ZNON value, a sort flag, etc.<br />

Parameter Record for Data<br />

LENGTH = 32 words<br />

Word Type Content AKA<br />

1 Integer Number of fields on data record (also the number<br />

of field descriptor records)<br />

2 Integer Number of words per data record (equal to the sum<br />

of the “number of words” entries from all the field<br />

descriptors)<br />

NFLDS<br />

NWRDS<br />

3 Integer Number of data records in file NRECS<br />

4 Integer Distribution type code (See the list below.)<br />

5–6 Double Minimum x coordinate XMIN<br />

7–8 Double Maximum x coordinate XMAX<br />

9–10 Double Minimum y coordinate YMIN<br />

11–12 Double Maximum y coordinate YMAX<br />

13–17<br />

19–20<br />

18 Real Null data value for file ZNON<br />

21 Real Marker or separator value for contour, seismic<br />

section, or cross-section files<br />

22<br />

25–29<br />

23 Integer CNTR file mode. 1 = equal interval, 2 = unequal<br />

interval, 3 = unknown<br />

24 Real Contour interval for contour file if CNTR file<br />

mode (word 23) = 1<br />

30 Real Rotation angle<br />

31 Integer Process flag. 1 = batch setup, 2 = interactive,<br />

3 = batch<br />

32 Integer Primary sort field<br />

Distribution Type Code:<br />

1 = Irregularly spaced in x,y<br />

2 = Sequentially spaced<br />

3 = Irregular but ordered in increasing x with increasing y for equal x<br />

239 Appendix B. ZIMS Overview 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Data files also contain Field Descriptor records. One field descriptor<br />

record is needed for each field on the dataset. Each record contains the<br />

field name, field type, default print information, location in the record,<br />

the ZNON value, and minimum and maximum allowed values.<br />

Word Type Content<br />

Field Descriptor Record<br />

LENGTH = 20 words<br />

1–5 Hollerith 20-character name for the field. Defaults to sequence number<br />

if blank.<br />

6 Integer Type of data stored in the field. The standard data types are<br />

given in “Appendix B. File and Field Codes” in the<br />

Z-<strong>MAP</strong> <strong>Plus</strong> Reference Manual.<br />

7 Hollerith Default print/transfer format code (A, G, F, E, (I))<br />

8 Integer For Real fields, field width for print format.<br />

For Char fields, maximum number of characters.<br />

9 Integer For Real fields, number of decimal places for print format.<br />

10 Integer Index position of first word for field in each record. This<br />

indicates the location (word number) in the record where the<br />

data for this field begins.<br />

11 Integer Number of consecutive words in the data record that are<br />

assigned to this field. More than one word is needed for<br />

double precision fields, and may be needed for character type<br />

fields.<br />

12<br />

16–19<br />

13 Real Field null data value (ZNON) (default = 1.0E30).<br />

14 Real Field minimum allowed value (default = –1.0E30).<br />

15 Real Field maximum allowed value (default = +1.0E30).<br />

20 Integer Points to next secondary sort field (zero if none).<br />

The data files can also be described as a two-dimensional matrix where<br />

the field descriptors are the columns of the matrix and the data records<br />

are the rows. Using this analogy, a file could look like the following:<br />

record 1<br />

record 2<br />

record 3<br />

•<br />

•<br />

•<br />

record (maximum)<br />

X-field Y-field Z1-field Name-field • • •<br />

The data records follow the final field descriptor record.<br />

5000.0.0 Appendix B. ZIMS Overview 240


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

ZIMS Programmer’s Guide<br />

Creating a Member File<br />

This topic is a tutorial on the use of ZIMS in ZPI/O application<br />

programs. The first example describes creating a member file. The<br />

second example describes reading data from an existing member file.<br />

The topic also includes a description of reading and writing grid files.<br />

The general procedure for creating a member file is:<br />

1. Initialize the ZPI/O environment.<br />

2. Create a master file.<br />

3. Initialize the ZIMS environment.<br />

4. Create a new data file.<br />

5. Create parameter and field descriptor records.<br />

6. Write data records to the member file.<br />

7. Close the member file.<br />

8. Close the ZIMS environment.<br />

9. Close the ZPI/O environment.<br />

The steps for creating a member file are:<br />

1. Initialize the ZPI/O environment.<br />

Call SICOMM or SIISIL to initialize the common blocks, logical<br />

units, etc., used in the entire ZPI/O system.<br />

Warning – Call SICOMM or SIISIL First<br />

If SICOMM or SIISIL is not the first ZPI/O routine called, you could get<br />

serious and many types of errors when you call other ZPI/O routines.<br />

2. Create a ZIMS master file.<br />

Call SIMFCR to create a master file. Arguments include the disk<br />

name of the master file and an internal name for identification in<br />

printouts. These names can be identical if you want.<br />

241 Appendix B. ZIMS Overview 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

3. Initialize the ZIMS environment.<br />

Call SIIZIM to initialize the ZIMS environment and attach all<br />

master files used in this run. Input arguments include the number<br />

of master files to attach and their names. The master files must<br />

already exist.<br />

4. Create a new member file.<br />

Call SINOPN to create a new member file. Input arguments are the<br />

name for the member file, the master file number where it is<br />

stored, and a four-character code for the type of file to be created.<br />

(For information about these codes, see “Appendix B. File and<br />

Field Codes” in the Z-<strong>MAP</strong> <strong>Plus</strong> Reference Manual.) Output<br />

arguments are the name of the file (with added version number if<br />

necessary), the ZIMS logical file code, and a status flag.<br />

5. Create field descriptor records.<br />

Each record consists of fields in which the data is stored. The<br />

contents of each field are defined by a field descriptor record. For<br />

information about the format of the field descriptor record, see the<br />

”Field Descriptor Record” table on page 240.<br />

Call SIFLDW to write the field descriptor records. The logical file<br />

code is returned when the file is opened.<br />

Write Order<br />

The field descriptor records must be written to a new file before the data<br />

records are written to ensure correct file usage.<br />

6. Write data records to the file.<br />

Call SIFWRT to write in sequential order the data records for a<br />

new member file on the master file. Input arguments include the<br />

logical file code of the member file, the record number (it should<br />

always be 0 when writing to the file sequentially), the number of<br />

words of data to write, and the data itself.<br />

5000.0.0 Appendix B. ZIMS Overview 242


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

7. Create the parameter record.<br />

The parameter record completes the definition of the file. The<br />

parameter record is written after all data records have been written<br />

in order to have correct values for minimum and maximum x and y<br />

values and a correct record count. For information about the<br />

format of the parameter record, see ”Parameter Record for Data”<br />

table on page 239.<br />

Call SIPRWD to write the parameter record for all data types<br />

except grids. Call SIPRWG to write the parameter record for grids.<br />

In both cases, one of the arguments is the logical file code returned<br />

when the file is opened.<br />

8. Close the member file.<br />

Call SIFCLO to close the member file and release the buffer<br />

relating to the logical file code. Closing a new member file writes<br />

the file’s header information to the disk so it can be accessed later.<br />

9. Close the ZPI/O environment.<br />

Call SIESIL to close the ZPI/O environment.<br />

243 Appendix B. ZIMS Overview 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Reading Data from an Existing ZIMS File<br />

To retrieve data from a currently existing member file in a master file,<br />

you must take several steps. You must open an old ZIMS member file,<br />

read and interpret the parameter record and field descriptor records, and<br />

finally read the data.<br />

The steps for reading data from a ZIMS member file are:<br />

1. Initialize ZPI/O environment.<br />

Call SICOMM or SIISIL to initialize the common blocks, logical<br />

units, etc., used in the entire ZPI/O system.<br />

Warning — Call SICOMM or SIISIL First<br />

If SICOMM or SIISIL is not the first ZPI/O routine called, you could get<br />

serious and many types of errors when you call other ZPI/O routines.<br />

2. Initialize the ZIMS environment.<br />

Call SIIZIM to initialize the ZIMS environment and attach all<br />

master files used in this run. Input arguments include the number<br />

of master files to attach and their names. The master files must<br />

already exist.<br />

3. Open an existing ZIMS member file.<br />

Call SIOOPN to open an old member file. Input arguments for this<br />

routine include the name of the member file (with version number<br />

if needed) and the name of the master file which contains the<br />

member file. (Different master files attached to the same run could<br />

possibly contain member files with the same name and without<br />

version numbers.) SIOOPN returns the type of file opened and the<br />

logical file code to be used in subsequent processing.<br />

4. Read and interpret the parameter record.<br />

To read and decode a ZIMS data file, it is necessary first to read<br />

the parameter record. Call SIPRRD to read the parameter record<br />

for a data file (call SIPRRG to read the parameter record for a grid<br />

file). The input argument is the logical file code. All other features<br />

of the parameter record are returned as output arguments from the<br />

routine.<br />

5000.0.0 Appendix B. ZIMS Overview 244


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

5. Read and interpret the field descriptors.<br />

One of the arguments returned by SIPRRD is the number of fields<br />

contained in the member file. A loop must be set up to read the<br />

field descriptor records for all the fields on the file. Call SIFLDR<br />

to read each field descriptor in turn. Input arguments are the<br />

logical file code and the field number to be retrieved. Output<br />

arguments are the field name, field type, ZNON value, print codes,<br />

etc.<br />

6. Read the data records.<br />

The parameter record you read in step 4 indicates the length of<br />

each record to read and the number of records on the file. Reading<br />

an entire data file is simply a matter of calling SIFRED once for<br />

each record on the file. The field descriptors provide pointers to<br />

data fields in each record, along with other field-specific<br />

information. After reading each record, the data of interest can be<br />

extracted according to the field location descriptions.<br />

7. Close the member file.<br />

Call SIFCLO to close the member file and release the buffer<br />

relating to the logical file code.<br />

81. Close the ZPI/O environment.<br />

Call SIESIL to close the ZPI/O environment.<br />

245 Appendix B. ZIMS Overview 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Reading and Writing Grids<br />

The “grid” type of member file is ideal for storing data which is<br />

organized as a two-dimensional matrix. The parameter record for grids<br />

(as described in ”Parameter Record for Grids” table on page 238)<br />

specifies the dimensions of the matrix as the number of rows and<br />

columns in the grid. Other parameters describe the range of the x and y<br />

coordinates that the grid covers and the ZNON (no data) value. Call<br />

SIPRRG to read the parameter record for a grid file. Grid files require<br />

no field descriptor records.<br />

Data is stored on the file in column order from the top down. The first<br />

column is the far left (minimum x) column of the grid and the last is the<br />

far right (maximum x) column of the grid. In each column, the first<br />

value is the top (maximum y) value in the column and the last value is<br />

the bottom (minimum y) value of the column.<br />

Grids are read and written with the same routines used for reading and<br />

writing records of data — SIFRED for reading and SIFWRT for<br />

writing. The number of words to read or write is the number of rows in<br />

the grid and the number of records to read or write is the number of<br />

columns in the grid.<br />

For additional information, see ”Reading and Writing Grids” on<br />

page 34.<br />

5000.0.0 Appendix B. ZIMS Overview 246


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

247 Appendix B. ZIMS Overview 5000.0.0


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Appendix C.<br />

Logical Unit Assignment<br />

The Logical Unit Assignment Table contains a list of the logical<br />

FORTRAN units used throughout ZPI/O.<br />

5000.0.0 Appendix C. Logical Unit Assignment 248<br />

C


249 Appendix C. Logical Unit Assignment 5000.0.0<br />

Description Logical<br />

Unit<br />

Logical Unit Assignment Table<br />

Symbolic<br />

Name<br />

Common<br />

Block<br />

Defining<br />

Routine<br />

Data<br />

Format<br />

Maximum<br />

Size<br />

Record<br />

Format<br />

Volumetrics output 9 LFRMAT (none) ZVOLUM Character 200 rec. Fixed<br />

Blocked<br />

Import Task formatted data input/output—may be<br />

unused.<br />

ZIMS Runtime File Directory (RTD), contains a list<br />

of all datasets accessed in this run.<br />

ZIMS Master Files (MFD), contain all data listed in<br />

RTD above.<br />

ZIMS Scratch MFD used for run-temporary<br />

datasets.<br />

ZIMS Scratch file used for MFD file deletion and<br />

clean up.<br />

ZIGS Graphics File (ZGF), contains new or old<br />

plots.<br />

ZIGS auxiliary Graphics File used for copy and<br />

cleanup.<br />

10 LUNFMT (none) ZXFGRD<br />

ZXFDAT<br />

ZXFSUP<br />

Character User<br />

Specified<br />

Record<br />

Length<br />

File<br />

Allocation<br />

132 byte Permanent<br />

(if used)<br />

Permanent<br />

(if used)<br />

20 LUNDIR DIRECT ZILDDR Binary 250 rec. Direct 32 word Run<br />

Temporary<br />

21<br />

22<br />

23<br />

24<br />

(none) FBUFCM<br />

FBUFCM<br />

FBUFCM<br />

FBUFCM<br />

ZILDDR Binary 500 rec. Direct<br />

<strong>Access</strong><br />

25 (none) FBUFCM ZILDDR Binary 500 rec. Direct<br />

<strong>Access</strong><br />

26<br />

26<br />

27<br />

27<br />

LUNNEW<br />

LUNSCR<br />

LZGF<br />

LUNQ<br />

(none)<br />

(none)<br />

ZGFCOM<br />

(none)<br />

ZIGRCL<br />

ZIMFDD<br />

ZGFINF<br />

ZMDSPL<br />

Binary 500 rec. Direct<br />

<strong>Access</strong><br />

Binary 500 rec. Direct<br />

<strong>Access</strong><br />

28 LUNAUX (none) ZGCOPY Binary 500 rec. Direct<br />

<strong>Access</strong><br />

ZIGS color table 39 LUNIT (none) ZDINIT Character 500 rec. Fixed/<br />

Blocked<br />

ZIGS Workstation file 40 LUN (none) ZGBGWD Character 400 rec. Fixed/<br />

Blocked<br />

Alternate color table (reading) 41 LUNIT (none) ZDCRCT Character 500 rec. Fixed/<br />

Blocked<br />

Alternate color table (writing) 42 LUNIT (none) ZDCWCT Character 500 rec. Fixed/<br />

Blocked<br />

Filter scratch file 76<br />

76<br />

LUNSCR<br />

LUNSCR<br />

(none) ZFBIHR<br />

SOBIHR<br />

Binary 800 rec. Direct<br />

<strong>Access</strong><br />

512 word Permanent<br />

512 word Run<br />

Temporary<br />

512 word Run<br />

Temporary<br />

128 word Permanent<br />

or Run<br />

Temporary<br />

128 word Permanent<br />

(if used)<br />

80 byte Permanent<br />

80 byte Permanent<br />

80 byte Permanent<br />

(if used)<br />

80 byte Permanent<br />

(if used)<br />

4096 word Run<br />

Temporary<br />

Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics


5000.0.0 Appendix C. Logical Unit Assignment 250<br />

Description Logical<br />

Unit<br />

Lithology symbol table 37 LUNSYM SCLOGU STISYM Binary 512 rec. Direct<br />

<strong>Access</strong><br />

Log Curve Default File 51 LDFLG<br />

LUNLOG<br />

Lithology and Cross-Section Default File 52 LDEFS<br />

LUNDEF<br />

Definition File 53 LNLST<br />

LGNLST<br />

Lithology Data File 55 LLITH<br />

LUNLIT<br />

Tops Data File 56 LTOPS<br />

LUNTOP<br />

Log Curve Data File 57 LLOGS<br />

LUNLOG<br />

Analysis Data File 58 LANLY<br />

LUNANL<br />

(none)<br />

SCLOGU<br />

(none)<br />

SCLOGU<br />

(none)<br />

SCLDMX<br />

(none)<br />

SCLDMX<br />

(none)<br />

SCLDMX<br />

(none)<br />

SCLDMX<br />

(none)<br />

SCLDMX<br />

SLOPEN<br />

SGCOMN<br />

SLOPEN<br />

SGCOMN<br />

SLOPEN<br />

SLCOMM<br />

SLOPEN<br />

SLCOMM<br />

SLOPEN<br />

.SLCOMM<br />

SLOPEN<br />

SLCOMM<br />

SLOPEN<br />

SLCOMM<br />

Character Fixed/<br />

Blocked<br />

Character Fixed/<br />

Blocked<br />

Character Fixed/<br />

.Blocked<br />

Character Fixed/<br />

Blocked<br />

Character Fixed/<br />

.Blocked<br />

Character Fixed/<br />

Blocked<br />

Character Fixed/<br />

Blocked<br />

Core Data File 59 LUNCOR SCLDMX SLCOMM Character Fixed/<br />

Blocked<br />

Well Survey Data File 60 LWSV<br />

LUNWSR<br />

Logical Unit Assignment Table<br />

Symbolic<br />

Name<br />

Common<br />

Block<br />

(none)<br />

SCLDMX<br />

Defining<br />

Routine<br />

SLOPEN<br />

SLCOMM<br />

Data<br />

Format<br />

Maximum<br />

Size<br />

Record<br />

Format<br />

Character Fixed/<br />

Blocked<br />

Record<br />

Length<br />

File<br />

Allocation<br />

512 byte Permanent<br />

80 byte Permanent<br />

80 byte Permanent<br />

80 byte Permanent<br />

80 byte Permanent<br />

80 byte Permanent<br />

80 byte Permanent<br />

80 byte Permanent<br />

80 byte Permanent<br />

80 byte Permanent<br />

<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong>


251 Appendix C. Logical Unit Assignment 5000.0.0<br />

Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

Symbols<br />

.assemble picture<br />

“copy to” space vs. “copy from” space 151<br />

A<br />

A-<strong>MAP</strong> <strong>Plus</strong> I/O<br />

example program 14–24<br />

argument name<br />

variable vs. constant 29<br />

assemble picture 149–152<br />

“copy to” space vs. “copy from” space 157<br />

compute four corners for 155–158<br />

attach master file 177, 198<br />

C<br />

close<br />

current graphics feature 133<br />

files 30<br />

graphics file 118<br />

last picture opened 117<br />

master files 188<br />

member file 189<br />

ZIMS files 40<br />

color table 224<br />

compress<br />

graphics file 163<br />

master file 199<br />

compute<br />

control point file statistics 56–58<br />

four corners of one picture relative to another picture<br />

for assembly/overlay 155–158<br />

grid file statistics 46–48<br />

statistics for field 59–60<br />

convert from x,y to latitude/longitude 49–53<br />

copy all or part of a picture to another picture 153–154<br />

create new master file 200<br />

create new member file 32, 242–244<br />

D<br />

debugging option<br />

using 29<br />

Index<br />

defaults<br />

set field descriptors 184–186<br />

set for lines, markers, text, and polygons 129–131<br />

define coordinate system 134<br />

delete<br />

graphics feature from picture file 135<br />

mark picture for 159<br />

member file from master file 170<br />

detach one or all master files 202<br />

display area of a picture 100, 108, 144<br />

display/plot hardcopy type picture 72–73<br />

draw<br />

connected line segments 121<br />

lines using a member file 74<br />

lines using array inputs 70<br />

markers 78<br />

shaded or colorfilled polygon 132<br />

text 142<br />

5000.0.0 Index 252<br />

E<br />

example program<br />

to list members of a graphics file 10–13<br />

to list members of a master file 8–9<br />

G<br />

graphics feature<br />

defined 223<br />

graphic primitives 224<br />

set attributes 229–230<br />

graphics file<br />

close 133<br />

compress 163<br />

header 224<br />

open 145<br />

transfer picture from neutral file to 79<br />

transfer picture to neutral file from 80–164<br />

graphics files<br />

list members of, example program 10–13<br />

grids<br />

reading and writing 34


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

H<br />

header 224<br />

I<br />

IDBUG<br />

using 29<br />

index maps 147–148<br />

initialize 38<br />

all input arguments 29<br />

ZPI/O environment 38<br />

with output file control 41–42<br />

ZPI/O output graphics environment 167<br />

Zycor Information Management System (ZIMS) and<br />

attach master files 173–174, 197<br />

Zycor Interactive Graphics Environment (ZIGS) 146<br />

internal routines<br />

draw/plot features 69<br />

file utilities 169<br />

graphic utilities 77<br />

initialize/terminate ZPI/O environment 36<br />

transfer, convert, list information 43<br />

internal routines, defined 29<br />

ISTAT<br />

using 30<br />

L<br />

LGB<br />

header 224<br />

set attributes 229–230<br />

LGB, defined 223<br />

line<br />

draw connected segments 121<br />

draw using a member file 74<br />

draw using array inputs 70<br />

set color 120<br />

set dash and hachure mark parameters 122<br />

set defaults 129–131<br />

set type 123<br />

set width 124<br />

list<br />

attached master files 203<br />

data file 66–68<br />

file history and its ancestry 175–176<br />

grid as grid or contours 63–65<br />

member files 171–172<br />

example program 8–9<br />

list member files<br />

example graphics program 10–13<br />

logical file code 237<br />

logical unit assignment 248–250<br />

253 Index 5000.0.0<br />

M<br />

mark picture for deletion 159<br />

marker<br />

draw 78<br />

set color 125<br />

set defaults 129–131<br />

set height 126<br />

set type 127<br />

master file<br />

attach 177, 198<br />

compress 199<br />

create new 200<br />

rename internal name of 204<br />

master files<br />

close 188<br />

detach one or all 202<br />

list attached 203<br />

list members of, example program 8–9<br />

specifying the number of 31<br />

member file<br />

create 32<br />

create new 242–244<br />

open new 205<br />

open old 206<br />

output filename 33<br />

position for sequential read 215<br />

position for sequential write 220<br />

read from 32<br />

read from at random location 216<br />

read from sequentially 31, 217<br />

read history information from 218<br />

write history records to 219<br />

write to at random location 221<br />

write to sequentially 31, 222<br />

O<br />

obtain<br />

color representation for color index 165<br />

general, projection and graphics feature information<br />

for picture 109–115<br />

graphics from a picture 233–234<br />

next graphics feature for picture 168<br />

next valid graphics element from picture 81–84<br />

parameter, projection, and field information about data<br />

file 178–183<br />

picture name by picture index 160<br />

open<br />

files 30<br />

graphics file 145<br />

new graphics feature 136<br />

new member file 32, 205<br />

new or old picture 85–144<br />

new picture 92–100


<strong>Landmark</strong> Graphics Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong><br />

old member file 206<br />

old picture 101–108<br />

old picture read only 162<br />

overlay maps or generate index maps 147–148<br />

overlay picture 149–152<br />

“copy to” space vs. “copy from” space 151, 157<br />

compute four corners for 155–158<br />

P<br />

picture<br />

“copy to” space vs. “copy from” space 151, 157<br />

copy all or part to another picture 153–154<br />

header 224<br />

mark for deletion 159<br />

obtain graphics element from 81–84<br />

obtain graphics from 233–234<br />

obtain information 109–115<br />

obtain name by picture index 160<br />

obtain next graphics feature for 168<br />

open new 92–100<br />

open new or old 85–144<br />

open old 101–108<br />

open old, read only 162<br />

place graphics 226–232<br />

projection arguments vs. projection type 107<br />

rename 161<br />

transfer from graphics file to neutral file 80–164<br />

transfer from neutral file to graphics file 79<br />

polygon<br />

draw shaded or colorfilled 132<br />

set defaults 129–131<br />

position member file<br />

for sequential read 215<br />

for sequential write 220<br />

R<br />

read<br />

data parameter record 209<br />

field descriptor 190–191<br />

from member file 32, 245–246<br />

from member file at random location 216<br />

from member file sequentially 31, 217<br />

general data or contour parameter record 207–208<br />

grid 34, 247<br />

grid parameter record 210<br />

history information from member file 218<br />

position member file for sequential 215<br />

record from member file 194<br />

rename<br />

internal name of master file 204<br />

picture 161<br />

reset debug print flag 37<br />

retrieve information<br />

about member file from run time directory 187<br />

5000.0.0 Index 254<br />

S<br />

set<br />

dash line and hachure mark parameters 122<br />

default field descriptors 184–186<br />

defaults for lines, markers, text, and polygons<br />

129–131<br />

line color 120<br />

line type 123<br />

line width 124<br />

marker color 125<br />

marker height 126<br />

marker type 127<br />

polygon fill color 128<br />

text color 137<br />

text font 138<br />

text height 139<br />

text justification 140<br />

text rotation 141<br />

status flag, using 30<br />

subroutine descriptions, presentation of information<br />

25–28<br />

T<br />

terminate<br />

ZPI/O environment 39<br />

ZPI/O output graphics environment 166<br />

Zycor Interactive Graphics Environment (ZIGS) 119<br />

text<br />

draw 142<br />

set color 137<br />

set defaults 129–131<br />

set font 138<br />

set height 139<br />

set justification 140<br />

set rotation 141<br />

transfer<br />

contents (pictures) of neutral file to graphics file 79<br />

information from external file into member of master<br />

file 44–45<br />

information from member of master file to external file<br />

61–62<br />

pictures from graphics file to neutral file 80–164<br />

V<br />

variable argument name 29


Z-<strong>MAP</strong> <strong>Plus</strong> I/O <strong>Access</strong> <strong>Library</strong> <strong>Landmark</strong> Graphics<br />

W<br />

write<br />

data parameter record 213<br />

field descriptor 192–193<br />

from member file sequentially 31<br />

general data or contour parameter record 211–212<br />

grid 34, 247<br />

grid parameter record 214<br />

history records to member file 219<br />

position member file for sequential 220<br />

record to member file 195–196<br />

to member file at random location 221<br />

to member file sequentially 222<br />

Z<br />

Z-<strong>MAP</strong> Interactive Graphics System<br />

file structure 223–225<br />

file structure example 225<br />

programmer’s guide 226–234<br />

Z-<strong>MAP</strong> <strong>Plus</strong> I/O<br />

program structure 6<br />

ZPI/O environment 38<br />

Zycor Information Management System<br />

field descriptor record 240<br />

file structure 236–240<br />

file structure example 236<br />

parameter record for data 240<br />

parameter record for grids 238<br />

programmer’s guide 242–247<br />

Zycor Information Management System (ZIMS)<br />

initialize and attach master files 173–174, 197<br />

Zycor Interactive Graphics Environment (ZIGS)<br />

initialize 146<br />

255 Index 5000.0.0

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!