UBC Theses and Dissertations

UBC Theses Logo

UBC Theses and Dissertations

Gids : a geographical information system Yan, Joel Zachary 1973

Your browser doesn't seem to have a PDF viewer, please download the PDF to view this item.

Item Metadata

Download

Media
831-UBC_1973_A6_7 Y35.pdf [ 9.08MB ]
Metadata
JSON: 831-1.0052000.json
JSON-LD: 831-1.0052000-ld.json
RDF/XML (Pretty): 831-1.0052000-rdf.xml
RDF/JSON: 831-1.0052000-rdf.json
Turtle: 831-1.0052000-turtle.txt
N-Triples: 831-1.0052000-rdf-ntriples.txt
Original Record: 831-1.0052000-source.json
Full Text
831-1.0052000-fulltext.txt
Citation
831-1.0052000.ris

Full Text

GIDS - A GEOGRAPHICAL INFORMATION SYSTEM  by  J o e l Zachary Yen B . S c , U n i v e r s i t y of Toronto, 1970.  A T h e s i s Submitted i n P a r t i a l F u l f i l m e n t o f the Requirements f o r the Degree of Master of Science i n the Department of Computer Science  We accept t h i s t h e s i s as conforming r e q u i r e d standard  to the  THE UNIVERSITY OF BRITISH COLUMBIA September, 1973.  In p r e s e n t i n g an  this thesis  advanced degree a t  the  Library  I further for  shall  the  of  this thesis  written  representatives.  of B r i t i s h  be  g r a n t e d by  for f i n a n c i a l gain  Computer Science  The U n i v e r s i t y o f B r i t i s h V a n c o u v e r 8, Canada  October 8,  1973  Columbia  shall  the  requirements  Columbia,  for reference  the  I t i s understood  permission.  Department o f  Date  University  permission for extensive  s c h o l a r l y p u r p o s e s may his  f u l f i l m e n t of  make i t f r e e l y a v a i l a b l e  agree t h a t  by  in partial  that  not  and  copying of Head o f my  be  I agree  that  study.  this  thesis  Department  copying or  for  or  publication  allowed without  my  i  ABSTRACT A system f o r the Input, r e t r i e v a l , d i s p l a y , and o v e r l a y of 2-dimensional g e o g r a p h i c a l d a t a s e t s has been developed. The  G e o g r a p h i c a l Information and D i s p l a y System (GIDS) has  been designed a c c o r d i n g to the f o l l o w i n g c r i t e r i a * s h o u l d be easy t o use, easy t o e v o l v e ,  problem-independent,  i n t e r a c t i v e , and g r a p h i c - o r i e n t e d . Thematic encoded by l o c a t l o n a l d a t a elements  the system  map d a t a a r e  ( p o i n t s , l i n e s , or p o l y -  gons) over which some a t t r i b u t e i s homogeneous.  Both the  a t t r i b u t e and l o c a t l o n a l d a t a a r e then input to GIDS and stored i n sequential f i l e  s t r u c t u r e s , from which they can be  s e l e c t i v e l y r e t r i e v e d , d i s p l a y e d , and manipulated a t user request.  A l l user r e q u e s t s to the system may be expressed  i n t e r a c t i v e l y v i a an E n g l i s h - l i k e command language.  Each  command, c o r r e s p o n d i n g to one o p e r a t i o n such as i n p u t , d i s p l a y or o v e r l a y , i s i n t e r p r e t e d and executed by an  independent  module which accesses the d a t a through a common input/output framework.  GIDS has proved  u s e f u l to planners and r e s e a r c h e r s  because o f I t s a b i l i t y t o d i s p l a y and r e l a t e d a t a from d i f f e r e n t maps.  11  TABLE OP CONTENTS CHAPTER  1  PAGE INTRODUCTION AND OPENING REMARKS  1  TUTORIAL ON GEOGRAPHICAL INFORMATION SYSTEMS . .  4  1.1  1.1.1 1.1.2 1.1.3 1.2  4  THE PROBLEM IN GENERAL What a r e G e o g r a p h i c a l Information Systems  4  Motivation f o r Geographical Information Systems  5  Types o f Geographical Information Systems  7  THE PROBLEM IN MORE DETAIL POLYGON PLANNING SYSTEMS 1.2.1  An Example  1.2.2  F u n c t i o n a l Requirements  . .  10 11  15  of the System 1.2.3  Data A c q u i s i t i o n  15  1.2.4  Data Encoding  17  1.2.5  Conversion of Coordinate System  1.2.6  Display  19  1.2.7  Computation  20  . .  19  1.3  THE GRID VERSUS THE POLYGON APPROACH  . .  22  1.4  SYSTEMS OF AUTOMATED CARTOGRAPHY  . . . .  29  1.5  STATE OF THE ART  30  1.6  EXAMPLES OF EXISTING SYSTEMS  32  1.6.1  G r i d Systems  32  1.6.2  Polygon Systems  3^  1.6.3* Comparison o f GIDS t o Other Polygon Systems  3&  ill  CHAPTER 2  PAGE 38  INTRODUCTION TO GIDS  39  2.1 DESIGN CRITERIA 2.2 GIDS TREATMENT OF GEOGRAPHICAL DATA 2.2.1  42  The Two Components o f Geographical  Data  42  2.2.2  P o i n t s , L i n e s , and Polygons  44  2.2.3  Encoding Schemes  44  2.3 2.4  3  . . .  FUNCTIONS OF THE SYSTEM  46  INTRODUCTION TO THE IMPLEMENTATION  . . .  47  2.4.1  B a s i c Method o f Operation  47  2.4.2  Sequential F i l e Processing  47  2.4.3  Program S t r u c t u r e o f GIDS  49  2.4.4  Memory S t r u c t u r e o f a GIDS r u n  2.4.5  Implementation Language  2.5  INTRODUCTION TO THE COMMAND LANGUAGE  2.6  SAMPLE OF SYSTEM USE  . . .  $2 . .  5^ 5^ 58  FOUNDATIONS OF THE SYSTEM 3.1  50  58  FINAL FILE STRUCTURES  3.1.1  Introduction  58  3.1.2  L o g i c a l Data S t r u c t u r e f o r 1 Polygon.  59  3.1.3  P h y s i c a l Data S t r u c t u r e o f 1 Polygon.  63  3.1.4  S p l i t and Merged F i l e s  65  3.1.5  R e l a t i v e Advantages  of S p l i t  and Merged F i l e s  66  3.1.6  D e t a i l e d Record Formats*  70  3.1.7  Headers*  71  3.1.8  How Headers are Constructed a t Execution Time*  74  CHAPTER 3  PAGE 3.2  SELECTION AND THE COMMAND 75  LANGUAGE STRUCTURE 3.2.1  Introduction  75  3.2.2  Selection vs. Retrieval  75  3.2.3  Three Types o f S e l e c t i o n  76  3.2.4  GIDS Filenames and Q u a l i f i e d F i l e s  3.2.5  Fieldnames  3.2.6  Syntax o f Numerio S e l e c t i o n  3.2.7  Implementation of Numeric  3.2.8  Command P r o c e s s i n g  3.3  77 79  . . . .  Selection.  80 82 83  INPUT/OUTPUT STRUCTURES FOR THE PROGRAMMER*  .  84  3.3.1  Introduction*  84  3.3.2  F i l e Numbers*  84  3.3.3  F i l e Tables*  86  3.3.4  F i l e Opening R o u t i n e — T A B S E L *  3.3.5  S e q u e n t i a l Read Route-TREAD* . . . .  88  3.3.6  S e q u e n t i a l W r i t e Routine-TWRITE* . .  90  3.4 4  .  . . .  HOW TO PROGRAM A COMMAND USING FOUNDATION ELEMENTS OF GIDS"  92 94  OTHER PARTS OF THE SYSTEM 4.1  94  THE INPUT SUBSYSTEM  4.1.1  Introduction  4.1.2  GIDS Approach t o Data Input  4.1.3  A Quick Survey of Four Digitizing  86  94 . . . . 94  95  Systems  4.1.4  GIDS D i g i t i z i n g  4.1.5  Input Procedure  4.1.6  Experience w i t h the Input System  Procedure  . . . . . 98 99 . . 103  V  CHAPTER 4  PAGE 4.2  THE GRAPHICS SUBSYSTEM  104  4.2.1  GIDS Approach  104  4.2.2  Graphics F u n c t i o n s .  104  4.2.3  G r a p h i c s Commands  105  4.2.4  Shading and Geometric Symbolism  4.2.5  G r a p h i c s Devices A v a i l a b l e  4.2.6  Device-Independent Graphics  . . .  115  and Other Concepts 4.2.7  The O r i g i n a l Graphics Design  4.2.8  Implementation of Device  118 119  121  Independence 4.3  125  THE INTERSECTION SUBSYSTEM  4.3.1  M o t i v a t i o n — R e g i o n a l Base 125  Transformation  5  110  4.3.2  I n t e r s e c t i n g Two Polygons  4.3.3  I n t e r s e c t i n g Two Sets o f Polygons  4.3.4  S t r i p S o r t i n More D e t a i l  141  4.3.5  The C u r r e n t State o f the I n t e r s e c t i o n Subsystem  148  CRITIQUE OF GIDS  127 . .  136  149  5.1  STRONG FEATURES OF DESIGN  150  5.2  WEAKNESSES OF DESIGN  151  5.3  COST TO USE GIDS  152  5.4  REAL USEFULNESS SO FAR  15^  vi  CHAPTER 6  PAGE FUTURE DEVELOPMENTS OF GIDS 6.1  INTRODUCTION  6.2  NEW USES FOR GIDS  156 156  ,  6.2.1  With Census and Address Data  6.2.2  As A G r a p h i c a l T o o l f o r Regional Simulations  156 156  157  6.3  EXTENSION-ABBREVIATED COMMANDS  159  6.4  GEOGRAPHICAL SELECTION  1§1  6.4.1  Theory  161  6.4.2  Implementation  161  6.5  SUMMARY  165  BIBLIOGRAPHY  166  APPENDIX  170 A. SUMMARY OF THE COMMAND LANGUAGE  170  B. FIELDNAMES FOR LOCATIONAL FILES  173  C. SAMPLE RUNS WITH GRAPHICAL OUTPUT  174  D. LEGEND OF LAND USE CODES  183  E. LISTING  183  OF THE COPY COMMAND ROUTINE  vii  LIST OF TABLES TABLE I. II.  III. IV. V. VI.  PAGE A COMPARISON BETWEEN GRID AND POLYGON SYSTEMS . . 24 THE NUMBER OF POINTS REQUIRED TO ENCODE A SQUARE ON ITS SIDE TO AN ACCURACY OF d BY THE GRID AND POLYGON METHODS  .27  THE DIMENSIONING ITEMS AND THEIR USES FOR POINTS, LINES AND POLYGONS  62  A COMPARISON BETWEEN SPLIT AND MERGED FILES IN VARIOUS PROCESSING SITUATIONS  69  THE VALUES OF F I L E NUMBERS FOR DIFFERENT TYPES OF FILES UNDER GIDS  85  A COMPARISON OF FOUR SYSTEMS FOR DIGITIZING POLYGONAL MAPS  VII. VIII. IX.  METHOD OF SHADING ON DIFFERENT DEVICES  98 I l l  THE EFFECT OF MAP SIZE AND THE TYPE OF SHADING ON THE COST OF DRAWING ON THE PLOTTER 114 THE RESPONSE TIME AND CPU TIME TO READ SPLIT FILES OF VARIOUS SIZES AND LIST TWO RECORDS . .153  vlii  LIST OF FIGURES :GURE 1.1  PAGE Location I d e n t i f i e r s f o r Geographical Information Systems  8  1.2  G e o g r a p h i c a l Data A v a i l a b l e f o r a T y p i c a l Town. . 12  1.3  Two T y p i c a l Requests t o a Polygon P l a n n i n g System  14  1.4  Two Methods o f Encoding a Polygon  1.5  Two D i f f e r e n t P r o j e c t i o n s o f t h e Same Polygon . . 19  1.6  Two Coverages and the R e s u l t i n g Overlay Coverage. 21  1.7  The G r i d and Polygon Approach to Decomposing Several Liquids A Set o f Polygons and the R e s u l t i n g Adjacency Graph The Approximation o f a Square by G r i d and Polygon Methods  1.8 1.9 1.10  18  23 26 28  The L e v e l o f Development o f Various Phases of G e o g r a p h i c a l Information Systems  33  2.1  The Two Components o f G e o g r a p h i c a l Data  43  2.2  The Boundary Encoded R e p r e s e n t a t i o n o f a 45  P o i n t , L i n e and Polygon 2.3  S t r u c t u r e of a GIDS Run  48  2.4  B l o c k Diagram of GIDS .„  51  2.5  A Map o f Core Memory D u r i n g a GIDS Run  53  2.6  Sample P l o t o f a Map w i t h Land Use Codes  3.0  The Two Types o f Records i n a GIDS F i l e  59  3.1  The L o g i c a l Data S t r u c t u r e o f a Polygon  60  3.2  The Minimal Bounding Rectangle of a L i n e and Polygon  61  . . . . 57a  ix  FIGURE  PAGE  3.3  P h y s i c a l Data S t r u c t u r e of One Polygon  3.4  A Land Use Map, the Corresponding S p l i t and Merged F i l e  65 Files 67  3.5  Three Types o f S e l e c t i o n  78  3.6  F i l e Tables  87  3.7  The Operation o f TREAD When Both a L o c a t l o n a l and a D e s c r i p t i v e F i l e a r e Being Read . . . .  89  A View o f the Data as s t o r e d on the F i l e and as Presented to P r o c e s s i n g Programs  91  3.8  4.1  A P o l y g o n a l Map as D i g i t i z e d by the Map/Model System  96  4.2  The D i g i t i z e r C o n f i g u r a t i o n used by GIDS . . . . 100  4.3  The GIDS Input Procedure  4.4  A Map of 3 M u n i c i p a l i t i e s Symbolized i n Various Ways 106 Sample Output Produced by a DRAW Command Followed by a SUPERIMPOSE Command 109  4.5 4.6  a An Example o f P a r a l l e l L i n e Shading on the Calcomp b An Example of Cross-Hatchlng on the Calcomp  101  112 113  4.7  A P l o t of Vancouver on the Dot P r i n t e r  117  4.8  A P l o t of Three M u n i c i p a l i t i e s on the L i n e Printer  117  4.9  The O r i g i n a l Design o f the Graphics Subsystem  . 120  4.10  Device Independent Graphics  4.11  The Switch Method of Device Independence . . . . 123  4.12  The Sandwich Method o f Device Independence . . . 124  4.13  R e g i o n a l Base T r a n s f o r m a t i o n . . . .  126  4.14  The L i n e E x t e n s i o n Method f o r P o i n t i n Polygon Determination  128  122  X  FIGURE 4.15  PAGE The S m a l l e s t Rectangle Method f o r P o i n t i n . 129  Polygon Determination 4.16  The Three Stages i n I n t e r s e c t i n g Polygons A & B . 131  4.17  The S t r u c t u r e o f the I n t e r s e c t i o n Routines Showing the E x t e n d i b l e Design I n t e r s e c t i o n o f the Minimal Rectangles Can O f t e n Avoid I n t e r s e c t i o n of the Polygons  4.18 4.19  132 133  T e s t i n g i f the Bounding Rectangle o f Polygon A 134  i s Contained i n Polygon B 4.20  Reducing the Polygons Before I n t e r s e c t i o n . . . . 135  4.21  Using an O v e r l a i d G r i d as an Index t o the Polygons Polygons from the Same Map Ordered i n S e v e r a l Ways i n S e q u e n t i a l F i l e s  4.22  137 139  4.23  Sequencing Polygons i n a S e q u e n t i a l F i l e as Expressed i n a Problem S o l v i n g Context . . . . 143  4.24  I n t e r s e c t i n g Polygons w i t h the S t r i p , and then I n t e r s e c t i n g Two S t r i p s of Polygons  145  4.25  The Method Used by the INTSL Routine to I n t e r s e c t a Polygon P w i t h a S t r i p o f Polygons S t o r e d i n the B - L i s t 146  4.26  Two S t r i p S o r t e d Maps, and a T y p i c a l A - L i s t . . . 147  6.1  P o s s i b l e Extensions to GIDS  156  6.2  I n p u t l n g Census or Address Data t o GIDS  158  6.3  GIDS as a G r a p h i c a l T o o l f o r R e g i o n a l Simulations  159  Regions S e l e c t e d from a Data F i l e by D i f f e r e n t Selection C r i t e r i a . . . . .  162  6.4 7.1  A P l o t of a Land Use Map f o r the Vancouver  7.2  R e s i d e n t i a l Land Shaded by D e n s i t y  7.3  A Map o f R e c r e a t i o n a l Land (enclosed i n t r i a n g l e s ) , w i t h R e s i d e n t i a l Land Superimposed on i t  *«#*#**  Area . 180 181  . . 182  xi  ACKNOWLEDGEMENTS The GIDS p r o j e c t has r e c e i v e d f i n a n c i a l support from the Department of Computer Science a t UBC, the G r e a t e r Vancouver R e g i o n a l D i s t r i c t P l a n n i n g Department, the Department of F o r e s t r y a t UBC, the I n t e r - I n s t i t u t i o n a l P o l i c y Simulator ( H P S ) p r o j e c t , and the N a t i o n a l Research C o u n c i l of Canada. The GIDS system has been developed over the past two y e a r s by computer s c i e n c e students under the guidance of James L. Parker and myself. I would l i k e to thank Jean J e r v i s f o r her e x c e l l e n t job on the I/O r o u t i n e s ( S e c t i o n 3*3), Dale T r o y e r f o r h i s good work on the i n t e r s e c t i o n system ( S e c t i o n 4.3) and d e v i c e independent graphics,Sum Mock f o r h i s Job on the f l e x i b l e g r a p h i c s system ( S e c t i o n 4 . 2 ) , Marvin Avery f o r h i s enthusiasm and e f f o r t s on the i n p u t system ( S e c t i o n 4.1), and Dr. Parker f o r h i s h e l p i n c l a r i f y i n g f i l e s t r u c t u r e s and s e l e c t i o n . I would a l s o l i k e to thank Wing Lau and V i n c e n t Manis f o r the s e l e c t i o n r o u t i n e s , Tom Mathews f o r the shading r o u t i n e , and a l l the students i n the aggregate group and the Group of Twelve f o r t h e i r programming a s s i s t a n c e . I t has been a p l e a s u r e to work w i t h a l l of them. My own c o n t r i b u t i o n has i n v o l v e d many aspects of the system d e s i g n as w e l l as c o o r d i n a t i o n of the implementation. Some of the aspects I have worked on i n d e t a i l are the superv i s o r r o u t i n e , the header s t r u c t u r e s , f i l e c r e a t i o n , emptying, and copying r o u t i n e s , and i n l e s s d e t a i l on the s e l e c t i o n , i n p u t , g r a p h i c s , and a g g r e g a t i o n of d a t a . I would a l s o l i k e to thank Darlene B e l f o r d and Andrew Clement f o r h e l p f u l suggestions i n the p r e p a r a t i o n o f t h i s t h e s i s , and Dr. Doug Seeley f o r h i s c o n s t r u c t i v e c r i t i c i s m . I wish t o acknowledge my s u p e r v i s o r , Dr. Parker, f o r h i s d i r e c t i o n , and P e t e r George o f the Gmeater Vancouver R e g i o n a l D i s t r i c t f o r h i s support and e f f o r t s i n making the system useful. F i n a l l y , I want t o express my h e a r t f e l t thanks to my w i f e , Toby, f o r the a d v i c e , encouragement and understanding she has g i v e n me. JOEL Z.  YAN  1  INTRODUCTION AND OPENING REMARKS With I n c r e a s i n g concern  i n urban and environmental  s t u d i e s , there has been a c o r r e s p o n d i n g l y r a p i d development of i n f o r m a t i o n systems t o process environmental  data.  Most  of these g e o g r a p h i c a l i n f o r m a t i o n systems have been designed f o r one p a r t i c u l a r study, and even then have o f t e n not been used  up t o t h e i r p o t e n t i a l because of the d i f f i c u l t y i n  using them.  A c c o r d i n g t o experts a t the r e c e n t UNESCO/IGU  conference, the l e v e l o f system use i s f a r behind the l e v e l of hardware and software technology  (Tomlinson, 1972, I n t r o -  duction). At the U n i v e r s i t y of B r i t i s h Columbia we have developed  the G e o g r a p h i c a l Information and D i s p l a y System  (GIDSt), a system t h a t can be a p p l i e d to any 2-dimensional data and the a s s o c i a t e d a t t r i b u t e s .  Compared t o oMiea? systems  GIDS i s powerful n o t so much i n the f u n c t i o n s i t performs as i n i t s ease of use and easy e x t e n d i b i l i t y .  GIDS can be used  by a non-computer expert e i t h e r i n t e r a c t i v e l y or i n batch v i a a command language t h a t he can l e a r n w i t h i n an hour. Some of i t s other good f e a t u r e s are i t s v e r s a t i l e d e v i c e independent  g r a p h i c s and powerful access methods.  The prime  weakness i s i n data i n p u t . The d e s c r i p t i o n o f GIDS presented two  principal thrusts.  The f i r s t  i n t h i s t h e s i s has  i s t o provide  of the system f o r those who would extend  docamehfcatfcon  i t , and the second  2  Is  to c a l l p a r t i c u l a r a t t e n t i o n to those aspects of the  d e s i g n which are of more g e n e r a l i n t e r e s t . f i r s t end,  i t has been necessary  d e s c r i p t i o n s i n some p l a c e s . marked w i t h an a s t e r i s k .  To serve the  to i n c l u d e q u i t e d e t a i l e d  These s e c t i o n s have been  In s e r v i n g the second g o a l , the  f o l l o w i n g s e c t i o n s are the most noteworthy! s e c t i o n 3.1 ( f i l e s t r u c t u r e s ) ; s e c t i o n 3.2  ( s e l e c t i o n ) ; s e c t i o n 4.2  (device independent g r a p h i c s ) , and s e c t i o n 4.3  (strip  sorting). In the author's  o p i n i o n i t i s more i n f o r m a t i v e to  d e s c r i b e the e v o l u t i o n of a system than to p r e s e n t , de its  f i n a l design.  T h e r e f o r e , throughout  e s p e c i a l l y i n Chapter  4,  this thesis,  and  the system w i l l be d e s c r i b e d i n  terms of the i n i t i a l v i s u a l i z a t i o n , problems w i t h t h i s d e s i g n , and  facto,  encountered  the reworked design t h a t a m e l i o r a t e s  these problems. Chapter  1 serves as a t u t o r i a l on g e o g r a p h i c a l  mation systems f o r the u n i n i t i a t e d . problems and reviews Chapter system t h a t we  infor-  I t d e s c r i b e s the g e n e r a l  c u r r e n t work.  2 then i n t r o d u c e s the g e o g r a p h i c a l i n f o r m a t i o n have developed  a t the U n i v e r s i t y of B r i t i s h  Columbia. Chapters in  some d e t a i l .  3 and 4 d e s c r i b e the system The  implementation  former chapter i s concerned  with  the  f o u n d a t i o n elements and the l a t t e r w i t h the other p a r t s of the system.  3  Chapter  5 presents an e v a l u a t i o n of the system and  I t s r e a l u s e f u l n e s s to date. F i n a l l y , Chapter 6 I l l u s t r a t e s p o s s i b l e extensions of GIDS and summarizes the work.  *#«***«  4  CHAPTER 1 A TUTORIAL ON GEOGRAPHICAL INFORMATION SYSTEMS The purpose o f t h i s chapter Is t o Introduce the u n i n i t i a t e d reader t o the realm of g e o g r a p h i c a l Information systems by d e s c r i b i n g the problems and the s t a t e of the a r t . The d i s c u s s i o n w i l l begin a t a low l e v e l s i n c e i t assumes no p r e v i o u s f a m i l i a r i t y w i t h the f i e l d . reviews have been w r i t t e n elsewhere  More d e t a i l e d  (Tomlinson, 1970, 1972;  Dueker, 1966). 1.1.  THE PROBLEM IN GENERAL 1.1.1  What are G e o g r a p h i c a l Information Systems?  A g e o g r a p h i c a l Information system may be d e f i n e d as an i n f o r m a t i o n system which Is concerned w i t h the s t o r a g e , r e t r i e v a l , a n a l y s i s or d i s p l a y of g e o g r a p h i c a l d a t a .  The  n e c e s s a r y c h a r a c t e r i s t i c f o r data t o be g e o g r a p h i c a l i s t h a t i t have a l o c a t i o n i d e n t i f i e r as p a r t of the d a t a element.  For i n s t a n c e , census data i s g e o g r a p h i c a l i n the  sense t h a t i t Is a s s o c i a t e d w i t h a l o c a t i o n a l u n i t such as a census t r a c t , but a t a b l e of logarithms i s non-geographical as i t i s not r e l a t e d t o any p a r t i c u l a r l o c a t i o n . t i o n s of a l t i t u d e , temperature,  Observa-  and s o i l type are f u r t h e r  examples of g e o g r a p h i c a l d a t a . Geographical i n f o r m a t i o n systems d i f f e r from  other  i n f o r m a t i o n systems i n t h a t the data i s manipulated and  5  r e t r i e v e d by geographic generally graphical.  c r i t e r i a and the output i s  The  l o c a t l o n a l data  identifiers  can be t r e a t e d l i k e any other d a t a items f o r some p r o c e s s i n g o p e r a t i o n s such as summarizing; however, the o p e r a t i o n s of d a t a c a p t u r e , i n i t i a l encoding,  display  and r e l a t i n g of g e o g r a p h i c a l v a r i a b l e s are s u b s t a n t i a l l y more complicated f o r the l o c a t i o n i d e n t i f i e r , o f t e n r e q u i r i n g s p e c i a l i z e d equipment and  software.  G e o g r a p h i c a l data p r o c e s s i n g has been d e f i n e d not as a f i e l d  i n i t s e l f but as the common ground between  i n f o r m a t i o n p r o c e s s i n g and the many f i e l d s s p a t i a l a n a l y s i s techniques  utilizing  (Tomlinson, 1972,  Intro.).  i s an i n t e r - d i s c i p l i n a r y area t h a t has importance  It  in fields  as d i v e r s e as computer s c i e n c e , geography, p l a n n i n g , s o c i o l o g y , and  cartography.  I t i s an e x c i t i n g expanding  which w i l l be of i n c r e a s i n g importance 1.1.2  area  i n the f u t u r e .  Motivation f o r Geographical Information Systems  I n t e r e s t i n g e o g r a p h i c a l i n f o r m a t i o n systems has been motivated by an i n c r e a s i n g concern w i t h b e t t e r management of our urban and n a t u r a l environments. g i c a l systems has  Experience w i t h e c o l o -  i n f l u e n c e d us to examine the  interactions  between components of a system as w e l l as l o o k i n g a t the i n d i v i d u a l components themselves.  Often the most  f e a t u r e of environmental data i s not the presence  important or absence  6  of s e t s of c h a r a c t e r i s t i c s b u t the r e l a t i o n s h i p s between these c h a r a c t e r i s t i c s i n space. s h i p s decision-makers  To study these  relation-  r e q u i r e ample i n f o r m a t i o n on a l l  aspects o f the problem area and convenient t o o l s f o r r e l a t i n g t h i s information together. T r a d i t i o n a l l y , t h i s data i s obtained from v a r i o u s sources and i s hence found  i n s e v e r a l f o r m s — a s maps a t  v a r i o u s s c a l e s , p r o j e c t i o n s and r e s o l u t i o n s , and as t a b l e s of a l l s o r t s .  Under these circumstances g e o g r a p h i c a l  systems a r e h e l p f u l to manage the l a r g e volumes of d a t a , to r e l a t e d i f f e r e n t data s e t s , and to analyze data s e t s .  They can use known t e c h n i q u e s  1  individual  f o r converting  the map data to a common p r o j e c t i o n and then perform f u n c t i o n s such as superimposing  maps which h e l p r e l a t e t h i s d a t a .  G e o g r a p h i c a l systems can a l s o perform many u s e f u l cheaper  or f a s t e r than man.  computations  For example, T o b l e r p o i n t s out  t h a t there e x i s t programs which can c a l c u l a t e and p l o t a 17 by 22 i n c h map o f the world on some obscure p r o j e c t i o n f o r about #20 t o t a l c o s t , whereas no draftsman would do the same f o r l e s s than #100 (Tomlinson, 1970, p. 13^).  Many o f these programs are a v a i l a b l e through the G e o g r a p h i c a l Program Exchange ( W i t t i c k , 1972).  7  1.1.3  Types of G e o g r a p h i c a l Information Systems  W i t h i n the broad framework of g e o g r a p h i c a l i n f o r mation  systems there i s a wide spectrum  convenient bases  for classifying  of systems.  Two  these systems are the type  of l o c a t l o n a l i d e n t i f i e r used and the most important functions  performed.  1.1.3.1 One system  Types of L o c a t i o n I d e n t i f i e r Used  important f e a t u r e of a g e o g r a p h i c a l i n f o r m a t i o n  i s the type of l o c a t i o n I d e n t i f i e r i t uses.  In the  i n t r o d u c t i o n to G e o g r a p h i c a l Data Handling (Tomlinson, 1972), there was tifier  an i l l u s t r a t i o n of f o u r types of l o c a t i o n i d e n -  (see F i g . 1)  1.1)t  e x t e r n a l index;  2) c o o r d i n a t e r e f e r e n c e ; 3) a r b i t r a r y  grid;  4) e x p l i c i t boundary. The type of l o c a t i o n i d e n t i f i e r employed to a l a r g e extent determines  the f u n c t i o n s a system can perform,  and  the techniques i t must a p p l y to perform these f u n c t i o n s . The e x t e r n a l index serves t o i d e n t i f y each data element as b e l o n g i n g to a p a r t i c u l a r g e o g r a p h i c a l a r e a such as a census t r a c t or m u n i c i p a l i t y , but does not convey r e l a t i v e l o c a t i o n without the use of some e x t e r n a l c r o s s index.  The e x t e r n a l index can be used f o r s t a t i s t i c a l  8  (The f i g u r e below was taken from G e o g r a p h i c a l Data (Tomlinson, 1972)).  Census T r .  Pop  101 102 103 104 10S  2368 172 4532 1628 723  Handling.  101  •  •  102  105 103 104  EXTERNAL IN0EX  ARBITRARY GRID  F i g u r e 1.1  COORDINATE REFERENCE  EXPLICIT BOUNDARY  Location I d e n t i f i e r s f o r geographical information systems.  9  grouping of d a t a , but not f o r p l o t t i n g or most other geographical manipulations.  In the c o o r d i n a t e r e f e r e n c e  a s i n g l e p o i n t i s i d e n t i f i e d f o r each r e g i o n . of l o c a t l o n a l i d e n t i f i e r permits p l o t t i n g and i n t o a r b i t r a r y areas d e f i n e d by  T h i s type grouping  polygons.  Both the a r b i t r a r y g r i d and e x p l i c i t boundary l o c a t i o n i d e n t i f i e r s p r o v i d e a more d e t a i l e d view of the v a r i a t i o n i n the observable over space.  In the g r i d  the data i s r e c o r d e d f o r each square i n a g r i d .  case,  This  r e p r e s e n t s an a b s t r a c t i o n of the data i n order to s i m p l i f y computer p r o c e s s i n g . boundaries  In the e x p l i c i t boundary case, the  of the r e g i o n s themselves,  (defined  arbitrarily,  a d m i n i s t r a t i v e l y , or by data v a l u e s ) are r e c o r d e d . boundary i s almost always approximated  The  by a s e r i e s of  s t r a i g h t l i n e s , hence t u r n i n g an a r b i t r a r y r e g i o n i n t o a polygon.  Both the g r i d and polygon i d e n t i f i e r s  permit  e x t e n s i v e d i s p l a y and m a n i p u l a t i o n c a p a b i l i t i e s such as o u t l i n e maps, o v e r l a y and area c a l c u l a t i o n s .  Later i n this  chapter the g r i d and polygon approach w i l l be compared i n d e t a i l , and examples of each type of system w i l l be g i v e n . 1.1.3.2  Types of Systems by T h e i r Use  W i t h i n the broad c l a s s i f i c a t i o n of g e o g r a p h i c a l i n f o r m a t i o n systems (as d e f i n e d i n the p r e v i o u s s e c t i o n ) t h e r e are s e v e r a l q u i t e d i f f e r e n t types of systems. systems d e a l mainly w i t h networks (Witiuk, 1973; 1971)  Some  Rapp et a l ,  and r e l a t e d problems such as f i n d i n g minimal  paths.  10  Automatic cartography mating map  systems are concerned w i t h  auto-  p r o d u c t i o n and hence are o r i e n t e d towards 2  a c c u r a t e and  sophisticated display.  F i n a l l y , there are  g e o g r a p h i c a l systems f o r mapping and manipulating dimensional  a r e a l data f o r use  2-  l n p l a n n i n g or r e s e a r c h .  T h i s l a s t c l a s s of system w i l l be the focus f o r the r e s t of the 1.2  chapter.  THE PROBLEM IN MORE DETAIL POLYGON PLANNING SYSTEMS In S e c t i o n 1.1  geographical  some of the elements common to a l l  i n f o r m a t i o n systems were i n t r o d u c e d .  Now  the p a r t i c u l a r problem area to be t a c k l e d by t h i s work i s d e s c r i b e d ; namely, polygon applications.  systems p r i m a r i l y f o r p l a n n i n g  GIDS i s one member of t h i s c l a s s of geo-  g r a p h i c a l i n f o r m a t i o n systems. Polygon systems d e r i v e t h e i r name from the  fact  t h a t they encode a r e a ! data by p o l y g o n a l l o c a t i o n a l Identifiers.  The  p o l y g o n a l data handled  form of coverages.  i s u s u a l l y l n the  A coverage i s d e f i n e d as a s e t of  non-  o v e r l a p p i n g polygons which are homogeneous i n some charact e r i s t i c and  cover  the study a r e a .  i n t e r i o r of each polygon  For i n s t a n c e , the  i n a land use coverage has a  A more d e t a i l e d overview of automatic i s given i n Section 1 . 4 .  cartography  11  uniform land use.  T h i s requirement  w i t h i n each polygon polygon  i n the coverage  t h a t data be homogeneous i s fundamental  t o the  approach. We w i l l l e a d o f f the d i s c u s s i o n w i t h an example of a  s i t u a t i o n where a polygon p l a n n i n g system would be u s e f u l and then d e s c r i b e v a r i o u s f u n c t i o n s r e q u i r e d of such a 1.2.1  system.  An Example  I t i s i l l u s t r a t i v e t o c o n s i d e r a simple example of a p o l y g o n a l system.  Consider the f i c t i o n a l case of Boomtown,  B r i t i s h Columbia.  The f o l l o w i n g g e o g r a p h i c a l data i s  a v a i l a b l e to the l o c a l p l a n n i n g department! a zoning l a n d use map,  s o i l type map,  and a map  map,  showing both the  major s t r e e t s and the l o c a t i o n s of the l o c a l sawmills (see F i g . 1.2).  As the f i g u r e shows, these maps are not a l l a t  the same s c a l e or accuracy, perhaps because they have been prepared by d i f f e r e n t  agencies.  These maps i l l u s t r a t e some of the d i f f e r e n t types of l o c a t l o n a l data.  The f i r s t three maps c o n s i s t of p o l y g o n a l  d a t a , and c o n s t i t u t e three coverages sawmills are p o i n t data and  The 3  the s t r e e t s ©re l i n e d a t a .  each case the i m p l i c i t assumption over each l o c a t l o n a l data  f o r Boomtown.  In  i s t h a t d a t a i s homogeneous  element.  3 l f one were i n t e r e s t e d i n observed t r a f f i c flows over these s t r e e t s , one would have to t r e a t these s t r e e t s as a network r a t h e r than a c o l l e c t i o n of independent l i n e s .  F i g u r e 1.2  ^Geographical d a t a a v a i l a b l e f o r a t y p i c a l town.  13  T h i s homogeneity i s not always s t r a i g h t f o r w a r d . boundaries of the zoning r e g i o n s are determined t i v e l y v i a the town zoning r e g u l a t i o n s . use r e g i o n s are not s t r i c t l y  The  administra-  However, the  land  homogeneous; l a n d use boundaries  are not determined u n t i l a f t e r a d e c i s i o n on the r e s o l u t i o n , many o b s e r v a t i o n s  i n the f i e l d , and  Given t h i s d a t a , planners (Pig.  are d e s c r i b e d  1.3)  Request #1»  and  two  some s u b j e c t i v e judgement.  t y p i c a l requests  below.  from the Boomtown  Then the output i s shown  the r e q u i r e d system c a p a b i l i t i e s are o u t l i n e d .  P l o t a l l land t h a t i s zoned f o r i n d u s t r i a l purposes.  Superimpose on top of t h a t the s t r e e t  network (to g i v e an i n d i c a t i o n of the geography) and  a l l the sawmills.  relative  T h i s output  c o u l d be used to check t h a t a l l the sawmills  are  l o c a t e d w i t h i n the i n d u s t r i a l l y zoned l a n d . Request #2t  C a l c u l a t e and  p r i n t the area of each s o i l  type  on the land shown to have a use of vacant. A l s o p l o t the s o i l s map on top.  with vacant land shown  T h i s output c o u l d be  f u t u r e zoning  used to p l a n  of the vacant l a n d — f o r a g r i c u l t u r e  or houses depending on the type of The  f i r s t step b e f o r e  encode a l l the data common s c a l e , and  and  the  soil.  answering these requests  i s to  s t o r e l t i n computer memory i n some  coordinate  system.  14  To s e r v i c e the f i r s t request r e q u i r e s the c a p a b i l i t y to  s e l e c t polygons on the b a s i s of t h e i r a t t r i b u t e s and t o  draw maps on top of each other w i t h some g r a p h i c a l device.  output  P l o t t i n g r e q u i r e s having a boundary r e p r e s e n t a t i o n  of the polygons. To answer the second request r e q u i r e s the a b i l i t y t o f i n d the i n t e r s e c t i o n of the vacant s o i l polygons. in Section  land use polygons and the  T h i s procedure, known as o v e r l a y , i s d e s c r i b e d  1.2.7.  Request # l i P l o t the i n d u s t r i a l zoned l a n d , the s t r e e t s and the sawmills.  (Note t h a t sawmills 1 and 2 a r e o u t s i d e the indust r i a l l y zoned land)  Industrial Request #2t P l o t the s o l i type on the vacant c a l c u l a t e the areas. Area=10.5  Area=2.0 Area=5.1  F i g u r e 1.3  Two t y p i c a l r e q u e s t s  l a n d , and  Land use  Soil Type  Area  vacant  sand  12.5  vacant  peat  5.1  to a polygon p l a n n i n g  system.  15  1.2.2  F u n c t i o n a l Requirements of the System  We  now  s t a t e s p e c i f i c a l l y the major f u n c t i o n s  r e q u i r e d of the polygon  p l a n n i n g systems we w i l l be  con-  sidering.  These systems must perform  the f o l l o w i n g  operations  i n a f a i r l y convenient  economical f a s h i o n :  1)  and  d a t a i n p u t i n c l u d i n g data encoding, c o n v e r s i o n to a common c o o r d i n a t e system, and f i l e storage;  2) r e t r i e v a l and  updating  of s e l e c t e d r e c o r d s ;  3) v e r s a t i l e d a t a d i s p l a y ; 4) v a r i o u s computations i n c l u d i n g the I n t e r s e c t i o n of 1.2.3  two  coverages.  Data A c q u i s i t i o n  The  first  stage  i n data  input i s data  There i s a g r e a t range of types of data and  acquisition. of sources  of  data. A r e a l c o l l e c t i o n u n i t s can be p o i n t s , l i n e s , polygons or g r i d s , and there can be a temporal framework as w e l l . Data may censuses,  come from maps, a e r i a l photographs,  surveys, 4  t a b l e s of o b s e r v a t i o n s , or remote s e n s i n g .  For  i n s t a n c e , the SKYLAB space l a b o r a t o r y w i l l conduct a r e g u l a r photography program of the e a r t h . In the c o l l e c t i o n of a d a t a base l t i s of paramount importance to f o l l o w a few  simple r u l e s to enable a l l the  S e e S e c t i o n 1 of Tomlinson (1972) f o r a very thorough r e p o r t on remote s e n s i n g t e c h n i q u e s . 4  16  d a t a t o be r e l a t a b l e a t a l a t e r time. has d e s c r i b e d some of these r u l e s . f o r a l l g e o g r a p h i c a l systems,  Parker  (1971 a)  Other r u l e s that hold  not o n l y polygon systems, a r e  g i v e n below. Rule 1*  Decide on the type of l o c a t i o n  Identifier  a c c o r d i n g to the f u n c t i o n s wanted from the system. As d e s c r i b e d e a r l i e r ( S e c t i o n 1.1.3) there are f o u r types o f l o c a t i o n I d e n t i f i e r , each w i t h d i f f e r e n t c a p a b i l i t i e s and overhead c o s t s . The type w i t h the minimum overhead that performs the r e q u i r e d f u n c t i o n s should be chosen. Rule 2:  Decide on a c o o r d i n a t e system which i s a p p r o p r i a t e f o r the study area and then ensure i s observed  that a l l data  i n t h i s c o o r d i n a t e system o r can be  converted t o i t . I f the study a r e a i s o n l y a few m i l e s a c r o s s , then even though i t Is on a s p h e r i c a l e a r t h i t i s very n e a r l y p l a n a r and a r e c t a n g u l a r c o o r d i n a t e system w i l l s u f f i c e . However, i f the study area covers a few hundred m i l e s and t h e r e i s a concern w i t h a c c u r a c y of a r e a s , maps of a r e a - p r e s e r v i n g p r o j e c t i o n should :jbe chosen. The U n i v e r s a l Transverse Mercator (UTM) preserves areas r e a s o n a b l y w e l l f o r Canada. The Mercator p r o j e c t i o n , however, does n o t . I t p r o j e c t s p o i n t s from the sphere onto a v e r t i c a l c y l i n d e r tangent a t the equator and hence enlarges the areas near the p o l e s . Rule 3«  Decide on the s p a t i a l r e s o l u t i o n and s p a t i a l frequency of the data,based  on the requirements of  the study and ensure t h a t a l l data used passes  these  limits. The s p a t i a l r e s o l u t i o n i s d e f i n e d as the s i z e of a r e a l u n i t over which data i s to be c o l l e c t e d and the s p a t i a l frequency i s d e f i n e d as the d e n s i t y of o b s e r v a t i o n s .  17  I t i s important to be v e r y c a r e f u l i n i d e n t i f y i n g a r e s o l u t i o n because i f t h i s r e s o l u t i o n i s too f i n e one w i l l be burdened w i t h the overhead of too much d a t a , and i f the r e s o l u t i o n i s too coarse some r e q u i r e d i n f o r m a t i o n w i l l j u s t not be a v a i l a b l e . For most s t u d i e s the s p a t i a l r e s o l u t i o n i s obvious. R e g i o n a l planners are s a t i s f i e d w i t h a r e s o l u t i o n of a c i t y b l o c k , but neighbourhood planners may r e q u i r e d e t a i l to the l o t l e v e l . In a l l cases, the r e s o l u t i o n should be keyed t o the f i n e s t l e v e l of i n f o r m a t i o n that i s wanted. Then, once the r e s o l u t i o n has been agreed upon, i t should be implemented. I f the a v a i l a b l e data i s much too f i n e i t should be aggregated and i f i t i s too c o a r s e , one should t h i n k twice about u s i n g l t . If data i s to be obtained by a d i r e c t survey, the s i z e of c o l l e c t i o n u n i t should be of the order of the s p a t i a l resolution. The s p a t i a l frequency i s another important c o n s i d e r a t i o n i n conducting a survey. For d a t a such as land use, there i s some a r b i t r a r i n e s s i n e x a c t l y where the polygon boundaries are drawn, depending on those p o i n t s at which the d a t a i s observed. In such cases the number of o b s e r v a t i o n s made over an area of the s p a t i a l r e s o l u t i o n should be l a r g e . 1.2.4  Data  Encoding  There are two hardware approaches t o encoding maps; namely, l i n e f o l l o w i n g and former  scanning  (see F i g . 1 . 4 ) .  In the  case a c u r s o r i s moved a u t o m a t i c a l l y or manually  along  a l i n e and p o i n t s on the l i n e are recorded on tape or c a r d s . In the l a t t e r case, the whole s u r f a c e of the map a u t o m a t i c a l l y and the darkness recorded.  Then software  scanned d a t a .  i s scanned  of each p o i n t i n a g r i d i s  i s used t o l o c a t e l i n e s from  the  Ray Boyle has w r i t t e n a good d i s c u s s i o n of the  equipment a v a i l a b l e f o r d a t a input i n S e c t i o n I I of Geog r a p h i c a l Data Handling  (Tomlinson,  1972).  18  Line following (produces a l i s t of coordinates)  F i g u r e 1.4  Scanning (produoes a b i t a r r a y )  Two methods of encoding a polygon.  Scanning r e q u i r e s a much l a r g e r i n i t i a l  expense f o r  both hardware and software, but once the system i s s e t up, i t may  encode a map  f o r l e s s than a l i n e f o l l o w i n g  system.  Scanning has been used by the Canadian G e o g r a p h i c a l Information System (CGIS)(Tomlinson, 196?), but most other a p p l i c a t i o n s have used l i n e f o l l o w i n g .  CGIS has a system  whereby the polygon o u t l i n e s are s c r i b e d onto a s p e c i a l m a t e r i a l which saves l i t t l e  i s then a u t o m a t i c a l l y scanned.  system  i n comparison w i t h d i g i t i z i n g s i n c e the  s c r i b i n g step i s almost as time-consuming tization.  The  as manual d i g i -  19  1.2.5  Conversion of Coordinate System  A d e s c r i p t i o n of the d i f f e r e n t c o o r d i n a t e systems i n use can be found  i n any cartography text.-*  Parker (1971  b)  notes t h a t w i t h any of these p r o j e c t i o n systems there e x i s t ( a t l e a s t l o c a l l y ) l i n e a r t r a n s f o r m a t i o n s from one  system  to another, i . e . , there e x i s t constants a, b, c, d, e and f , such that ax+by+c dx+ey+f  F i g u r e 1.5  Two  d i f f e r e n t p r o j e c t i o n s of the same polygon.  S e v e r a l d i f f e r e n t types of t r a n s f o r m a t i o n s are d e s c r i b e d i n the l i t e r a t u r e P. 737),  and b u i l t  ( W i t t i c k , 1972;  Tomlinson,  i n to some g e o g r a p h i c a l systems  1972,  (Schmidt,  1969). 1.2.6  Display  D i s p l a y i s the obvious method f o r p r e s e n t a t i o n of geographic d a t a .  ^See  Systems must have the c a p a b i l i t y to d i s p l a y  f o r example Chapters 2,  and Sale (1969).  9 and 10 of  Robinson  20  p o i n t , l i n e and polygon data and to superimpose one on top of the o t h e r .  data sets  T h i s s u p e r p o s i t i o n enables the  user t o r e l a t e data from d i f f e r e n t sources. from cartography can be a p p l i e d to produce  Techniques aesthetically  p l e a s i n g maps which communicate w e l l . D i s p l a y hardware ranges from simple p r i n t e r s to v e r y p r e c i s e p e n - p l o t t e r s to i n t e r a c t i v e CRT g r a p h i c s t e r m i n a l s . Goodchild  (1972, p. 18) has d e s c r i b e d s i t u a t i o n s i n which  each type of hardware i s the most a p p r o p r i a t e .  A compre-  hensive r e p o r t on g r a p h i c s hardware and software systems showing  samples  of output i s g i v e n i n S e c t i o n IV of  G e o g r a p h i c a l Data Handling (Tomlinson, 1972). 1.2.7  Computation  There are s e v e r a l u s e f u l computations on polygons which a p o l y g o n - o r i e n t e d system should p r o v i d e .  Simple  a l g o r i t h m s e x i s t f o r c a l c u l a t i n g the area of a polygon and i t s centroid difficult  (Dangermond, 1971, Appendix G).  and u s e f u l computation i s o v e r l a y .  The most Overlay i s  d e f i n e d as a method of combining two o r more maps coverages by p l a c i n g the coverages one on top of another t o c r e a t e a composite which c o n t a i n s a l l the i n f o r m a t i o n a v a i l a b l e i n each of the coverages. F i g u r e 1.6  shows an example of two coverages f o r  the same r e g i o n and the r e s u l t i n g o v e r l a y coverage. polygons i n the o v e r l a y coverage are found by  The  intersecting  21  the two s e t s of polygons  i n the o r i g i n a l coverages.  Since  each o f the o r i g i n a l polygons was homogeneous i n e i t h e r a s o i l type or a zoning a t t r i b u t e , each of the polygons i n the o v e r l a y coverage w i l l be homogeneous i n both a s o i l and a zoning a t t r i b u t e .  type  For t h i s reason we can use the  o v e r l a y coverage to answer composite  questions such as *  "Where are a l l the r e g i o n s w i t h a rocky s o i l t h a t a r e zoned f o r housing?" that could not be answered from e i t h e r  of the  o r i g i n a l coverages.  (The r e g i o n s w i t h the s p e c i f i e d charac-  t e r i s t i c s a r e shaded  i n F i g . 1.6).  of o v e r l a y — i t  H e r e i n l i e s the Importance  enables us t o r e l a t e d a t a from d i f f e r e n t  coverages.  S o i l Map  Zoning Map  I n t e r s e c t e d map w i t h s o i l and zoning codes f o r each polygon, and requested areas shaded i n .  F i g u r e 1.6  Two coverages and the r e s u l t i n g o v e r l a y coverage.  22  1.3  THE GRID VERSUS THE POLYGON APPROACH The p r e v i o u s s e c t i o n has d e s c r i b e d some o f the  implications  of the polygon approach to g e o g r a p h i c a l d a t a  processing.  However, there i s another approach which has  almost as much power and has p r o b a b l y been used m o r e — t h e g r i d approach.  Since most d e v e l o p e r s of a 2-dimensIonal  g e o g r a p h i c a l system w i l l e v e n t u a l l y have t o choose between a g r i d and a polygon system, i t i s u s e f u l to compare these two  approaches. The d i f f e r e n c e between the g r i d and polygon as a r e a l  u n i t s can be summarized  by a l o o k a t which elements are  f i x e d and v a r i a b l e i n each case.  In a g r i d system the a r e a l  u n i t i s f i x e d and the a t t r i b u t e i s v a r i a b l e , but i n a polygon system the a t t r i b u t e i s f i x e d and the a r e a l u n i t i s v a r i a b l e . In each case i t i s the v a r i a b l e element which must be d e t e r mined.  Another way of s a y i n g t h i s i s that i n a g r i d system  the d a t a i s bent to f i t i n t o the a r e a l u n i t , but i n a polygon system the a r e a l u n i t i s determined by the d a t a . To g i v e a b i a s e d analogy, i f one had s e v e r a l  insoluble  l i q u i d s i n a beaker the polygon approach would be t o use the natural  s e p a r a t i o n boundaries between the media, but the  g r i d approach would be to put i n a 3-dimensional mesh and d e a l w i t h the l i q u i d w i t h i n each cube, as shown l n F i g . 1.7.  23  A  6 c Polygon Approach F i g u r e 1.7  Grid  Approach  The g r i d and polygon approach to decomposing several l i q u i d s .  The d i f f e r e n c e s between g r i d and polygon systems are o u t l i n e d i n d e t a i l i n Table I . are  s i m p l e r f o r g r i d systems.  In g e n e r a l , computations For i n s t a n c e , o v e r l a y o n l y  i n v o l v e s r e t r i e v i n g matching g r i d squares i n a g r i d but i t e n t a i l s i n t e r s e c t i n g polygons i n a polygon  system,  system.  The s u i t a b i l i t y of each approach i n a g i v e n s i t u a t i o n depends not o n l y on the f u n c t i o n s wanted but a l s o on the nature of the data i t s e l f . or  For d a t a such as census  tracts  zoning areas which a r e a d m i n i s t r a t i v e l y d e f i n e d as non-  g r i d a r e a s , the polygons approach i s c l e a r l y more n a t u r a l . However, f o r d a t a such as s o i l type which i s e m p i r i c a l l y determined, a case can be made f o r e i t h e r approach on the r e s o l u t i o n d e s i r e d .  depending  I f the data v a r i e s w i d e l y over  an area the s i z e of the r e s o l u t i o n , the g r i d approach i s probably more f i t t i n g .  However, i f the data i s q u i t e homo-  geneous over l a r g e areas r e l a t i v e to the r e s o l u t i o n d e s i r e d , polygon encoding i s p r o b a b l y more s u i t a b l e . are  Thus polygons  u s u a l l y employed f o r urban s t u d i e s and g r i d s f o r r u r a l  s t u d i e s where the d e s i r e d r e s o l u t i o n i s c o a r s e r .  2k  TABLE I A COMPARISON BETWEEN GRID AND POLYGON SYSTEMS  G r i d System  Feature  Polygon System  more s u i t a b l e f o r heterogeneous d a t a  more s u i t a b l e f o r more homogeneous data w i t h e a s i l y determined boundaries  -Method commonly used  manual or automatic scanning  usually line following  -Accuracy  less  more  -Resolution  f i x e d to the grid size  variable within the l i m i t s of the hardware  easy  easy  easy  fairly  more  less  1) Data A c q u i s i t i o n  2) Data Encoding  3) E d i t i n g and Updating -Attributes -Locatlonal  Data  difficult  k) Storage Costs -Number o f Records - S i z e of each locatlonal record 5)  many p o i n t s usually 1 point  Retrieval -Sequential  easy  -Random  easy  must keep an index  -Neighbourhood  f a i r (can be calculated) fair  poor  25  TABLE I (cont'd.)  Polygon System  G r i d System  Feature 6) D i s p l a y -Device b e s t suited f o r  master d i s p l a y such as l i n e p r i n t e r  CRT, P l o t t e r  -Boundary P l o t s  poor  good  -Contour  good  poor  -Area C a l c u lations  trivial  easy  -Overlay  easy  difficult  less  more  Plots  7) Computation  8) O v e r a l l Costs f o r Software Development  Another f u n c t i o n which access t o the immediate  i s often  important i s the  neighbours of a g r i d or polygon.  example, one might be i n t e r e s t e d  i n the s u i t a b i l i t y of a  p a r t i c u l a r l o c a t i o n f o r a park l n comparison locations.  For  t o surrounding  I t i s r e l a t i v e l y easy t o l o c a t e the neighbours  of a g r i d square, but r e l a t i v e l y d i f f i c u l t a d j a c e n c i e s i n a polygon system.  to determine  One p o s s i b l e approach i s t o  s t o r e an adjacency graph w i t h every p o l y g o n a l map as shown i n Fig.  1.8, but t h i s i s not u s u a l l y c a r r i e d out.  26  F i g u r e 1.8  A s e t of polygons graph.  and the r e s u l t i n g  adjacency  (Polygon P^ and P j are adjacent I f and only If nodes P^ and P j In the graph are adjacent) One of the most important measure f o r comparison i s the r e l a t i v e f i l e of d a t a .  sizes  r e q u i r e d to capture the same f i d e l i t y  Assume t h a t data has been recorded and mapped to a  g i v e n accuracy.  I t w i l l be shown that the g r i d  r e q u i r e s more f i l e  approach  space t o encode the boundaries  to a given  accuracy d. Let  A be the average area of a polygon i n square i n c h e s .  on the map  Let  L be the average perimeter of a polygon on the map i n i n c h e s .  Let d inches be the maximum d i f f e r e n c e allowed between the o u t l i n e of a polygon and i t s encoding as g r i d or polygon. To achieve t h i s accuracy i n the g r i d system the g r i d s i z e must be no b i g g e r than d. Hence the number of g r i d squares to cover an average polygon must be at l e a s t A  27  In the polygon system I f p o i n t s are d i g i t i z e d a c c u r a t e l y every d inches along the boundary, there i s no way t h a t any p o i n t on the d i g i t i z e d polygon can be more than d inches o f f the o r i g i n a l l i n e . Hence a t most £ p o i n t s a r e r e q u i r e d to encode an average polygon t o accuracy d. Assume t h a t each g r i d square can be d e f i n e d by one point.  Table I I shows the c a l c u l a t e d and a c t u a l number o f  points required  t o encode a square on i t s s i d e to accuracy d  f o r various values  o f d.  (See  F i g u r e 1.9).  Observe that the  g r i d method r e q u i r e s f a r more p o i n t s . TABLE I I THE  NUMBER OF POINTS REQUIRED TO ENCODE A SQUARE ON ITS SIDE TO AN ACCURACY d BY THE GRID AND POLYGON METHOD NUMBER OF POINTS N Polygon Method G r i d Method Calculated  Accuracy d  N ,01  Actual  Actual  L  A "37  10,000  Cal.  10,200  400  Area A = 1 Length L=4  1  •5  100 4  120 4  40 8  4 4  28  To encode the square^ 4 p o i n t s are r e q u i r e d  GRID METHOD d=.l  To approximate the r e g i o n to .1 by the g r i d method r e q u i r e s 120 squares  To approximate the r e g i o n t o . 5 by the g r i d method r e q u i r e s 4 squares  F i g u r e 1.9  The approximation of a square by g r i d polygon methods.  and  29  A l l these comparisons have been somewhat s p e c u l a t i v e i n t h a t they are based measurements. 1.4  on experience but not on hard-core  F u r t h e r work l n t h i s area i s r e q u i r e d .  SYSTEMS OF AUTOMATED CARTOGRAPHY Whereas most g e o g r a p h i c a l systems are concerned  w i t h the a b i l i t y to r e t r i e v e , a n a l y z e , and p l o t  environmental  d a t a , automated cartography systems are concerned w i t h automating  mainly  primarily  the process of map-making.  One o f the main problems i n cartography  i s t h a t maps  may take s e v e r a l years t o produce and, by then, may be out of date. is  justified  maps. it  The use of the computer i n producing h i g h q u a l i t y maps  The usual approach i s t o encode the map data and s t o r e  on tape.  dated  by I t s ' , a b i l i t y t o more q u i c k l y update these  When changes are r e q u i r e d l a t e r the data i s up-  i n t e r a c t i v e l y , and then an up-to-date  map i s churned  out by the computer. Automated cartography systems d i f f e r o t h e r g e o g r a p h i c a l Information systems. q u a l i t y , very expensive  i n many ways from  F i r s t , they use high  ( i n the $100,000 range) f l a t b e d  p l o t t e r s known as d r a f t i n g u n i t s and other s p e c i a l i z e d ment.  Secondly,  equip-  s i n c e computer cartography r e q u i r e s a great  d e a l of I n t e r a c t i v e e d i t i n g , but l i t t l e computer p r o c e s s i n g , the usual c o n t r o l l e r i s a d e d i c a t e d mini-computer. other hand, the more u s u a l g e o g r a p h i c a l systems w i t h  On the their  30  l a r g e r volumes of data and a n a l y s i s requirements l a r g e r computer.  r u n on a  N e v e r t h e l e s s , the problems of d i g i t i z a t i o n ,  s t o r a g e , and g r a p h i c a l p r e s e n t a t i o n of g e o g r a p h i c a l data, are the same. Research i n the f i e l d  concentrates on improved  hard-  ware, and such problems as name placement, and new map forms. S e v e r a l advanced systems have been developed Canadian Hydrographic for  i n Canada.  The  S e r v i c e has begun using such a system  p r e p a r i n g n a u t i c a l c h a r t s of the c o a s t a l waters (Boyle,  1970), and the O n t a r i o Department of Highways i s experimenting w i t h a system f o r p r o d u c t i o n of highway maps (MacLeod, 1972). More d e t a i l e d d i s c u s s i o n s of these and other systems a r e g i v e n i n the l i t e r a t u r e  cartography  (Tomlinson,  1972,  Chapter  15; Peucker, 1972). 1.5  STATE OF THE ART Tomlinson (1972) notes t h a t i t has been very  "to  a c q u i r e an overview  difficult  o f the f i e l d and, t h e r e f o r e , evaluate  what has been accomplished  and what remains to be done."  has occurred because although  This  the techniques f o r g a t h e r i n g ,  s t o r i n g , a n a l y z i n g and d i s p l a y i n g data have become more and more advanced, t h e i r development has proceeded l a r g e l y i n separate d i s c i p l i n e s and d i v e r s e agencies between which there have been few channels  o f e f f e c t i v e communication.  r e s u l t has been repeated the-wheel phenomenon."  The  i n c i d e n t s of the " r e d i s c o v e r y - o f -  31  There have been s e v e r a l attempts  to a l l e v i a t e  this  s i t u a t i o n by p r o v i d i n g comprehensive reviews of the f i e l d . A survey o f g e o g r a p h i c a l systems f o r r e g i o n a l p l a n n i n g has been prepared  (U.S. Department of Housing,  1968).  UNESCO and  the I n t e r n a t i o n a l G e o g r a p h i c a l Union have a l s o sponsored two important conferences l n Ottawa. 1970 assembled  experts from around  The f i r s t conference i n the world t o examine the  s t a t e of the a r t and c l a s s i f y e x i s t i n g systems.  The p r o -  c e e d i n g s , p u b l i s h e d under the name, Environment Information Systems. (Tomlinson, 1970)» p r o v i d e a good i n t r o d u c t i o n t o the a r e a .  About t h i r t y systems were r e f e r r e d t o and c l a s s i -  f i e d a c c o r d i n g to t h e i r main f u n c t i o n as image systems (concerned w i t h mapping), r e t r i e v a l systems (concerned w i t h r e t r i e v a l , not mapping), or i n t e g r a t e d systems with both).  (concerned  A more comprehensive t e x t c o n s i s t i n g of 1,400  pages (and weighing 7 pounds) was prepared f o r the second conference i n 1972.  Geographical Data Handling, as i n d i -  cated by the number of r e f e r e n c e s to i t i n t h i s t h e s i s , has a l r e a d y e s t a b l i s h e d I t s e l f as a good r e f e r e n c e t e x t l n t h i s area. A c c o r d i n g t o t h i s t e x t , i n f o r m a t i o n systems developed i n the past have tended t o be s p e c i a l - p u r p o s e and emphasize s i n g l e techniques r a t h e r than being general-purpose and balanced.  Moreover, the course of development has been  i n f l u e n c e d too much by the technology that was a v a i l a b l e and too l i t t l e by the user requirements w i t h the r e s u l t that the  32  l e v e l of s o p h i s t i c a t i o n o f the hardware and software f a r exceeds the l e v e l of i n f o r m a t i o n use (see F i g . 1.10).  As  the f i g u r e a l s o shows, the computers and other s p e c i a l i z e d hardware such as p l o t t e r s , d i g i t i z e r s , and scanners a r e the most advanced f o l l o w e d c l o s e l y by system software, and then by user software.  What i s needed most from the software  angle are systems which are easy to use. We kept t h i s  firmly  i n mind i n d e s i g n i n g the GIDS system. 1.6 EXAMPLES OF EXISTING SYSTEMS There a r e many g e o g r a p h i c a l systems i n e x i s t e n c e which a r e s i m i l a r to GIDS i n t h e i r d i s p l a y and m a n i p u l a t i o n capabilities.  T h i s s e c t i o n d e s c r i b e s a few well-known  systems of both g r i d and polygon v a r i e t i e s t h a t can be u s e f u l to p l a n n e r s . 1.6.1  G r i d Systems  G r i d systems r e c o r d i n f o r m a t i o n about each s m a l l element of a map g r i d .  The s i z e of the g r i d determines the  l e v e l of d e t a i l of the data and hence the use to which that i n f o r m a t i o n can be put.  In g e n e r a l , the s i z e of the g r i d  should be s m a l l r e l a t i v e t o the study areas i n q u e s t i o n . SYMAP (Harvard, 1968) i s a well-known g r i d mapping  system  developed a t the Harvard L a b o r a t o r y f o r Computer Graphics and S p a t i a l A n a l y s i s .  I t i s q u i t e expensive to r u n but  p r o v i d e s f l e x i b l e g r a p h i c output on a l i n e p r i n t e r . l i n e p r i n t e r s a r e w i d e l y a v a i l a b l e and SYMAP i s w e l l -  Since  33  documented, w e l l - a d v e r t i s e d and r e l i a b l e , t h i s system Is probably the most w i d e l y used g e o g r a p h i c a l  information  system.  SUBSYSTEMS  Data Acquisition  Data  ELEMENTS  Collection Hardware System Software  Storage  User Software  Use  •  Definition  Innut and  Information  LEVEL OF DEVELOPMENT  Analysis  r  t —  •  Use  *Relative order of maqnitude (expressed as proportion development)  F i g u r e 1.10  The l e v e l o f development o f v a r i o u s phases of g e o g r a p h i c a l i n f o r m a t i o n systems. ( T h i s diagram was taken from G e o g r a p h i c a l Data Handling. (Tomlinson, 1972)).  34  Systems w i t h l a r g e r g r i d s i z e s are w e l l - s u i t e d to n a t u r a l r e s o u r c e s t u d i e s , but not to urban s t u d i e s .  The  NARIS ( N a t u r a l Resource Inventory System) system i s one such system t h a t i s to be used t o i n t e r r e l a t e  geological,  h y d r o l o g i c a l , f o r e s t r y , s o i l and l a n d use d a t a i n an a r e a of  Illinois.  Some of NARIS' good f e a t u r e s are i t s query  language, s e l f - t e a c h i n g o f t h i s query language, and o p t i m i z a t i o n of o b j e c t i v e f u n c t i o n s over a g i v e n r e g i o n 1.6.2  Polygon  (Denenberg).  Systems  The Map/Model System and the Canadian Geographic Information System of  (CGIS) are two of the e a r l i e s t prototypes  polygon p l a n n i n g systems.  S e v e r a l other systems have  been developed s i n c e which perform many of the same operat i o n s ; namely, GIMMS (Waugh) i n Edinburgh, PIOS (Dangermond, 197D  i n San Diego, NRIS (Boeing, 1972) i n S e a t t l e , and  GIDS i n Vancouver.  1.6.2.1  Map/Model System  The Map/Model system (Arms, 1968;  1970)  has been  developed d u r i n g the p a s t seven y e a r s by the Bureau of Governmental Research and S e r v i c e , U n i v e r s i t y of Oregon. I t i s a c o l l e c t i o n of powerful and independent modules which can be used i n concert i n any a p p r o p r i a t e manner. the  f u n c t i o n s performed a r e polygon o v e r l a y ,  Some of  statistical  summary, geographic r e t r i e v a l , and p l o t t i n g of maps.  35  Requests are made l n the form of PL/I programs, whereas most other systems have t h e i r own Perhaps,  query  language.  t h i s g i v e s Map/Model more power at the expense of  b e i n g harder to use.  Each data f i l e  is self-defining  means of a PL/I s t r u c t u r e entered by the user.  by  T h i s means  t h a t the user can r e f e r t o i n d i v i d u a l f i e l d s by name, but PL/I system programs must be recompiled definitions.  to i n c l u d e these  Under GIDS, on the other hand,  individual  f i e l d s can be named by the user and then r e f e r r e d  t o by name  without any r e c o m p i l a t i o n of programs. S e v e r a l of the Map/Model concepts  such as the  of p o i n t , and l i n e data as s p e c i a l cases of polygon have been adopted t i c a l summarization  i n GIDS.  treatment data  A l s o , t h e i r technique of s t a t i s -  has l a r g e l y a f f e c t e d  the GIDS method of  aggregation. Although Map/Model has been developed  to a high l e v e l  f o r a t l e a s t three y e a r s , i t s use has been s u r p r i s i n g l y I t has been used f o r p l a n n i n g of r e c r e a t i o n a l (Walters, 1970)  small.  programs  and by the c i t y of P o r t l a n d P l a n n i n g  Depart-  ment.  1.6.2.2  Canadian G e o g r a p h i c a l Information System  The Canadian G e o g r a p h i c a l Information System (CGIS) was  developed  and  IBM,  a t g r e a t expense by the Canada Land  (Tomlinson, 1967;  Inventory  Environment Canada, 1972)  but  because of l e g a l problems i t i s not g e n e r a l l y a v a i l a b l e .  36  It  i s a s o p h i s t i c a t e d system  q u e s t i o n s about use and  Intended  f o r answering  the Canada Land Inventory data base ( l a n d  i t s capability for agriculture, forestry, recreation,  wildlife  and watersheds).  Each coverage  of geographic data  i s s t o r e d as two data s e t s , the image data set (IDS) t a i n i n g the d e t a i l e d boundaries d e s c r i p t i v e data s e t s (DDS)  the  c o n t a i n i n g the a t t r i b u t e s , area,  and c e n t r o i d of the polygon. scheme because the DDS  of the polygon, and  con-  T h i s i s an e l e g a n t storage  can be used to answer most  Inquiries  and r e q u i r e s much l e s s p r o c e s s i n g than the a s s o c i a t e d IDS. Another of  s t r o n g f e a t u r e of the CGIS i s i t s wide range  selection criteria.  T h i s enables a user to work w i t h  the areas t h a t most n a t u r a l l y f i l l The  h i s needs.  scope of an i n q u i r y can be d e f i n e d by:  1) an a r b i t r a r y p o l y g o n — a l l land w i t h i n i t ; 2) an a r b i t r a r y c i r c l e , e.g., w i t h i n 50 miles of  Ottawa;  3) a census  unit;  k) a topographic map  sheet number;  5) an a d m i n i s t r a t i v e u n i t . There  is little 1.6.3  graphical  output.  Comparison of GIDS to Other Polygon Systems  As mentioned e a r l i e r , l a g s behind the technology. systems are hard to use.  the use of geographic  systems  T h i s i s l a r g e l y because these  37  GIDS performs many of the same f u n c t i o n s as Map/Model and CGIS, but i s E a s i e r to use because i t can be run a c t i v e l y and has a simple command language. has been i n p u t , one or manipulate  Once the data  can s i t down a t a t e r m i n a l and  display  any of the data without having to recompile  any programs, or grapple w i t h JCL. user to s i f t  inter-  I n t e r a c t i o n enables a  through h i s data base t e s t i n g hypotheses  e x p l o r i n g f o r meaningful  and  relationships.  A few other i n t e r a c t i v e polygon systems have been developed has  i n the l a s t few y e a r s .  In Edmonton, Deecker (1970)  implemented an I n t e r a c t i v e g r a p h i c s system w i t h o v e r l a y  to be used  i n s i t e l o c a t i o n planning.  At the U n i v e r s i t y of  B r i t i s h Columbia, Nake (1972) and Clement (1973) have developed  a system f o r m a n i p u l a t i n g urban d a t a i n s e t s using  s e t o p e r a t i o n s and  interactive graphics.  However, both  these  systems are r e s t r i c t e d to data bases small enough t o be kept i n core memory a t a l l times d u r i n g a run. knowledge of the author,  GIDS, to the best  i s the only i n t e r a c t i v e  g e o g r a p h i c a l i n f o r m a t i o n system t h a t can handle data  bases.  polygon-based large-scale  38  CHAPTER 2 INTRODUCTION TO GIDS In Chapter 1 the g e n e r a l problem a r e a of g e o g r a p h i c a l Information systems has been d i s c u s s e d and the s p e c i f i c problem area o f polygon p l a n n i n g systems has been d e s c r i b e d . Now i n Chapter  2 the s t r a t e g y adopted  i n d e s i g n i n g our own  polygon p l a n n i n g system, GIDS, w i l l be unfolded. The s e c t i o n s i n t h i s chapter e x p l a i n whom the system i s f o r and the r e s u l t i n g d e s i g n c r i t e r i a ( s e c t i o n 2.1), GIDS handles geographic d a t a ( s e c t i o n 2.2), GIDS performs  ( s e c t i o n 2.3),  how  the f u n c t i o n s  and how GIDS implements these  f u n c t i o n s on h i s d a t a a c c o r d i n g t o the c r i t e r i a mentioned ( s e c t i o n 2.4). ( s e c t i o n 2.5), (section  Then the command language i s i n t r o d u c e d and a sample o f the system use i s presented  2.6).  Every system i s designed w i t h three t h i n g s i n mindt a p a r t i c u l a r c l a s s o f u s e r s , p a r t i c u l a r types o f d a t a , and p a r t i c u l a r a p p l i c a t i o n s f o r t h i s data.  The success o f a  system may be measured i n terms o f how e a s i l y , how economically,  and how w e l l the users can perform these f u n c t i o n s on  t h e i r d a t a w i t h the system. N a t u r a l l y , t h e d e s i g n of GIDS has been l a r g e l y enced by the hardware a v a i l a b l e a t UBC.  influ-  There a r e two l a r g e  computers (duplex IBM 360/67) r u n n i n g under the Michigan  39  T e r m i n a l System ( C o u l t h a r d , 1970).  Jobs can be run  either  i n batch or from one of the many I n t e r a c t i v e t e r m i n a l s . G r a p h i c a l output can be d i r e c t e d o n - l i n e t o s e v e r a l d i f f e r e n t CRT  d e v i c e s or o f f - l i n e t o p e n - p l o t t e r s o r a dot p r i n t e r .  For d a t a i n p u t a manual d i g i t i z e r Is a v a i l a b l e . 2 . 1 DESIGN CRITERIA Since GIDS was d i s c i p l i n e s who  designed f o r users from a v a r i e t y of  were not computer s p e c i a l i s t s , the  two  primary d e s i g n c r i t e r i a were g e n e r a l i t y and ease of use by a non-programmer.  The f o l l o w i n g i s the complete l i s t of d e s i g n  criteria! 1.  The  system should be easy to use.  2. The  system should be problem  3. The  system should be usable  independent. interactively  or i n b a t c h . 4. The  system should be e a s i l y e x t e n d i b l e .  5. The system should emphasize g r a p h i c a l output. 6. The system should present a c l e a r v i r t u a l view of the d a t a base to both the user and the programmer. Easy t o  Use  Since the user need not be a programmer he should not have t o w r i t e programs t o use GIDS, but should be a b l e to address h i s r e q u e s t s i n an E n g l i s h - l i k e command Thus a command language was  designed  language.  f o r GIDS w i t h a l l the  u s u a l f e a t u r e s of any r e a s o n a b l e command language such as  40  powerful d e f a u l t s  and a b b r e v i a t i o n s as d e s c r i b e d by  Boettner (1970).  In GIDS an e f f o r t has been made t o keep  the  commands n a t u r a l , by q u e r y i n g the user f o r any  required  i n f o r m a t i o n which does not f i t n a t u r a l l y  the E n g l i s h o f the command.  into  Another f e a t u r e which  facilitates  system use i s the a b i l i t y t o name v a r i a b l e s and then r e f e r to them i n commands by these names. Problem  Independent  Since the system was t o serve a v a r i e t y o f u s e r s , i t would have to be problem independent or g e n e r a l purpose. GIDS was designed t o handle any g e o g r a p h i c a l d a t a whose l o c a t l o n a l component was o f two dimensions or l e s s .  Sam Arms  has e x p l a i n e d some of the requirements to achieve t h i s generality  (1970); General-purpose i m p l i e s a c a p a b i l i t y t o e a s i l y s p e c i f y d a t a formats and p r o c e s s i n g f o r a v a r i e t y of a p p l i c a t i o n s ; that i s , w i t h o u t r e w r i t i n g computer programs f o r each application. Program modules must accept data and u s e r - s p e c i f i c a t i o n s which vary w i t h i n l i m i t s , from one a p p l i c a t i o n to another.  To achieve t h i s end i n GIDS, d a t a i s accompanied  by  headers which d e f i n e the formats and user names. A l l programs use these d e f i n i t i o n s i n s t e a d assumptions  of making b u i l t - i n  on the nature of the d a t a .  Usable I n t e r a c t i v e l y or In Batch For  the sake o f g e n e r a l i t y  l t i s an advantage t o  p r o v i d e i n t e r a c t i v e or b a t c h use o f the system.  Are-  s e a r c h e r i n v e s t i g a t i n g h i s d a t a base and t e s t i n g  hypotheses  41  may p r e f e r the quick response  t h a t I n t e r a c t i o n permits.  However, a p r o d u c t i o n - o r i e n t e d user w i l l probably  find  b a t c h runs more s u i t a b l e because they a r e cheaper. E a s i l y Extendible Since the system d e s i g n e r s c o u l d never p r e d i c t a l l the f u n c t i o n s t h a t users might d e s i r e , i n the sake o f g e n e r a l i t y GIDS should be e a s i l y e x t e n d i b l e . l i z e d GIDS not as a "complete  w  We v i s u a -  system but r a t h e r as a  framework to which new commands c o u l d be added w i t h f a c i l i t y . ( S e c t i o n 3.4* o u t l i n e s the s t e p s one must f o l l o w to add a new command). Emphasize G r a p h i c a l Output Maps show the "where** as w e l l as the "how much" f o r geographical data.  A c c o r d i n g to a reoent S t a t i s t i c s Canada  r e p o r t (1972, p. 1 4 ) : Heading s t a t i s t i c a l d a t a from a map o f t e n has c o m p e l l i n g advantages over having the same i n f o r m a t i o n t a b u l a t e d i n r e p o r t form. I n s p e c t i o n o f the map can i n s t a n t l y show where the extreme values of some f u n c t i o n occur. A map can h i g h l i g h t problem areas at a g l a n c e . For t h i s reason  i t was d e c i d e d t o emphasize g r a p h i c a l  output and, i n p a r t i c u l a r , q u i c k and easy g e n e r a t i o n of maps.  For g r e a t e r f l e x i b i l i t y we adopted an approach t h a t  would f a c i l i t a t e of  g r a p h i c a l output on not j u s t one b u t many  the g r a p h i c s d e v i c e s a v a i l a b l e t o us a t UBC.  42  C l e a r View o f the Data Base In order f o r the system to be easy t o use and easy to evolve there should be a c l e a r and simple view of the d a t a base f o r the user and the programmer r e s p e c t i v e l y . 2.2  GIDS TREATMENT OF GEOGRAPHICAL DATA The b a s i c approach i s the polygon approach d e s c r i b e d  i n Chapter  1 where d a t a i s encoded by polygons,  l i n e s , or  p o i n t s over which i t i s assumed to be homogeneous. 2.2.1  The Two Components of G e o g r a p h i c a l Data  In Chapter  1, geographic data was c h a r a c t e r i z e d by  having a l o c a t i o n i d e n t i f i e r of the data element.  ( p o s i t i o n on the Earth) as p a r t  L i k e many other systems GIDS views geo-  g r a p h i c d a t a as b e i n g made up o f two components: l o c a t l o n a l d a t a and d e s c r i p t i v e d a t a (see F i g . 2.1). The l o c a t l o n a l d a t a c o u l d be the boundary o f a polygon, the path o f a l i n e , the p o s i t i o n o f a p o i n t , the a r e a , c e n t r o i d o r other d a t a items r e l a t e d t o a l o c a t i o n on the E a r t h .  Each l o c a t l o n a l  d a t a r e c o r d d e s c r i b e s one polygon, l i n e or p o i n t .  The  d e s c r i p t i v e data items a r e n o n - l o c a t i o n a l a t t r i b u t e s such as zoning codes, s o i l types, or census d a t a d e s c r i b i n g one l o c a t l o n a l data  item.  43  CROCK /PEAT  \ SAND  |  g e o g r a p h i c a l data  d e s c r i p t i v e data  ROCK PEAT  l o c a t i o n a l data  SAND ROCK  F i g u r e 2 . 1 The two components of g e o g r a p h i c a l d a t a . GIDS can handle any geographic d a t a whose l o c a t i o n a l component i s o f two dimensions  or l e s s .  As an example, i t  i s c u r r e n t l y b e i n g used by the Greater Vancouver R e g i o n a l D i s t r i c t t o e x p l o r e a data base c o n s i s t i n g o f land use, s o l i and zoning polygons  over the M e t r o p o l i t a n Vancouver a r e a .  I t i s a l s o b e i n g used by the Department o f F o r e s t r y a t UBC to study p o t e n t i a l r e c r e a t i o n s i t e s i n n o r t h e r n Columbia based points.  British  on a wide v a r i e t y o f a t t r i b u t e s observed a t  However, there i s no mechanism f o r h a n d l i n g 3-  dimensional data.  T o p o g r a p h i c a l d a t a c o u l d be handled by  c o n s i d e r i n g the z-value o f a p o i n t as an a t t r i b u t e  (descrip-  t i v e data) d e s c r i b i n g the (x,y) p o i n t , but the a l t i t u d e  44  c o u l d not be t r e a t e d as p a r t of the l o c a t l o n a l d a t a element. 2.2.2  P o i n t s , L i n e s , and  Polygons  Under GIDS a l o c a t l o n a l d a t a element may l i n e , or polygon.  be a p o i n t ,  Our experience w i t h geometry has taught  us t h a t a l l t h r e e are e s s e n t i a l l y d i f f e r e n t , b e i n g o f a d i f f e r e n t dimension.  However, as Sam  Arms (1968, p. 2) has  p o i n t e d out, l i n e s and p o i n t s can be t r e a t e d as s p e c i a l oases of a polygon.  A l i n e i s a polygon o f no width and a p o i n t i s  a polygon of no w i d t h or l e n g t h .  More important, t h e r e i s  r a r e l y a need t o d i s t i n g u i s h between a p o i n t , l i n e and a polygon by GIDS.  Thus, f o r the sake of b r e v i t y , the g e n e r i c  term "polygon" i s o f t e n used by the author t o r e f e r to a p o i n t , l i n e , or polygon. . 2.2.3  Encoding Schemes  There a r e three p r i n c i p a l methods f o r encoding polygons. These are xy c o o r d i n a t e boundary and s k e l e t o n encoding.  encoding, c h a i n encoding,  The d e t a i l s of each encoding scheme  are not g i v e n here as they appear i n many o t h e r p l a c e s (Deecker, 1972;  Peucker, 1972).  f o r the major work i n t h i s a r e a .  Gordon Deecker  i s responsible  He compared the s u i t a b i l i t y  of each scheme f o r p e r f o r m i n g v a r i o u s f u n c t i o n s and found that no one method was  the most s u i t a b l e over all»  An important c o n c l u s i o n i s t h a t the c h o i c e of method i s , or should be, very much dependent on which f u n c t i o n s of d a t a m a n i p u l a t i o n are r e q u i r e d i n the a p p l i c a t i o n c o n s i d e r e d .  45  Boundary encoding was  chosen f o r two reasonst  the s i m p l e s t to Implement (the d i g i t i z e r a l r e a d y x-y c o o r d i n a t e s ) , and the s i m p l e s t t o p l o t r e q u i r e d x-y  produced  (plotting  coordinates).  The boundary  encoded  r e p r e s e n t a t i o n of a p o i n t ,  or a polygon Is a l i s t o f xy c o o r d i n a t e p a i r s . a polygon Is d o s e d the l a s t p o i n t .  line  The f a c t t h a t  Is I n d i c a t e d by the f i r s t p o i n t e q u a l l i n g  Given an xy c o o r d i n a t e l i s t  I t Is easy t o  I d e n t i f y the element as a p o i n t , l i n e or polygon. list  I t was  has only one p o i n t the element Is a p o i n t .  I f the I f the  first  p o i n t equals the l a s t p o i n t the element Is a polygon. Otherwise I t i s a l i n e  (see P i g . 2.2).  POLYGON A y  Point P  (0,0)  x  L o c a t i o n a l d a t a element P L  A F i g u r e 2.2  xy boundary  encoding  (1,2) (3,4) (5,7)  (6,4)  (13,2) (13,7) (18,7)  (8,2)  (18,2)  (13,2)  The boundary encoded r e p r e s e n t a t i o n o f a p o i n t , l i n e and polygon.  46  2.3  FUNCTIONS OF THE SYSTEM GIDS has the c a p a b i l i t y t o perform the f o l l o w i n g  functions t 1.  Input o f p o i n t , l i n e , o r polygon d a t a and the a s s o c i a t e d a t t r i b u t e s using f l e x i b l e f o r m a t t i n g .  2.  Conversion of d i g i t i z e r c o o r d i n a t e s t o a userspecified grid.  3.  C a l c u l a t i o n o f area and c e n t r o i d o f polygons, and l e n g t h o f l i n e s .  4.  P l o t t i n g o f d i g i t i z e d map and u s e r - s p e c i f i e d a t t r i b u t e s t o check f o r e r r o r s .  5. C r e a t i o n o f f i l e s which are s e l f - d e f i n i n g - i n format and a t t r i b u t e names. 6.  Numeric s e l e c t i o n o f the p o r t i o n o f a f i l e whose a t t r i b u t e s s a t i s f y an a r b i t r a r y l o g i c a l expression.  7. S e l e c t i o n from a l o c a t l o n a l f i l e on the b a s i s of the presence or absence o f a s s o c i a t e d des c r i p t i v e records. 8. Drawing a s e l e c t e d p o r t i o n of a f i l e on a v a r i e t y of g r a p h i c d e v i c e s w i t h a v a r i e t y o f symbolism. F a c i l i t i e s are i n c l u d e d f o r superimposing maps, shading polygons, drawing a t t r i b u t e v a l u e s a t the polygon o e n t r o i d s , and s y m b o l i z i n g w i t h t r i a n g l e s and o t h e r geometric symbols. 9.  I n t e r s e c t i n g s e l e c t e d p o r t i o n s o f two p o l y g o n a l f i l e s and w r i t i n g the polygons o f i n t e r s e c t i o n into a third f i l e .  10.  Aggregating the i n t e r s e c t e d polygon f i l e t o produce new a t t r i b u t e s a s s o c i a t e d w i t h the o r i g i n a l polygons t h a t were i n t e r s e c t e d .  11.  S t a t i s t i c a l summarization o f a f i l e a c c o r d i n g t o f l e x i b l e user s p e c i f i c a t i o n s .  12. Output o f a s e l e c t e d p o r t i o n o f a f i l e  47  2.4 INTRODUCTION TO THE IMPLEMENTATION 2.4.1 Any  B a s i c Method o f Operation o f t h e f u n c t i o n s d e s c r i b e d l n the previous  s e c t i o n can be t r i g g e r e d by e n t e r i n g a command In the GIDS command language. before  Each command Is I n t e r p r e t e d and executed  the next command Is r e a d .  Data i s Input t o GIDS  where I t Is s t o r e d l n s e q u e n t i a l f l i e s . A f l o w c h a r t showing the b a s i c steps f o l l o w e d a GIDS r u n appears l n F i g u r e 2.3.  during  The s u p e r v i s o r program  reads a command and checks t h a t I t s f i r s t word Is a v a l i d oommand name.  I f so, a command r o u t i n e I s c a l l e d  the e x e c u t i o n o f the command.  to complete  T h i s r o u t i n e determines the  files  to be read from the command s t r i n g , then reads  these  flies  s e q u e n t i a l l y w i t h r e c o r d s from the Input f l i e s  being  s e l e c t e d f o r p r o c e s s i n g o r r e j e c t e d on the b a s i s o f c r i t e r i a specified  by t h e u s e r l n the command.  of t h e f i l e the process to the s u p e r v i s o r .  Upon r e a d i n g the end  D  I s terminated  and c o n t r o l Is r e t u r n e d  A t t h i s p o i n t , the process begins  again  w i t h the s u p e r v i s o r a s k i n g the user t o enter h i s next command, and w a i t i n g f o r I t .  The r u n Is terminated  by the user  e n t e r i n g a STOP command. 2.4.2 S e q u e n t i a l F i l e  Processing  In the ASAP l n t r o d u c t o r r e p o r t Conway e t a l (197D c h a r a c t e r i z e d s e q u e n t i a l f i l e p r o c e s s i n g systems as having!  48 Start  V  READ USER COMMAND  v. S INVALID "^\COMMAND/  CALL THE APPROPRIATE COMMAND ROUTINE INITIALIZE (1) SCAN COMMAND! (2) OPEN FILES READ THE NEXT RECORD  Yes  PROCESS THE RECORD  RELEASE THE RECORD  TERMINATE THE COMMAND Figure 2.3  S t r u c t u r e o f a GIDS r u n  4f>  1) a s i n g l e master  file,  2) r e c o r d s organized s e q u e n t i a l l y — t h a t i n c r e a s i n g order o f a k e y M  M  i s , in  value,  3) a s i m i l a r p r o c e s s i n g task f o r each r e c o r d . ASAP Is one example o f such a system. s a t i s f i e s these l a s t file  two c h a r a c t e r i s t i c s , I t Is a s e q u e n t i a l  p r o c e s s o r of s o r t s .  However, In a GIDS r u n , each command  may process more than one s e q u e n t i a l f i l e , commands  Since GIDS  and d i f f e r e n t  l n the same r u n may process d i f f e r e n t f l i e s .  t h e l e s s , viewing GIDS as a s e q u e n t i a l f i l e lend c l a r i t y  prooessor  Nevershould  t o I t s o p e r a t i o n f o r both a user and a GIDS  programmer. 2.4.3  Program S t r u c t u r e o f GIDS  The components o f the GIDS system can b e s t be I l l u s t r a t e d by a M o c k diagram, (see F i g . 2.4). The l a r g e box d e l i n e a t e s the boundary of the system.  I n t e r f a c i n g the  system w i t h the e x t e r n a l world are the Inputs, the data base and the outputs. from the user.  The Inputs a r e the commands and the maps The geographic d a t a base, s t o r e d on d i s k or  tape, Is the f i n a l e d i t e d v e r s i o n o f t h i s d a t a t h a t has passed  through the input subsystem of GIDS.  L a s t l y , the  outputs a r e e i t h e r g r a p h i c or t a b u l a r r e s u l t s produced by GIDS command r o u t i n e s . W i t h i n the system boundary the f o u r most  Important  modules are the s u p e r v i s o r , the command r o u t i n e s , the s e l e c t o r r o u t i n e s and the I/O r o u t i n e s .  The s u p e r v i s o r  50  initializes  the system, reads In user commands, and then  passes c o n t r o l to the a p p r o p r i a t e command r o u t i n e accepts It,  and executes I t .  of the GIDS commands.  command r o u t i n e s .  the user command s t r i n g ,  A  Interprets  There I s one command r o u t i n e f o r eaoh The s e l e c t i o n r o u t i n e s determine from  the command s t r i n g the subset  o f a g i v e n f i l e t o be s e l e c t e d  and  filter  out those r e c o r d s which are o u t s i d e t h a t scope.  The  I/O r o u t i n e s read or w r i t e GIDS s e q u e n t i a l f l i e s , one  r e c o r d a t a time. 2.4.4  Memory S t r u c t u r e o f a GIDS r u n  GIDS Is a l a r g e system c o n s i s t i n g o f many programs coded by s e v e r a l people.  While GIDS was s t i l l  stage a l l these programs used to be loaded at  the same time.  In an e a r l y  Into core memory  T h i s r e q u i r e d about 200,000 bytes on an  IBM/36O and r e s u l t e d l n the v i r t u a l memory c o s t being about h a l f the t o t a l c o s t of a r u n a t a t e r m i n a l . being  taxed  The user was  h e a v i l y f o r those Important pauses to ponder some  r e s u l t or s c r a t c h h i s head. The by  amount o f v i r t u a l memory r e q u i r e d was c u t l n h a l f  Implementing dynamic l o a d i n g of the command r o u t i n e s and  dynamlo storage  a l l o c a t i o n o f data t a b l e s .  The s u p e r v i s o r ,  s e l e c t o r and 1/0 r o u t i n e s were kept r e s i d e n t l n core they a r e used d u r i n g most commands. entered  the s u p e r v i s o r d y n a m i c a l l y  since  When a command was  loaded  the a p p r o p r i a t e  command r o u t i n e from d i s k , executed I t and then unloaded I t .  TABULAR INPUT  51  MAPS  USER »-  COMMAND LANGUAGE  SUPERVISOR  MANIPULATION COMMANDS  INPUT COMMANDS  GRAPHICS COMMANDS  COMMAND ROUTINES  SELECTOR  ROUTINES 1  —  ~  *  t/O ROUTINES  -  ft: GEOGRAPHIC  % X  DATA BASE  TABULAR OUTPUT  GRAPHIC OUTPUT  F i g u r e 2.4  B l o c k diagram o f GIDS  52  Thus, each command r o u t i n e occupies it  core storage only  while  i s executing. F i g u r e 2.5 shows a map of core memory used by GIDS  during a t y p i c a l run. A i s the r e g i o n permanently r e s i d e n t . B i s the r e g i o n where a command r o u t i n e r e s i d e s w h i l e b e i n g executed. T h i s space i s r e l e a s e d i n between commands. C i s the r e g i o n where l o c a l f i l e t a b l e s , headers, etc., a r e s t o r e d . T h i s space i s r e l e a s e d a t the end o f each command. D i s the r e g i o n where t h e geographic data i s s t o r e d w h i l e i t i s b e i n g processed. Usually this c o n s i s t s of one r e c o r d f o r each f i l e being processed. *• 2.4.5  Implementation Language  S e v e r a l languages were considered  f o r programming the  system; namely, PL/1, FORTRAN, and ASSEMBLER. most powerful  PL/1 i s the  and the most expensive o f the t h r e e .  ASSEMBLER  produces the most e f f i c i e n t o b j e c t programs, but i s more d i f f i c u l t t o program than e i t h e r PL/1 or FORTRAN.  FORTRAN  programs a r e e a s i e r t o code and l e s s expensive than PL/1 programs b u t a r e l e s s powerful so expensive, and ASSEMBLER.  l t was d e c i d e d - t o  i n some areas.  Since PL/1 was  use a combination of FORTRAN  The I/O and s e l e c t o r r o u t i n e s which must be  executed f r e q u e n t l y were w r i t t e n i n ASSEMBLER, as were the c h a r a c t e r h a n d l i n g and l i n k e d l i s t r o u t i n e s .  Most o f the  other procedures were w r i t t e n i n FORTRAN.  •'•The most notable e x c e p t i o n i s the INTERSECT command as w i l l be e x p l a i n e d i n s e c t i o n 4 . 3 .  53  A REGION  CONTENTS  WHEN SPACE IS FREED  REGION SIZE IN PAGES  B  RESIDENT REGION  PROGRAM REGION  GIDS s u p e r v i s o r I/O r o u t i n e s selector routines commonly used u t i l i t y routines global tables  the command routine currently executing  a t the end o f the r u n  a t the end of the command  28  0-25  C FILE TABLES REGION  f i l e tables headers  a t the end of the command  0-3  resident f o r decreasing p e r i o d s o f time — F i g u r e 2.5  A map o f core memory d u r i n g a GIDS r u n  D DATA REGION  one polygon from each active file  when processing of the polygon Is complete  0-2  54  2.5  INTRODUCTION TO THE COMMAND LANGUAGE The g e n e r a l syntax o f a GIDS command Is a commandname,  f o l l o w e d by one o r more filenames  ( t o perform  the o p e r a t i o n  on), f o l l o w e d by parameters ( t o c o n t r o l the o p t i o n s ) .  Most  parameters a r e o p t i o n a l and have pre-asslgned d e f a u l t s . Some commands do n o t c o n t a i n a l l the i n f o r m a t i o n they r e q u i r e f o r the a p p r o p r i a t e p r o c e s s i n g .  A f t e r e n t e r i n g these  commands the user Is q u e r i e d f o r the r e q u i r e d Information and o n l y a f t e r he has s u p p l i e d I t i s the command The  executed.  command syntax and semantics a r e o u t l i n e d i n  Appendix A and, In more d e t a i l , i n the GIDS Command Manual (Yen, 1972).  Meanwhile, a few simple command s e s s i o n s w i l l  be g i v e n l n the next s e c t i o n . 2.6  SAMPLE OF SYSTEM USE T h i s s e c t i o n presents a , r e a l example o f what GIDS has  done f o r planners showing .the commands r e q u i r e d t o perform these o p e r a t i o n s . Appendix C.  More d e t a i l e d examples a r e g i v e n l n  Planners  a t the Greater Vancouver R e g i o n a l  D i s t r i c t have been concerned w i t h zoning and l a n d use and r e l a t i o n s between the two In the Vancouver a r e a .  Some p a r t i -  c u l a r r e q u e s t s have been* 1.  To o b t a i n the land use breakdown by area w i t h i n given regions;  2. To p l o t maps o f r e g i o n s w i t h s p e c i f i e d or l a n d use c h a r a c t e r i s t i c s ;  zoning  55  3. To l o c a t e r e g i o n s o f j o i n t zoning and l a n d use characteristics. Before GIDS can s e r v i c e these r e q u e s t s the r e q u i r e d geographic d a t a must pass through the Input system.  The  stages Involved a r e map and menu p r e p a r a t i o n , d i g i t i z a t i o n , e d i t i n g , lnputlng, p l o t t i n g , conversion to u s e r - s p e c i f i e d c o o r d i n a t e system, c a l c u l a t i o n o f areas, and output t o final  flies. The l a n d use maps were prepared by combining  gross  l e v e l a e r i a l photographs w i t h d e t a i l e d l e v e l l a n d use map d a t a on a s e r i e s o f base maps. fully 1972).  The process Is d e s c r i b e d more  i n t h e H P S Land C l a s s i f i c a t i o n Subgroup Report  (George,  Using a base map the polygons were t r a c e d onto a  transparency w i t h t h e i r l a n d use code.  Then these  were d i g i t i z e d , e d i t e d , Input, and p l o t t e d  polygons  (see F i g . 2.6).  We now show the commands t o Input t h i s d i g i t i z e d l a n d use map to GIDS.  Assume the d i g i t i z e d polygons  have been  s t o r e d l n the MTS f i l e LANDUSE and the menu Is i n the f i l e MARVsMENU b e f o r e we begin the f i r s t are c a p i t a l i z e d  session.  (The commands  below).  F i r s t session* #RUN GIDSJ1.0 loads the GIDS system  and begins I t s e x e c u t i o n  INPUT LANDUSE TO LANDUSE.I MENU=MARVtMENU reads the d i g i t i z e d polygons from the f i l e LANDUSE, does some computation, w r i t e s the d a t a o u t i n i n t e r m e d i a t e f i l e LANDUSE.I  56  PLOT LANDUSE.I NOAXIS produces a hard copy p l o t w i t h the codes. (See Appendix D f o r a legend of the c o d e s ) . STOP t e r m i n a t e s the r u n Then the output p l o t i s compared w i t h the o r i g i n a l map, and i f they concur t o the d e s i r e d accuracy the d a t a i s initialized below.  to i t s f i n a l  Otherwise  form as shown i n the second s e s s i o n  the e r r o r s a r e e d i t e d i n LANDUSE and the  f i r s t session i s repeated.  Second s e s s i o n : #BUN GIDS:1.0 CREATE (LANDUSE.R,LANDUSE.G) c r e a t e s the f i l e s and w r i t e s header i n f o r m a t i o n i n them INITIALIZE LANDUSE.I to (LANDUSE.R,LANDUSE.G) reads the d a t a from LANDUSE.I c o n v e r t s i t to a more compaot format and w r i t e s i t out i n t o the f i n a l f i l e s LANDUSE.R and LANDUSE.G Assume the zoning map has passed through the same i n p u t process and has been s t o r e d i n f i l e s ZONING.R and ZONING.G.  We now show the commands t h a t generate the r e q u i r e d  Information.  Third session: LIST  (LANDUSE.R,LANDUSE.G) p r i n t s the contents of the f i l e s i n c l u d i n g the areas and l a n d use o f each polygon. From t h i s the t o t a l a r e a o f each l a n d use type can be determined ( r e q u e s t #1).  57  DRAW (LANDUS E. R,LANDUS E.G) SCOPE=(LANDUSE=40) draws a map o f those r e g i o n s w i t h a s p e c i f i e d l a n d use (request #2) CREATE (INT.R,INT.G) c r e a t e f l i e s t h a t w i l l c o n t a i n the o v e r l a y coverage INTERSECT  (LANDUSE.R,LANDUSE.G)  WITH  (ZONING.R,ZONING.G) AND STORE IN (INT.R,INT.G) I n t e r s e c t the l a n d use and zoning polygons and s t o r e s the r e s u l t s In INT.R and INT.G DRAW (INT.R,INT.G) SCOPE=(LANDUSE=40 ZONING < 10) l o c a t e s r e g i o n s o f j o i n t landuse and zoning c h a r a c t e r i s t i c s (request #3). STOP terminates  the r u n  T h i s completes our I n t r o d u c t i o n t o GIDS. a more d e t a i l e d study o f the system  **#«*«*  We now begin  58  CHAPTER 3 FOUNDATIONS OF THE SYSTEM From a systems p o i n t o f view l t i s u s e f u l t o d i s t i n g u i s h between f o u n d a t i o n elements and non-foundation elements o f GIDS.  The f o u n d a t i o n elements a r e those  elements upon which the system Is b u i l t to  be important  and which continue  i n f u t u r e e x t e n s i o n s t o the system.  I n GIDS  the f i l e s t r u c t u r e s and the methods f o r a c c e s s i n g these f i l e s c o n s t i t u t e the two primary foundation  elements.  Chapter  3 d e s c r i b e s these f o u n d a t i o n elements i n some  detail,  and Chapter 4 goes on t o speak of the other com-  ponents o f the system. There a r e f o u r p a r t s t o t h i s chapter, d e s c r i b i n g i n t u r n the f i l e s t r u c t u r e s , s e l e c t i o n , the input/output s t r u c t u r e s , and f i n a l l y  the steps f o r programming a new  command u s i n g these f o u n d a t i o n 3.1  elements.  FINAL F I L E STRUCTURES 3.1.1 The  Introduction . final file  s t r u c t u r e s a r e the core of GIDS.  They  are the b a s i c u n i t s upon which a l l the g r a p h i c s and a n a l y s i s commands operate. GIDS employs s e v e r a l d i f f e r e n t f i n a l f i l e  structures,  but a l l a r e s e q u e n t i a l and c o n s i s t o f the same two b a s i c i n g r e d i e n t s : a header f o l l o w e d by a l i s t o f d a t a r e c o r d s .  59  (See P i g . 3.0 f o r an i l l u s t r a t i o n o f t h i s s t r u c t u r e ) . The header r e c o r d s c o n t a i n i n f o r m a t i o n g l o b a l t o the whole  file,  whereas each d a t a r e c o r d c o n t a i n s i n f o r m a t i o n about one polygon  only.  The f i r s t f i e l d  the r e c o r d as header o r d a t a .  i n every r e c o r d  identifies  The next secions w i l l d i s c u s s  in d e t a i l the d a t a r e c o r d s and then the header r e c o r d s . header r e c o r d s a GIDS final data  file  reoords  J F i g u r e 3.0 3.1.2  The two types o f r e c o r d s i n a GIDS f i l e , L o g i c a l Data S t r u c t u r e f o r One Polygon  From a l o g i c a l p o i n t of view there a r e three b l o c k s of  Information  f o r each polygon:  the d e s c r i p t i v e d a t a , the  boundary c o o r d i n a t e s , and the dimensioning  (see F i g . 3»D«  The d e s c r i p t i v e data and boundary c o o r d i n a t e s have been d e s c r i b e d i n Chapter 2.  60  boundary coordinates  F i g u r e 3.1  The l o g i c a l d a t a s t r u c t u r e of a polygon.  The dimensioning i s d e f i n e d as s e v e r a l items such as a r e a , minimal bounding r e c t a n g l e , and c e n t r o i d  which  c h a r a c t e r i z e the dimensions and p o s i t i o n of a l o c a t l o n a l d a t a element.  Although these dimensioning items can be  c a l c u l a t e d from the boundary  c o o r d i n a t e s , they are used  s u f f i c i e n t l y o f t e n to m e r i t s t o r i n g them e x p l i c i t l y w i t h the  polygon.  Definition I  The minimal bounding r e c t a n g l e or envelope of a polygon i s d e f i n e d as the s m a l l e s t r e c t a n g l e t h a t e n c l o s e s the polygon w i t h s i d e s p a r a l l e l to the x and y axes (see F i g . 3»2).  61  F i g u r e 3.2  The minimal bounding r e c t a n g l e o f a l i n e and polygon.  The minimal bounding r e c t a n g l e i s u s e f u l because i t g i v e s the maximum extents o f the polygon and may  serve as an  approximation to the polygon, and y e t can be s p e c i f i e d comp l e t e l y by f o u r v a r i a b l e s . Slnoe p o i n t s and l i n e s are t r e a t e d as s p e c i a l cases of polygons and are to have the same d a t a s t r u c t u r e , corresponding dimensioning items must be e s t a b l i s h e d f o r p o i n t s and Table I I I shows t h i s correspondence.  lines.  Take note t h a t the item  used to measure s i z e i s d i f f e r e n t f o r polygons of d i f f e r e n t dimensions.  Area i s used f o r the s i z e of a 2-dimensional  polygon, l e n g t h i s used f o r the s i z e of a 1-dimensional p o l y gon, and 0 i s used f o r the s i z e o f a O-dlmensional polygon. Polygons do have p e r i m e t e r s as w e l l as a r e a , but i n most a p p l i c a t i o n s , one i s more concerned w i t h the a r e a than w i t h the p e r i m e t e r .  62  TABLE I I I THE DIMENSIONING ITEMS AND THEIR USES FOR POINTS, LINES AND POLYGONS USE  POINT  (1) L o c a t i o n o f centre point  for plotting labels  on o r near the p o i n t  (2) S i z e  used i n overlay and f o r reports  0  (3) Envelope  used t o see i f 2 polygons intersect  LINE  POLYGON  near the midpoint of the line  within the polygon  the length  the a r e a  S e v e r a l a d d i t i o n a l l o c a t l o n a l items such as the number of  c o o r d i n a t e s i n the polygon were i n c l u d e d i n the dimensioning  b r i n g i n g the number of dimensioning items t o twelve. Appendix B f o r a complete  (See  list).  Although not a l l of the dimensioning items a r e always used, i t was d e c i d e d to always s t o r e a l l 12 items w i t h each polygon.  This s a c r i f i c e d  data structures.  some f l e x i b i l i t y but s i m p l i f i e d the  We o r i g i n a l l y planned t o use a more compact  d a t a s t r u c t u r e f o r p o i n t data s i n c e most o f the dimensioning i n f o r m a t i o n i s a l r e a d y p r o v i d e d by the c o o r d i n a t e s o f the point i t s e l f .  However, as we expected t o d e a l r a r e l y w i t h  p o i n t d a t a and wished  to t r e a t a p o i n t as a s p e c i a l case of a  polygon, we e v e n t u a l l y d e c i d e d on the l e s s oompact d a t a s t r u c t u r e t h a t we were u s i n g f o r p o l y g o n a l d a t a .  63  W i t h i n one GIDS f i l e  every d e s c r i p t i v e d a t a element  must c o n t a i n the same a t t r i b u t e s , but t h e r e may be more than one d e s c r i p t i v e d a t a element f o r one polygon.  This  occurs when there a r e s e v e r a l o b s e r v a t i o n s o f the same a t t r i b u t e s f o r the same polygon.  For example, i f the p o l y -  gons were census t r a c t s , and these had not changed d u r i n g the l a s t  three census,  then we could r e p r e s e n t census d a t a  as three d e s c r i p t i v e r e c o r d s ( p o p u l a t i o n data) f o r each l o c a t l o n a l r e c o r d (census t r a c t ) , as shown belowi Census T r a c t  3.1.3  Year  Total Population  1961  8,501  1966  9,203  1971  10,740  1961  5,^86  1966  8,921  1971  9,562  P h y s i c a l Data S t r u c t u r e of One Polygon  For v a r i o u s reasons  i t was decided to s t o r e the  d e s c r i p t i v e data and boundary c o o r d i n a t e s i n two separate f i l e s — a d e s c r i p t i v e f i l e and a l o c a t l o n a l f i l e .  The f i r s t  q u e s t i o n t h a t arose was where to s t o r e the d i m e n s i o n i n g — w i t h the d e s c r i p t i v e d a t a or w i t h the c o o r d i n a t e s ? sense, the a r e a and other dimensioning  items  provide  d e s c r i p t i v e i n f o r m a t i o n about the polygon and thus w i t h the other d e s c r i p t i v e d a t a .  In one  belong  Only the boundary c o -  o r d i n a t e s a r e l o c a t l o n a l d a t a i n the p u r e s t sense.  On the  64  o t h e r hand, there a r e three good reasons f o r s t o r i n g the dimensioning  i n the same f i l e  as the boundary c o o r d i n a t e s .  F i r s t , s i n c e the dimensioning i s e i t h e r d i g i t i z e d  together  w i t h the c o o r d i n a t e s or c a l c u l a t e d from the c o o r d i n a t e s , i t i s a v a i l a b l e a t the time the c o o r d i n a t e s a r e i n p u t .  However,  the dimensioning i s not n e c e s s a r i l y a v a i l a b l e a t the time the a t t r i b u t e s a r e Input.  Secondly, I t makes e d i t i n g e a s i e r .  I f a polygon boundary Is e d i t e d , some of the dimensioning Items, such as the a r e a , w i l l also.  probably have t o be changed  I f the dimensioning Is l n the l o c a t i o n a l f i l e ,  changes can be made w i t h i n t h a t f i l e can be l e f t  untouched.  a l l the  and the d e s c r i p t i v e  file  L a s t l y , I f there a r e s e v e r a l d e s c r i p -  t i v e f l i e s f o r one l o c a t i o n a l f i l e ,  I t Is more compact t o  s t o r e the dimensioning l n the l o c a t i o n a l f i l e . dimensioning can be s t o r e d once, not many times.  T h i s way the Our con-  c l u s i o n was to p l a c e the dimensioning w i t h the boundary coordinates. Now we have the p h y s i c a l data s t r u c t u r e f o r one p o l y gon.  There i s a d e s c r i p t i v e r e c o r d and a l o c a t i o n a l r e c o r d .  The l o c a t i o n a l r e c o r d c o n s i s t s o f the dimensioning f o l l o w e d by boundary c o o r d i n a t e s (see F i g . 3»3)«  65  Land use code=40 Polygon # =5  descriptive record The 1  locatlonal record  i  5 ;cx,c  i yi  1— —  i  i—  , •  a b c d e a  r  dimensioning Figure  3.3 The  boundary  which uniquely  is  The  and  the  i s e s t a b l i s h e d through t h e i r  polygon number i s a sequence number  i d e n t i f i e s a p o i n t , l i n e or polygon w i t h i n i t s  I t i s the f i r s t f i e l d  The  polygon.  correspondence between a l o c a t l o n a l r e c o r d  equal polygon numbers.  scriptive  coordinates  P h y s i c a l d a t a s t r u c t u r e f o r one  associated d e s c r i p t i v e records  file.  Polygon  i n both the l o c a t l o n a l and  de-  records. p h y s i c a l data s t r u c t u r e d e s c r i b e d  in this section  the view of the data base t h a t i s presented to a l l GIDS  processing  r o u t i n e s by the  I/O  routines.  the d a t a on the f i l e w i l l be d e s c r i b e d 3.1.4 The  S p l i t and  d e s c r i p t i v e and  in Section  l o c a t l o n a l records  structures.  distinct files  (a d e s c r i p t i v e f i l e and  r e s p e c t i v e l y ) or they may  described  be organized p h y s i c a l l y i n t o  different f i l e  Thus, there  a c t u a l format of  Merged F i l e s  the p r e v i o u s s e c t i o n may  file).  The  They may  be w r i t t e n  be w r i t t e n  into  two two  a locatlonal f i l e  i n t o one  file  are three d i f f e r e n t f i n a l f i l e  the d e s c r i p t i v e f i l e , the  in  l o c a t l o n a l f i l e and  (a merged structures—  the merged  ^Throughout t h i s document a l o c a t l o n a l f i l e c a l l e d a "geographic f i l e " and a d e s c r i p t i v e f i l e c a l l e d a "row f i l e . "  i s also i s also  file.  1  66  The  combination  of a d e s c r i p t i v e f i l e , afaid I t s a s s o c i a t e d  locational f i l e  Is c a l l e d s p l i t  map  can be s t o r e d p h y s i c a l l y In two waysi l n a  Information  merged f i l e or l n s p l i t f i l e s .  files.  Hence, the same  There are s i t u a t i o n s when  e i t h e r the s p l i t f i l e s or merged f i l e s y i e l d over the other  (see S e c t i o n 3.1.5).  advantages  However, the  Input/  output r o u t i n e s make the d i f f e r e n c e s between s p l i t and merged f i l e s completely programs.  The  elegance  files  t r a n s p a r e n t to a l l p r o c e s s i n g  of t h i s approach Is t h a t  any  r o u t i n e which w i l l process a merged f i l e w i l l , without changes whatsoever, process  any  s p l i t f i l e s and v i c e v e r s a .  Hence, there Is a very s m a l l p r i c e to pay f o r the added flexibility. Figure 3 . 4 split  shows a l a n d use map  f i l e s and merged f i l e .  and  the r e s u l t i n g  Observe t h a t the d e s c r i p t i v e  file  c o n t a i n s only d e s c r i p t i v e , r e c o r d s and  the  locational  file  c o n t a i n s only l o c a t i o n a l r e c o r d s , whereas the merged  file  contains a l l the d e s c r i p t i v e r e c o r d s f o r a  polygon  f o l l o w e d by i t s l o c a t i o n a l r e c o r d . 3.1.5  The R e l a t i v e Advantages of  S p l i t and Merged F i l e s  Whether to use s p l i t on the s i t u a t i o n .  f i l e s or merged f l i e s depends  Merged f l i e s are u s u a l l y s u p e r i o r when  both the polygons and a t t r i b u t e s are to be processed because there Is l e s s overhead l n p r o c e s s i n g one f i l e than two and l e s s t r o u b l e In s p e c i f y i n g one f i l e name than two.  Spilt  67  Land use map  with  l a n d use codes at c e n t r o l d s  Polygon #  Land  use  Polygon #  Area  Coordinates  1  10  1  10.0  a,b,c,e,f,a  2  3  2  14.3  g,f,e,d,l,h,g  3  5  3  28.2  d,e,c,m,l,k,n,d  4  10  4  5.1  l,d,n,J,l  Locational F i l e  Descriptive F i l e Split  Files  Polygon # 1  10  1 2 descriptive/ data records  a,b,c,e,f,a  14.3  g,f,e,d,l,h,J  28.2  d,e,o,m,l,k,n,d  3  2  3  10.0  5  3  locational data records  10 4  5.1  l,d,n,J,l  The Corresponding Merged F i l e F i g u r e 3.4  A l a n d use map, the corresponding s p l i t and merged f i l e .  files  (Uote t h i s diagram shows o n l y two of the twelve dimensioning f i e l d s )  68  f i l e s are more economical  i f o n l y one component of the  geographic d a t a i s to be manipulated. other circumstances  There are three  i n which s p l i t f i l e s are advantageous  to merged f i l e s . The f i r s t  Is when the a t t r i b u t e s are prepared  input completely  independently from the polygons.  and  For  example, the census t r a c t s f o r the Vancouver area c o u l d be d i g i t i z e d i n p u t , and w r i t t e n i n t o a l o c a t l o n a l f i l e L, i n January, 1973.  A  s  soon as the census demographic d a t a  was  a v a i l a b l e (say i n A p r i l , 1973), i t could be i n p u t and s t o r e d i n a row  f i l e a s s o c i a t e d w i t h L.  On the other hand, a merged  f i l e c o n t a i n i n g the same demographic data c o u l d not have been produced  u n t i l both components of the d a t a were a v a i l a b l e i n  April. A second  s i t u a t i o n s u i t e d to the use o f s p l i t  files  i s when t h e r e i s more than one d e s c r i p t i v e d a t a s e t a s s o c i a t e d with a p a r t i c u l a r l o c a t i o n a l data s e t .  T h i s data can  s t o r e d i n two wayst as s e v e r a l d e s c r i p t i v e f i l e s and  be one  l o c a t i o n a l f i l e , or as s e v e r a l merged f i l e s w i t h the l o c a t i o n a l d a t a s e t repeated i n each f i l e .  The  use of s p l i t  files  saves storage and a l s o makes e d i t i n g simpler as there i s only one copy of the polygons  to e d i t .  A t h i r d advantage of s p l i t f i l e s i s t h a t they can more e a s i l y processed by other systems.  In p a r t i c u l a r ,  be the  row w i t h i t s f i x e d l e n g t h r e c o r d s of f i x e d format c o u l d be processed under a standard f i l e management system i f one  69  TABLE IV A COMPARISON BETWEEN SPLIT FILES AND MERGED FILES IN VARIOUS PROCESSING SITUATIONS  Split 1. Only one o f the two components of geographic data Is processed a t a time. 2. Both Components of geographio d a t a a r e processed t o g e t h e r .  Files  v e r y good  good (more overhead)  Merged  Files  good  very good  3. D e s c r i p t i v e and l o c a t i o n a l d a t a s e t s i n p u t a t the same time.  good  good  4. D e s c r i p t i v e and l o c a t i o n a l data sets a v a i l a b l e f o r i n p u t a t d i f f e r e n t times.  good  fair  5. More than one d e s c r i p t i v e d a t a s e t f o r one l o c a t i o n a l data s e t .  good  fair  6. D e s c r i p t i v e data to be processed e x t e r n a l t o GIDS.  fair  poor  70  skipped over the header r e c o r d s a t the b e g i n n i n g of the file.  I t would be much harder f o r an e x t e r n a l program t o  handle a merged f i l e because of I t s v a r i a b l e l e n g t h blocked polygon r e c o r d s . merged f i l e s 3.1.6  The comparison  between s p i l t  flies  and  Is summarized In Table IV. D e t a i l e d Record  Formats*  A l l the geographic d a t a i s stored In GIDS f l i e s r e a l numbers.  as  Integers are handled by c o n v e r t i n g them t o  their r e a l equivalents.  Rather than s t o r i n g these r e a l  numbers In EBCDIC c h a r a c t e r form, they are s t o r e d l n the IBM/36O as REAL 4 numbers l n I n t e r n a l format. #  Internal  format leads to savings on two accounts 1 s t o r a g e , and proc e s s i n g time. First,  I n t e r n a l format Is more compact than c h a r a c t e r  format f o r r e p r e s e n t i n g these r e a l numbers. map  i s twenty  Since a t y p i c a l  Inches square and d i g i t i z e r s are a c c u r a t e to a  few thousandths of an l n o h , a d i g i t i z e d c o o r d i n a t e has up to five significant digits.  A t y p i c a l c o o r d i n a t e Is +18.352.  To s t o r e t h i s i n the IBM/360 would r e q u i r e perhaps 7 bytes In  c h a r a c t e r format, but o n l y 4 b y t e s l n I n t e r n a l format.  This saving quickly m u l t i p l i e s . 100  If a l o c a t i o n a l f i l e contains  polygons w i t h an average of 10 s i d e s then each r e c o r d  c o n s i s t s of 32 r e a l numbers, I n c l u d i n g the dimensioning.  A  simple c a l c u l a t i o n shows t h a t the f i l e would r e q u i r e 12,800 bytes i f s t o r e d i n i n t e r n a l format, but o n l y 22,400 bytes I f s t o r e d l n c h a r a c t e r format.  In experiments w i t h a map  of  71  377 l a n d use polygons, we found whioh i s i n c h a r a c t e r format,  t h a t the d i g i t i z e r  occupied 24 pages  whereas the l o c a t i o n a l and d e s c r i p t i v e f i l e s , in  file,  on d i s k ,  which a r e both  I n t e r n a l format, occupied only 13 and 2 pages r e s p e c -  tively.  In t h i s case, i n t e r n a l format l e d t o a savings of  9 pages or almost 40 per c e n t . Seoondly, input/output r e q u i r e s l e s s than a q u a r t e r as much CPU time f o r i n t e r n a l l y formatted d a t a than f o r c h a r a c t e r data because there i s no conversion of format required. Since no a r b i t r a r y upper l i m i t has been Imposed on the number o f p o i n t s i n a polygon,  a l l storage has to be  d y n a m i c a l l y a l l o c a t e d and the l o c a t i o n a l r e c o r d s have t o be 3 blocked  (see F i g . 3.8).  This block length  and the d e s c r i p -  t i v e r e c o r d l e n g t h a r e both s t o r e d i n the header and become known when the f i l e  i s opened and the headers a r e r e a d .  Hence the s i z e of b u f f e r s needed f o r both the d e s c r i p t i v e and  l o c a t l o n a l r e c o r d s a r e known b e f o r e any data r e c o r d s a r e  read. 3.1.7 The  Headers* first  few r e c o r d s of a l l GIDS f i l e s ,  be they  d e s c r i p t i v e , l o c a t i o n a l , o r merged, c o n t a i n the f i l e  header.  One page equals 4,096 bytes o f s t o r a g e . is  3currently the b l o c k l e n g t h f o r the l o c a t i o n a l r e c o r d s always 252 b y t e s .  72  T h i s header c o n t a i n s a v a r i e t y of u s e f u l i n f o r m a t i o n about the geographic d a t a i n the f i l e file  format, and the fieldnames.  such as the type o f f i l e , By means o f t h e i r  headers, a l l GIDS f l i e s a r e s e l f - d e f l n l n g ; t h i s I s an Important  f a c t o r l n making GIDS problem  independent.  Because o f the headers the b i n d i n g o f many v a r i a b l e s  such  as fieldnames can be delayed u n t i l the time a f i l e Is created.  To Increase the e x t e n d l b l l l t y of the system, e x t r a  space has been d e l l b - e r a t e l y l e f t  l n the header so t h a t new  Information can be Included I f the need a r i s e s i n the f u t u r e . The header i s read Into v i r t u a l memory when a f i l e Is f i r s t opened and kept there u n t i l p r o c e s s i n g on t h e f i l e Is complete ( a t the end o f the command).  Meanwhile, any programs  t h a t r e q u i r e Information about the f i l e can look a t I t s header. F o r example, when a user g i v e s a command to draw a map w i t h the zoning codes (DRAW f i l e CODED BY ZONING) one r o u t i n e looks for  the p o s i t i o n of the f i e l d  ZONING l n the g i v e n f i l e .  Each header Is made up of two o r more header r e c o r d s . There a r e f o u r d i f f e r e n t types o f header r e c o r d s , a l l w i t h t h e i r own standard formatst header, the f i e l d  the g e n e r a l header, the d e s c r i p t i v e  header, and the l o c a t i o n a l header.  The con-  t e n t s o f each o f these a r e summarized below. 1) General Header T h i s Is always the f i r s t header r e c o r d . i n f o r m a t i o n such as f i l e  I t contains  type, c r e a t i o n d a t e , year of i n v a l i -  d a t i o n t h a t i s r e l e v a n t f o r a l l types of GIDS f i l e s .  Note  73  t h a t the system can a u t o m a t i c a l l y check when opening a f i l e i f the d a t a i s no longer  valid.  2) D e s c r i p t i v e Header T h i s appears only f o r d e s c r i p t i v e f i l e s and merged files.  I t g i v e s the l e n g t h o f the row r e c o r d .  3) F i e l d Header T h i s c o n t a i n s a l l the i n f o r m a t i o n such as fieldname, l o c a t i o n i n the r e c o r d , and range of values t h a t r e f e r s t o one f i e l d . descriptive  There i s one f i e l d  header f o r each f i e l d  i n the  file.  4) L o c a t i o n a l Header T h i s only appears i n the headers o f l o c a t i o n a l and merged f i l e s .  I t c o n t a i n s a l l the i n f o r m a t i o n about the  l o c a t i o n a l content o f the f i l e , of  c o o r d i n a t e s f o r the f i l e ,  such as the map s c a l e , range  t o l e r a n c e s i n e d i t i n g , and the  dimension of the polygon. Now we show what the headers look l i k e f o r each o f the three types o f GIDS f i l e s , (a) The header f o r a d e s c r i p t i v e f i l e g e n e r a l header d e s c r i p t i v e header one f o r each f i e l d i n the descriptive record  field  header  field  header  field  header  field  header  7k  Since there i s no l o c a t i o n a l header, no l o c a t i o n a l i n f o r m a t i o n whatsoever i s r e q u i r e d t o c r e a t e d e s c r i p t i v e files. (b) The header f o r a l o c a t i o n a l  file  general  header  l o c a t l o n a l header (c) The header f o r a merged  file general  header  d e s c r i p t i v e header one f o r each f i e l d i n the d e s c r i p t i v e record  field  header  field  header  field  header  y field  header  l o c a t i o n a l header 3»1«8 How Headers a r e Constructed at E x e c u t i o n T i m e * Headers a r e i n i t i a l l y c o n s t r u c t e d and w r i t t e n onto the f i l e when the f i l e Instead o f querying  i s created  (with the CREATE command).  the user f o r a l l the header  information,  the p o l i c y adopted has been t o e x t r a c t as much i n f o r m a t i o n as p o s s i b l e out of the data i t s e l f , and o n l y t o ask him f o r i n f o r m a t i o n which cannot be obtained  i n t h i s way.  For  example, s i n c e the map s c a l e i s a v a i l a b l e from input but the fieldnames  a r e n o t , the user w i l l be asked t o name the  75  f i e l d s but n o t to enter the scale.By "CREATE A LIKE  B"  a user can c r e a t e a header f o r f i l e A i d e n t i c a l t o t h e e x i s t i n g header f o r B. which changes a f i l e  L a s t l y , when a command i s executed  In some way so t h a t I t s p r e v i o u s  header Is no l o n g e r v a l i d , t h a t same command w i l l  correct  the header so t h a t the f i l e header provides an up-to-date a c c u r a t e d e s c r i p t i o n o f the d a t a In the f i l e . 3.2 SELECTION AND THE COMMAND LANGUAGE STRUCTURE 3.2.1  Introduction  S e l e c t i o n enables a user t o e x t r a c t a subset o f a GIDS f i l e f o r p r o c e s s i n g .  The command language enables a  user t o communicate h i s requests e a s i l y t o the programs. Both s e l e c t i o n and the command language are f o u n d a t i o n elements o f the system. S e c t i o n 3»2 the author d e s c r i b e s the concept and  In  Implementation  o f s e l e c t i o n , the syntax of filenames and  s e l e c t o r s , and f i n a l l y  the GIDS approach t o command p r o -  cessing.  3»2.2  Selection vs. R e t r i e v a l  Often one wishes t o e x t r a c t a p a r t i c u l a r subset a file. for  from  S e l e c t i o n and r e t r i e v a l a r e two d i f f e r e n t methods  achieving this goal.  With s e l e c t i o n , every r e c o r d Is  s e q u e n t i a l l y and the d e s i r e d r e c o r d s a r e s e l e c t e d as they are r e a d .  However, w i t h r e t r i e v a l , the r e c o r d s l n q u e s t i o n  76  can  be read d i r e c t l y  Retrieval  (I.e., retrieved)  from the  file.  Is the modus operandi f o r a random access  environment, whereas s e l e c t i o n sequential  file  3.2.3  Is the way  to operate In  There are  Selection  t h r e e completely d i f f e r e n t types of  have r e l e v a n c e f o r GIDS (see F i g . 3.5).  (1) numerlo  These aret  selection;  s e l e c t i o n by row  selec-  selection;  (2) geographic (3)  a  environment.  Three Types of  t i o n that  file  the presence or absence of  a  record.  Numberlc s e l e c t i o n Involves s e l e c t i o n of r e c o r d s based on  the v a l u e s of t h e i r numeric a t t r i b u t e s .  numerlo s e l e c t i o n use  t o GIDS.  has  land  use  I t i s d e s c r i b e d . I n the next involves  land  code of l e s s than  been implemented and  Geographic s e l e c t i o n based on  example of  i s s e l e c t i o n of a l l polygons from a  f i l e w i t h v a l u e s f o r the  Numeric s e l e c t i o n  An  lends g r e a t power  sections. s e l e c t i o n of r e c o r d s  the v a l u e s of t h e i r geographic c o o r d i n a t e s .  example, one  might want to s e l e c t a l l the  from a g i v e n f i l e which i n t e r s e c t a g i v e n polygon.  T h i s type of s e l e c t i o n has  mented, but  S e c t i o n 6.4  4.  land  use  For  polygons  municipality  not y e t been imple-  d i s c u s s e s Implementing l t In  the  future. The  t h i r d type of s e l e c t i o n occurs as a consequence  of the matching of a l o c a t l o n a l r e c o r d and  an  associated  77  row r e c o r d In r e a d i n g s p l i t f i l e s . from a l o c a t i o n a l f i l e  Polygons  are selected  i f and only i f there i s a d e s c r i p t i v e  r e c o r d w i t h matching polygon number In the a s s o c i a t e d row file.  Thus, the subset s e l e c t e d Is determined  presence  o r absence o f row r e c o r d s .  sample case.  presence  F i g u r e 3.5 shows a  Here the l a s t polygons w i l l  are no matching d e s c r i p t i v e r e c o r d s .  by the  be skipped; there  S e l e c t i o n by the  or absence of row r e c o r d s i s implemented w i t h i n  the read r o u t i n e , and hence w i l l be d e s c r i b e d f u r t h e r l n Section  3.3.  3.2.4  GIDS Filenames and Qualified Files  Two elements l n the GIDS command language a r e f i l e names and q u a l i f i e d f l i e s .  Under the MTS o p e r a t i n g system,  a l l f i l e s have a name which must be s u p p l i e d before the f i l e can be read or w r i t t e n .  MTS filenames c o n s i s t o f from one  through twelve alphanumeric and u n d e r s c o r e ) .  c h a r a c t e r s ( p l u s t the p e r i o d  A l l row, l o c a t i o n a l and merged f i l e s can  be r e f e r r e d t o simply by t h e i r MTS f i l e n a m e s , but i t Is not obvious how to name s p i l t  flies.  The syntax used  Is l e f t  p a r e n t h e s i s , row f i l e name, comma, l o c a t i o n a l f i l e name, r i g h t parenthesis. of  F o r example, i f BOW and LOC a r e the names  an a s s o c i a t e d row and l o c a t i o n a l f i l e , then (ROW,LOC) i s  the corresponding s p i l t  file.  One can view a s p i l t  f i l e as  a s i n g l e f i l e c o n t a i n i n g both d e s c r i p t i v e and l o c a t i o n a l d a t a I d e n t i c a l to a merged f i l e as f a r as a user Is concerned, except t h a t I t has an unusual name.  78  READ WINDOW ( c o n t a i n s the next s e l e c t e d r e c o r d )  FILTER  A  Numerlo s e l e c t i o n  Geographic  Selection  Area Not s e l e c t e d because there i s no d e s c r i p t i v e record i l^tV^  F i l t e r e d out by numeric s e l e c t i o n i  Selected  #1  F i l t e r e d out by geographic s e l e c t i o n  1  Selected  i  descriptive file F i g u r e 3.5  7  v  locatlonal  \  file  Three types o f s e l e c t i o n . (Numeric s e l e c t i o n and s e l e c t i o n by the presence or absence of row r e c o r d s are implemented i n GIDS).  79  Under MTS, a l l filenames can be q u a l i f i e d by m o d i f i e r s to  specify carriage c o n t r o l , conversion, etc.  The beauty of  t h i s d e s i g n i s t h a t the m o d i f i e r i s t r e a t e d as p a r t of the f i l e n a m e , I.e., the m o d i f i e r Is processed by the MTS  Input/  output r o u t i n e s and Is t r a n s p a r e n t t o a l l other r o u t i n e s . GIDS has c a r r i e d t h i s concept  one step f u r t h e r .  GIDS  f l i e s can be q u a l i f i e d by a s e l e c t o r l n a d d i t i o n to the r e g u l a r MTS m o d i f i e r s and.hence a r e c a l l e d  "qualified  files."  T h i s s e l e c t o r s p e c i f i e s which r e c o r d s In the f i l e are t o be s e l e c t e d f o r p r o c e s s i n g and which r e c o r d s are to be It  Ignored.  Is t r e a t e d as p a r t of the GIDS filename Just as MTS modi-  f i e r s are t r e a t e d as p a r t o f the MTS f i l e n a m e .  Qualified  f i l e s a r e Important because they serve as the mechanism f o r r e f e r r i n g to s e l e c t e d p a r t s o f a f i l e  l n the GIDS command  language (see Appendix A ) . 3.2.5  Fieldnames  Under GIDS a user can d e f i n e fieldnames f o r a f i l e , and  then he can r e f e r to the I n d i v i d u a l f i e l d s by name l n a  command.  Fieldnames are used l n the s e l e c t o r , the g r a p h i c s  commands, and the aggregation  commands.  Fieldnames a r e d e f i n e d In a d i f f e r e n t manner f o r l o c a t i o n a l and row f l i e s . same dimensioning  Every l o c a t i o n a l f i l e has the  i n f o r m a t i o n about each of I t s polygons.  Thus, the same fieldnames w i l l work f o r a l l l o c a t i o n a l flies.  These names have been d e f i n e d by the system de-  s i g n e r s once and f o r a l l and appear l n Appendix B.  On the  80  other hand, s i n c e row f i l e s do not c o n t a i n a standard r e p e r t o i r e o f i n f o r m a t i o n , t h e r e can be no standard naming.  The user d e f i n e s t h e fieldnames  f o r a row f i l e  when he c r e a t e s I t w i t h t h e CREATE command. may c o n t a i n alphanumeric underscores  A fieldname  c h a r a c t e r s , colons ":", and  "_", but may n o t be one of the keywords of  the system. 3.2.6  Syntax o f Numeric S e l e c t i o n  The mechanism f o r s p e c i f y i n g numerical from a f i l e  selection  i s to q u a l i f y the f i l e name by a s e l e c t o r l n a  GIDS command, I.e., t o s p e c i f y a q u a l i f i e d f i l e .  The  s e l e c t o r d e f i n e s the scope of the p r o c e s s i n g t a s k w i t h i n the file.  The syntax o f the numeric s e l e c t o r Is the s t r i n g  "SC0BJ5=" f o l l o w e d by a l o g i c a l e x p r e s s i o n of c o n s t a n t s and fieldnames  from t h e f i l e e n c l o s e d i n parentheses.  Selection  occurs by e v a l u a t i n g the l o g i c a l e x p r e s s i o n f o r each r e c o r d . and Is  s e l e c t i n g only those r e c o r d s f o r which the e x p r e s s i o n true.  A l l o f the fieldnames w i t h i n the s e l e c t o r must  appear verbatim of  In the r e c o r d d e s c r i p t i o n s (headers)  the f i l e s which t h e s e l e c t o r The  qualifies.  l o g i c a l e x p r e s s i o n can be q u i t e g e n e r a l .  the f o l l o w i n g r e l a t i o n a l o p e r a t o r s can be usedt <, - i C ,  >  , -TI>, > = , < =.  are a l s o acceptedt  of one  The f o l l o w i n g l o g i c a l  & f o r "and", | f o r "or".  Any of  =, -» =, operators  In the f u t u r e ,  one may a l s o be a b l e t o use f u n c t i o n s such as " s i n e " l n the e x p r e s s i o n , b u t t h i s f e a t u r e Is n o t c u r r e n t l y Implemented.  81  For readers w i t h a t h e o r e t i c a l qualified  files  bent  the syntax o f  ( q f i l e s ) i s d e f i n e d below using Backus  Normal Form. ff,qflle ^selector ) <scopeword^ <file>  :: = <£lle> | <f ile> <selector> tt  = <scopeword^ = <scope>  :* = :t -  scope I s ( f name) | ( <f name) , <f name^)  <fname>  11 = <MTS f i l e o r d e v i c e name>  <scope>  tt  - ^ l o g i c a l e x p r e s s i o n o f fieldnames and constants^  Note t h a t S can be used as an a b b r e v i a t i o n f o r SCOPE. The  l o g i c a l e x p r e s s i o n can a l s o c o n t a i n any i n t e g e r o r r e a l  constant.  R e a l constants cannot be expressed w i t h an ex-  ponent but must be w r i t t e n out longhand w i t h a decimal p o i n t . Thus, 0.005 i s a c c e p t a b l e , but 5»0$-3 i s not.  Examples are  g i v e n below. Assume LANDUSE.G i s a l o c a t i o n a l c o n t a i n i n g l a n d use polygons  (geographic)  and t h a t LANDUSE.R i s the  p a r a l l e l row f i l e t h a t c o n t a i n s the land use codes. assume t h a t the fieldnames  file  Further  f o r the f i l e LANDUSE.R a r e  POLYGONNO and LANDUSE. Qualified 1.  File  (LANDUSE.R, LANDUSE.G)  2. LANDUSE.R SCOPE=(LANDUSE =20)  The R e s u l t i n g S e t of S e l e c t e d Records A l l r e c o r d s i n the f i l e s A l l r e c o r d s f o r LANDUSE.R w i t h l a n d use code of 20  82  Qualified  File  The R e s u l t i n g Set of S e l e c t e d Records  3. LANDUSE.R S=(LANDUSE >=10 & LANDUSE <21)  A l l r e c o r d s w i t h l a n d use from 10 t o 20 I n c l u s i v e  k. LANDUSE.R SCOPE*(AREA>2)  W i l l not work because AREA i s not a fieldname f o r LANDUSE.R  5. LANDUSE.G SC0PE=(AREA>2)  A l l polygons w i t h an area > 2 units  6. (LANDUSE.R, LANDUSE.G) SCOPE*(LANDUSE=20 & AREA>2)  A l l r e c o r d s which were s e l e c t e d both In #2 and l n #5  7. LANDUSE.G SCOPE*(MINX>5 & MAXX<10)  T h i s w i l l e f f e c t a form of windowing. Only polygons w i t h a l l x values l y i n g between 5 & 10 w i l l be selected  8. LANDUSE.G S=(MINX+10*  T h i s example shows t h a t a r i t h m e t i c expressions w i t h i n the s e l e c t o r can be evaluated. Polygons t h a t s a t i s f y the g i v e n c o n d i t i o n w i l l be selected  9. (LANDUSE.R, LANDUSE.G) S=(LANDUSE=20 | AREA>2)  A l l r e c o r d s which were s e l e c t e d In #2 or In #5 or l n both  (MINY-1)>=100.35)  3 2i7 t  The Implementation o f Numeric S e l e c t i o n  The method o f e v a l u a t i n g these l o g i c a l expressions Is based on an a l g o r i t h m g i v e n by Barron (1968, p.29  ). When  the f l i e s are opened the s e l e c t o r expression Is encoded l n P o l i s h n o t a t i o n (by the r o u t i n e ENCODE).  Then the P o l i s h  e x p r e s s i o n Is evaluated f o r each r e c o r d l n the f i l e  (by the  r o u t i n e EVAL) u s i n g a p r i o r i t y s t a c k f o r the o p e r a t o r s .  83  3»2«8  Command P r o c e s s i n g  Command p r o c e s s i n g Is handled very simply.  The  s u p e r v i s o r program r e c e i v e s a command from the user and passes  I t on to the scanner.  The scanner r e t u r n s a f i x e d  l e n g t h r e p r e s e n t a t i o n o f the command s t r i n g .  The super-  v i s o r checks only the command name and d y n a m i c a l l y  loads  the a p p r o p r i a t e command r o u t i n e .  oommand  Since I t Is t h i s  r o u t i n e which examines the command In d e t a i l , the syntax o f commands can be changed Independent o f the s u p e r v i s o r . The  scanner  Is an Independent package (Parker, 1971 b)  which Is used by s e v e r a l command systems other than GIDS. K e y w o r d s ,  command words, o p t i o n a l words and s p e c i a l  c h a r a c t e r s o f the command language a r e d e f i n e d l n a k e y t a b l e file  by the system d e v e l o p e r .  r u n , the scanner Into c o r e .  At the beginning o f every GIDS  Is i n i t i a l i z e d and these t a b l e s a r e read  Upon b e i n g passed  a command, the scanner  recog-  n i z e s Integers and these s p e c i a l words and marks other s t r i n g s as v a r i a b l e s .  F o r each e n t i t y i n the command, the  scanner r e t u r n s the e n t i t y type ( i n t e g e r , keyword, o p t i o n a l word, command word, v a r i a b l e ) and a unique i d e n t i f i c a t i o n number. a file,  Because the command language Is d e f i n e d as data on I t can be changed simply by e d i t i n g the f i l e .  H e r e i n l i e s the power of t h i s approach. commands can be e a s i l y handled  by d e f i n i n g common words as  o p t i o n a l e n t i t l e s In the k e y t a b l e f i l e processing.  Verbosity l n  to be Ignored  during  84  Each command r o u t i n e scans  i t s own commands.  However, there i s one r o u t i n e , TABSEL, which i s c a l l e d by a l l commands t o scan o f f f i n a l f i l e names. of  t h i s r o u t i n e i s warranted  The use  because f i l e names may be  q u i t e complicated, c o n s i s t i n g o f one o r two MTS f i l e names and p o s s i b l y a s e l e c t o r . to  The TABSEL r o u t i n e r e t u r n s  the command r o u t i n e a p o i n t e r t o the end o f the f i l e  name i n the command.  I t i s t h e r e t h a t the command r o u t i n e  continues i t s scanning of the command.  Since the command  r o u t i n e has no idea i f t h e r e i s a s e l e c t o r o r not, TABSEL has made s e l e c t i o n completely routine.  t r a n s p a r e n t to the command  T h i s very important r o u t i n e w i l l be d e s c r i b e d  further i n Section 3.3.4. 3.3  INPUT/OUTPUT STRUCTURES FOR THE PROGRAMMER* 3.3.1  Introduction*  So f a r i n t h i s chapter, the f i l e s t r u c t u r e s and concept of s e l e c t i o n have been d e s c r i b e d .  Now, d e t a i l s a r e  g i v e n on the input/output r o u t i n e s and the t a b l e s they keep. The remainder o f the chapter p r o v i d e s q u i t e d e t a i l e d documentation  and hence should be o f more i n t e r e s t t o a GIDS  programme than a g e n e r a l r e a d e r . 3.3.2  File  Numbers*  When a GIDS f i n a l f i l e  i s opened f o r r e a d i n g o r  w r i t i n g , i t i s assigned two i n t e g e r f i l e numbers, u s u a l l y denoted IFILE and J F I L E .  IFILE i s a f i l e number f o r the  85  d e s c r i p t i v e p a r t of the f i l e and J F I L E i s a f i l e for to  the l o c a t i o n a l p a r t o f the f i l e .  number  F i l e s are referred  i n most r o u t i n e s n o t by name, b u t by these f i l e  numbers.  F i l e numbers a r e assigned i n ascending order d u r i n g a r u n so t h a t each f i l e  i s uniquely i d e n t i f i e d by I t s numbers.  f i l e number i s 0 i f t h a t component o f the d a t a i s m i s s i n g in  the f i l e , and i f a f i l e number o f 0 i s passed t o any  r o u t i n e , no a c t i o n Is taken.  The t a b l e below shows the  v a l u e s of IFILE and J F I L E f o r d i f f e r e n t types o f f i l e s . TABLE V THE VALUE OF FILE NUMBERS FOR DIFFERENT TYPES OF FILES UNDER GIDS  IFILE  JFILE  1) Not a GIDS f i l e  0  0  2) D e s c r i p t i v e  n  0  3) L o c a t i o n a l  0  n  4) Merged  n  n  5) S p i l t  n  TYPE OF FILE  (Assume m and n are p o s i t i v e  (n  m * m)  Integers and m * n)  A  86  3.3.3  File  Tables*  T h i s s e c t i o n d e s c r i b e s the t a b l e s by which management o c c u r s .  file  There i s one g l o b a l t a b l e c a l l e d FLIST  t h a t c o n t a i n s a l l the f i l e numbers and p o i n t e r s to the a s s o c i a t e d t a b l e s f o r each f i l e .  Thus, given a f i l e  number, i t s t a b l e s can be l o c a t e d . For each f i l e i s kept  there i s a t a b l e c a l l e d LOCAL which  i n v i r t u a l memory w h i l e  the f i l e  i s open.  The  LOCAL t a b l e c o n t a i n s p o i n t e r s t o the f i l e headers,  informa-  t i o n on the f i l e s e l e c t o r , and other i n f o r m a t i o n such as record lengths.  At the c l o s e o f every command, the f i l e  tables are a l l released.  See F i g u r e 3.6 f o r a p i c t u r e of  these f i l e t a b l e s . 3.3.4  F i l e Opening Routine—TABSEL*  TABSEL i s c a l l e d by the command r o u t i n e s t o open the files  and take care o f s e l e c t i o n .  I t i s passed the scanner  a r r a y s c o n t a i n i n g the command and a p o i n t e r t o the p l a c e i n these a r r a y s where the filenames begin.  I t e x t r a c t s the  f i l e n a m e s , opens the f i l e s , a s s i g n s each f i l e a number, reads I/O  i n the f i l e header, f i l l s  i n the LOCAL t a b l e , s e t s up  b u f f e r s and, i f there i s a s e l e c t o r , i t c a l l s the BFLAG  r o u t i n e to encode the s e l e c t o r .  I f the f i l e s do n o t have  v a l i d headers, i t s i g n a l s an e r r o r and r e t u r n s . r e t u r n s three items  TABSEL  to the c a l l i n g program: the two f i l e  numbers IFILE and J F I L E w i t h v a l u e s a p p r o p r i a t e to the type  G e n e r a l Header Local L o c a t i o n a l Header Table Row  Header  IFILE JFILE GLOBAL FILE  1  2  TABLE  3  0  Field  \  Header  Selector  Local  G e n e r a l Header  Table  Row  Field  F i g u r e 3.6  F i l e Tables  Header  Header  CO  88/  of f i l e s as shown i n Table V, and a p o i n t e r t o the end o f the filename  i n the command.  I f there i s a s e l e c t o r i t i s t r e a t e d as p a r t o f the filename.  This i s a powerful  f e a t u r e because the command  r o u t i n e which c a l l e d TABSEL continues a f t e r the filename without or not.  scanning  the command  knowing i f there was a s e l e c t o r  In other words, s e l e c t i o n i s completely  transparent  to the command r o u t i n e s . 3.3.5  S e q u e n t i a l Read Route-TREAD»  T h i s r o u t i n e reads  the f i l e ( s ) s e q u e n t i a l l y and r e -  t u r n s the next r e c o r d t h a t i s s e l e c t e d .  I t i s passed two  f i l e numbers and a f l a g which i n d i c a t e s whether s e l e c t i o n i s to be turned o f f or not.  I f both f i l e numbers a r e non-zero,  both a d e s c r i p t i v e and l o c a t i o n a l r e c o r d and t h e i r are r e t u r n e d .  To do t h i s , TREAD reads  the f i l e s  lengths  until i t  f i n d s the next matching r e c o r d w i t h i n the s p e c i f i e d  scope.  Both numeric s e l e c t i o n and s e l e c t i o n by presence or absence may be i n e f f e c t .  (See F i g . 3.7 f o r a f l o w c h a r t ) .  When  only one component i s t o be r e a d , the o p e r a t i o n i s much s i m p l e r because there i s no s e l e c t i o n by presence o r absence of row r e c o r d s .  When t h e r e a r e s e v e r a l row r e c o r d s a s s o c i a t e d  w i t h a s i n g l e l o c a t i o n a l r e c o r d , the same l o c a t i o n a l r e c o r d i s r e t u r n e d s e v e r a l times, once w i t h each of i t s row r e c o r d s . A l l o f t h i s i s b e s t e x p l a i n e d by another Below are l i s t e d polygon  the polygon  example.  numbers o f s p l i t f i l e s .  1 w i l l be read, polygon  2 w i l l be skipped, and  Here  Figure 3 . 7  The o p e r a t i o n o f TREAD when both a l o c a t i o n a l and a d e s c r i p t i v e f i l e are b e i n g r e a d .  90  polygons 3 and 4 w i l l be r e t u r n e d once, and twice tively;  but then,  respec-  i n l o o k i n g f o r polygon 5» a l l the l o c a -  tional f i l e  I s read and e n d - o f - f l l e occurs.  row  l e a d to s e l e c t i o n , whereas absent polygon  records  Hence, absent  records lead to e n d - o f - f l l e . Descriptive F i l e  Locational F i l e  1  1  3  2  4  3  5  6  »  t  Polygon #s  100  Polygon #s  100  In a d d i t i o n t o performing  s e l e c t i o n , TREAD a l s o con-  v e r t s the data t o a convenient  form f o r p r o c e s s i n g as shown  In F i g . 3.8.  Is s t o r e d l n f i x e d  On the f i l e data  format w i t h a r e c o r d type a t the beginning  blocked  o f each r e c o r d .  TREAD I d e n t i f i e s the type o f r e c o r d by the r e c o r d type and then d e l e t e s t h i s r e c o r d type and copies a l l o f the blocked records  i n t o one l o n g continuous  calling  program a p o i n t e r t o t h i s l o n g r e c o r d and I t s l e n g t h .  3.3.6  S e q u e n t i a l Write  record.  I t r e t u r n s to the  Routlne-TWRITE*  The w r i t e r o u t i n e Is Invoked e x a c t l y the same way as the read r o u t i n e and s i m i l a r steps a r e performed l n r e v e r s e (see F i g . 3.8).  Records a r e blocked  and a r e c o r d type Is  THE WAY THE DATA IS ACTUALLY STORED ON GIDS FILES record record type dimens, points type Poly.#  5  1  •T  r  "i  i  \20  3  io :  Land use descriptive  t  i i  record  l o c a t i o n a l record  TWRITE TREAD  d e s c r i p t i v e record  3  :io  Poly.#  Land use  locational  record  .  dimensioning  points  VIEW OF THE DATA BASE PRESENTED TO PROGRAMS Figure  3.8  A view o f the data as s t o r e d on the f i l e and as presented to p r o c e s s i n g programs.  Y^  92  i n s e r t e d a t the beginning  o f each r e c o r d .  Numeric s e l e c t i o n  can take e f f e c t as a f i l t e r on w r i t i n g , J u s t as i t d i d on reading.  T h i s might be u s e f u l i f polygons have been i n t e r -  sected and we want t o f i l t e r out polygons o f i n t e r s e c t i o n whose areas a r e too s m a l l to be s i g n i f i c a n t . 3.4 HOW TO PROGRAM A COMMAND USING FOUNDATION ELEMENTS OF GIDS* T h i s s e c t i o n demonstrates how a new command can be implemented by b u i l d i n g on the foundation been d e s c r i b e d  i n t h i s chapter.  elements t h a t have  In t h i s way, i t provides an  i n s i g h t i n t o the s t r u c t u r e o f GIDS and demonstrates how e a s i l y the system can be extended.  An example i s shown o f how t o  add a command t o copy a s e l e c t i o n p o r t i o n of one f i l e to another (COPY command). First,  the programmer must look a t the f u n c t i o n t o be  performed, decide (dn the options to be a v a i l a b l e t o the user, and  then, s p e c i f y a command syntax which allows a l l these  o p t i o n s t o be expressed  as command parameters.  A f t e r the  syntax i s chosen, he must enter the reserved words of the command i n t o the GIDS k e y t a b l e f i l e as d e s c r i b e d scanner writeup  i n the  (Parker, 1971 b ) .  Then he must code the command r o u t i n e t o process new command.  I f the command processes  final files,  this  this  r o u t i n e w i l l n e c e s s a r i l y c o n t a i n the f o l l o w i n g p a r t s t 1) a l a b e l l e d common area by the name o f SKIN t o oontain the scanner a r r a y r e p r e s e n t a t i o n o f the command, and a r o u t i n e to e x t r a c t needed command i n f o r m a t i o n from t h i s t a b l e ;  93  2) a c a l l to the f i l e opening r o u t i n e TABSEL f o r every f i n a l f i l e named i n the command; 3) c a l l s  t o the TREAD/TWRITE r o u t i n e f o r every  r e c o r d to be r e a d / w r i t t e n i n t o a f i n a l  file.  The steps i n adding a new command a r e c l a r i f i e d by c o n s i d e r i n g an example.  Assume, f o r example, one wants to  program a command to copy a s e l e c t e d p o r t i o n of one f i l e t o another.  First,  COPY  the syntax o f the command i s s p e c i f i e d .  "qualified f i l e "  to  "qualified  file"  Two words must be i n s e r t e d i n the system k e y t a b l e f i l e — " C O P Y " as a command word and "TO" as an o p t i o n a l word. Then the command r o u t i n e i s programmed.  I t c o n s i s t s of two  s m a l l r o u t i n e s , one to scan f o r the two filenames and t o c a l l TABSEL w i t h each, and the second to s e l e c t i v e l y read one f i l e  u s i n g TREAD and t o . s e l e c t i v e l y w r i t e the other using  TWRITE.  See Appendix E f o r a . l i s t i n g  o f the source program.  In order t o awaken the COPY command to l i f e o n l y one s m a l l change had t o be made t o any e x i s t i n g programs; the s u p e r v i s o r had to be m o d i f i e d to l o a d the a p p r o p r i a t e when a COPY command i s entered.  *«*#«**  file  94  CHAPTER 4 OTHER PARTS OF THE SYSTEM 4.1 THE INPUT SUBSYSTEM 4.1.1  Introduction  T h i s s e c t i o n d e s c r i b e s GIDS approaoh t o d a t a  Input  and compares i t w i t h t h a t o f s e v e r a l other d i g i t i z i n g systems.  Then, the d e t a i l e d steps o f the input  procedures  are g i v e n . The  i n p u t subsystem i n c l u d e s a l l the programs,  equipment and techniques f o r t a k i n g a map, encoding machine r e a d a b l e form, e d i t i n g i t , r e q u i r e d c o o r d i n a t e system.  i t in  and c o n v e r t i n g i t to the  The problems of a c t u a l l y p r e -  p a r i n g the map ( i . e . , d a t a a c q u i s i t i o n ) have been covered i n Chapter 1 and a r e not d e a l t w i t h f u r t h e r The d i f f i c u l t y of encoding polygons underestimated.  Goodchild  here. should not be  (1972, p. 31) notes t h a t i t  consumed s i x t y per cent o f the c o s t s i n the PIOS system (Dangermond). 4.1.2  GIDS Approaoh to Data Input  The d e s i g n e r s o f GIDS r e a l i z e d that d a t a input was a l a r g e enough problem i n i t s e l f t o occupy a l l t h e i r  time.  They decided i n s t e a d t o choose the s i m p l e s t i n p u t scheme t h a t would do the Job, l e a v i n g them t o concentrate on other g r a p h i c a l and a n a l y t i c a l c a p a b i l i t i e s .  T h i s d e c i s i o n seemed  95  a p p r o p r i a t e a t the time; experience has now  shown t h a t data  input i s the weakest part: of GIDS. The f i r s t d e c i s i o n i n any input system i s whether t o use scanning or d i g i t i z i n g f o r encoding the d a t a .  Since  scanning equipment was not a v a i l a b l e but a manual d i g i t i z e r was, we chose d i g i t i z i n g . 4.1.3  A Quick Survey of Four D i g i t i z i n g Systems  In manual d i g i t i z i n g e r r o r s are always introduced by s t r a y i n g o f f the l i n e .  F i n d i n g and c o r r e c t i n g these e r r o r s  i s one of the major problems f o r a d i g i t i z i n g system.  Four  d i g i t i z i n g schemes w i l l be o u t l i n e d , which r e f l e c t some o f the more common approaches t o t h i s problem of e d i t i n g (see Table VI). F i r s t and s i m p l e s t i n i t s computer requirements i s the method used by GIDS.  Each polygon i s d i g i t i z e d  i n turn  w i t h no s p e c i a l care as to which p o i n t s i n the polygon are chosen.  The r e s u l t  i s t h a t l i n e s are d i g i t i z e d twice, o f t e n  w i t h a d i s c r e p a n c y i n the two d i g i t i z a t i o n s of the same l i n e . These d i s c r e p a n c i e s are e d i t e d manually by comparing a computer p l o t w i t h the o r i g i n a l , map. Other systems u t i l i z e more s o p h i s t i c a t e d techniques which enable the computer editing.  digitizing  to perform some of the  The Map/Model system (Arms, 1970) d i g i t i z e s  one  polygon a t a time, but i t does much of i t s e r r o r d e t e c t i o n a u t o m a t i c a l l y by a method known as "redundant l i n e  editing."  96  T h i s method i s based on t h e . f a c t t h a t a l l l i n e segments should be d i g i t i z e d e x a c t l y twice map  perimeter  checking  l n a p o l y g o n a l map  i f the  Is d i g i t i z e d as a polygon (see F i g . 4 . 1 ) .  t h a t each l i n e segment does, indeed, appear  l n a d i g i t i z e d data omissions,  By  twice  s e t , programs can d e t e c t polygon  d u p l i c a t i o n s and  errors.  segments are s o r t e d and matched.  A l l the d i g i t i z e d  I f the two  line  digitizations  o f a l i n e segment are w i t h i n a c e r t a i n t o l e r a n c e , they are averaged; I f not, an e r r o r Is f l a g g e d .  There are two  dis-  advantages to t h i s method over the method used by GIDS. F i r s t , a l l p o i n t s to be d i g i t i z e d must be marked beforehand on the map  and,  secondly,  computer c o s t s are much h i g h e r .  /' 1 i s^^^ Y ' F i g u r e 4.1  2  ^  j $ \ j ^ j •  A p o l y g o n a l map System.  >  Note t h a t every l i n e segment Is d i g i t i z e d twice. (The l i n e s are a c t u a l l y superImposed not separated as shown).  as d i g i t i z e d by the Map/Model  A t h i r d method Is e x e m p l i f i e d by David D o u g l a s program a t Simon F r a s e r U n i v e r s i t y (1972). r a t h e r than one  accounts: there  w i t h d i s c r e p a n c i e s between the two l i n e Is e l i m i n a t e d .  hence each  T h i s leads to  Is l e s s d i g i t i z i n g , and  BNDBYNET  l i n e segment  polygon Is d i g i t i z e d at time and  l i n e segment i s only d i g i t i z e d once. on two  One  1  savings  the problem  digitizations  of the same  Given only the p o s i t i o n of the  points  and which p o i n t s are j o i n e d by edges, BNDRYNET w i l l f i n d  the  97  polygons.  The  program l o c a t e s a l l the I n t e r s e c t i o n s , cuts  o f f the t a i l s a t these i n t e r s e c t i o n s , and closed c i r c u i t s  (polygons).  The  then t r a c e s  out  main l i m i t a t i o n of BNDRYNET  i s t h a t the computer c o s t i n c r e a s e s as the square of number of p o i n t s ; hence, i t becomes very expensive to use f o r maps w i t h a l a r g e number of p o i n t s .  U s u a l l y such maps are  input  i n s e c t i o n s of no more than a thousand p o i n t s each. With a l l three systems d e s c r i b e d are normally  r e q u i r e d to i n p u t a map  s e v e r a l i t e r a t i o n s of the p r o c e s s ; p l o t hard copy.  The  so f a r , s e v e r a l days  because one must execute  edit o f f - l i n e ,  input,  and  l a s t system to be d e s c r i b e d aims at  d o i n g a l l of t h i s i n one  s e s s i o n by p e r m i t t i n g  on-line  editing. Ray has  Boyle (1972) at the U n i v e r s i t y of Saskatchewan  implemented o n - l i n e e d i t i n g w i t h a hardware c o n f i g u r a -  t i o n that includes a dedicated i n t e r a c t i v e graphics  mini-computer, d i s k ,  terminal.  The  t o t a l hardware c o s t i s  an amazingly low #34,000 (Boyle, 1972, has  and  Appendix G).  a l s o done r e s e a r c h on many other aspects  Boyle  of data  input  s u c h as automatic l i n e f o l l o w i n g , j o i n i n g l i n e s a c r o s s b o u n d a r i e s , and  o p t i c a l character recognition.  f e a t u r e s together w i t h  map  A l l these  the i n t e r a c t i v e e d i t i n g make Boyle's  d i g i t i z i n g system among the most advanced i n the world. Peter Vanden Bosch (1971) d i d some work on an a c t i v e polygon e d i t o r f o r GIDS. from pursuing  discouraged  t h i s approach because the only a v a i l a b l e i n t e r -  a c t i v e g r a p h i c s t e r m i n a l at UBC production  However, we were  inter-  e d i t i n g of  data.  was  too expensive to use f o r  98  TABLE VI A COMPARISON OF FOUR SYSTEMS FOR DIGITIZING POLYGONAL MAPS  Boyle  GIDS  MAP/MODEL  BNDRYNET  none  mark the points to be d i g i tized  decompose large maps i n t o smaller sections  twice 2) The number of times each l i n e i s digitized  twice  once  twice  3) Method of e r r o r detection  offline comparison of p l o t and map  p l o t plus redundant e d i t by computer  off-line comparison of p l o t and map  on-line comparison w i t h program help  4) Method o f e r r o r correction  manual offline  manual off-line  off-line  on-line  5) Computer required f o r i n p u t t i n g maps  medium size computer  large computer  large computer  minicomputer  1) P r e l i m i n a r y work i n p r e p a r i n g the map  Increasing 4.1.4  Sophistication  GIDS D i g i t i z i n g Procedure  Figure 4.2 shows the d i g i t i z e r The d i g i t i z e r  setup used by GIDS.  hardware c o n s i s t s o f a l a r g e r e c o r d i n g  a c u r s o r , a c o n t r o l u n i t , and a keypunch.  table,  The (x,y) p o s i t i o n  99  of  the c u r s o r on the t a b l e i s recorded by the c o n t r o l  unit  and punched on a computer card by the keypunch when the o p e r a t o r depresses  a button o r f o o t p e d a l .  Before d i g i t i z i n g , the map and a s s o c i a t e d menu a r e c a r e f u l l y o r i e n t e d as shown and taped to the d i g i t i z e r table.  The o r i g i n Is s e t a t the lower r i g h t corner of the  menu so t h a t a l l p o i n t s on t h e menu w i l l have a n e g a t i v e x-coordlnate.  T h i s menu c o n s i s t s o f g r i d squares w i t h each  square c o n t a i n i n g a d i f f e r e n t code f o r the a t t r i b u t e .  Codes  are a s s o c i a t e d w i t h a polygon by d i g i t i z i n g a p o i n t l n the a p p r o p r i a t e square b e f o r e d i g i t i z i n g the p o i n t s on the polygon boundary. 4.1.5  Input  (See the sample output i n F i g . 4.2). Procedure  From the time a map Is d i g i t i z e d out In f i n a l form, the same Information different forms—as a digitizer f i l e , and a f i n a l f i l e . flies  I s s t o r e d l n three  an Intermediate  file,  A p a r t i a l l i s t i n g of a l l three types o f  together w i t h a sample Input r u n appear l n Appendix C.  Each o f these f i l e then  u n t i l I t Is w r i t t e n  s t r u c t u r e s w i l l be d e s c r i b e d b r i e f l y , and  the steps t o Input a map w i l l be o u t l i n e d . The d i g i t i z e r f i l e  by the d i g i t i z e d d a t a .  c o n t a i n s 2 c o n t r o l cards f o l l o w e d  Each polygon begins on a new card.  There Is one o r more menu p o i n t s (which s p e c i f y a t t r i b u t e s of  the polygon)) f o l l o w e d by I t s c e n t r o l d and boundary  coordinates.  100  DIGITIZER TABLE  1 LAND USE MAP  MENU a  1  3  f  S  Io  7-  t  q  II  fa  l O  CURSOR i  NEGATIVE X  POSITIVE X  OPERATOR  x  1  DIGITIZER CONTROL UNIT  KEYPUNCH  F i g u r e 4.2  JZIOIJOOOI »  header  *  —O0.3S  *  v .  menu point  Ol-iS  ' I 3 . 0 I "  **3.il  '  +,o.&--toast  centroid  v  „  1 _  boundary! points  The D i g i t i z e r C o n f i g u r a t i o n used by GIDS.  101  71 B  EDITED DIGITIZER FILE  INTERMEDIATE; FILE  INPUT COMMAND  COMPARE PLOT & MAP FOR ERRORS  PLOT COMMAND  Drr/t SufFICIEfTtl E  OITIr 0  PLOT  EDITED INTERMEDIATE FILE CREATE FINAL FILES  \  ? *  //  EDITED FINAL FILES  INITIALIZE COMMAND  / F i g u r e 4 . 3 The GIDS i n p u t procedure.  /  /  102  The map form.  data Is next s t o r e d i n " i n t e r m e d i a t e f i l e "  This f i l e  i s formatted  i n a way  that f a c i l i t a t e s  the d i f f i c u l t e d i t i n g process which must i n v a r i a b l y It  i s produced  as the output of the INPUT command and  expected as input f o r the PLOT and The format  occur.  INITIALIZE commands.  i s d e s c r i b e d i n d e t a i l i n Appendix F.  The f i n a l form f o r the geographic d a t a i s the file  s t r u c t u r e t h a t was  the d i g i t i z e r and  d e s c r i b e d i n S e c t i o n 3.1.  final  Whereas  Intermediate f i l e s contained d a t a i n  d i g i t i z e r inches the f i n a l f i l e c o n t a i n s data i n a users p e c i f i e d c o o r d i n a t e system. designed f o r e f f i c i e n t  These f i l e s t r u c t u r e s are  input and output as they w i l l  be  processed o f t e n by a l l the data, m a n i p u l a t i o n commands of GIDS.  The  input steps are enumerated below»  1. D i g i t i z e the map and s t o r e the r e s u l t i n a digitizer f i l e . 2. E d i t t h i s f i l e f o r any e r r o r s which can be d e t e c t e d . 3. Use the INPUT command. T h i s reads the d i g i t i z e r f i l e , does some data massage, and w r i t e s the r e s u l t i n g i n t e r m e d i a t e d a t a out i n i n t e r m e d i a t e f i l e form. 4. E d i t the i n t e r m e d i a t e f i l e f o r any d e t e c t e d by INPUT.  errors  5. P l o t the i n t e r m e d i a t e f i l e w i t h the PLOT command. 6.  I f the p l o t compares w e l l enough w i t h the o r i g i n a l map go to 7» otherwise r e t u r n to step 2 or 4 and do the necessary editing.  103  7. Create the f i n a l f i l e and I t s headers the CREATE command.  using  8. Use the INITIALIZE command. T h i s reads the Intermediate f i l e , transforms the data to u s e r - s p e c i f i e d s c a l e and o r i g i n , c a l c u l a t e s a l l the dimensioning i n f o r m a t i o n and then w r i t e s the f i n a l f i l e . F i g u r e 4.3 d e p i c t s t h i s i n p u t procedure 4.1.6  pictorlally.  Experience w i t h the Input System  The G r e a t e r Vancouver R e g i o n a l D i s t r i c t has used GIDS f o r I n p u t t i n g a s e t of 16 l a n d use maps. t h a t the f i r s t  I t was found  map had to be e d i t e d and p l o t t e d no l e s s  10 times.  However, w i t h improved  procedures  (Tautz and B e l f o r d , 1972) 3 or 4 passes were  than  d i g i t i z i n g and e d i t i n g  s u f f i c i e n t f o r l a t e r maps l n the s e r i e s . the data w i l l be g i v e n i n Chapter 5.  The c o s t s t o input  104  4.2  THE GRAPHICS SUBSYSTEM 4.2.1  GIDS Approach  In the g r a p h i c s subsystem we have developed u s e f u l t o o l f o r the d i s p l a y of geographic to  data.  a very  Our aim was  g i v e maximum g r a p h i c v e r s a t i l i t y w i t h minimum user  cations.  I t was not high accuracy, but quick and easy  t i o n o f a v a r i e t y of maps which was Important.  specifigenera-  Versatility  has been achieved by p e r m i t t i n g a v a r i e t y o f symbolism and a v a r i e t y of graphic devices. 4.2.2 The  Graphics  Functions  f u n c t i o n s performed by the GIDS g r a p h i c s system a r e  drawing and superimposing  maps, where maps a r e made up o f the  following primitivesi 1) the boundaries o f s e l e c t e d p o i n t s , l i n e s or polygons from a g i v e n l o c a t i o n a l f i l e ; 2) symbolism* (a) shading o f polygons a c c o r d i n g to the value of one o f t h e i r a t t r i b u t e s ; (b) l a b e l l i n g of p o i n t s , l i n e s or polygons w i t h the numeric or alphameric v a l u e o f one of t h e i r a t t r i b u t e s ; (c) r e g u l a r geometric symbols a t the c e n t r e of the p o i n t l i n e o r polygon; 3)  title.  A l l maps c o n t a i n a t l e a s t the s e l e c t e d boundaries, and they may a l s o be symbolized any  and have a t i t l e .  Furthermore,  two of the three types o f symbolism can be combined l n  a map.  105  4.2.3  Graphics Commands  At t h i s p o i n t , I t Is I n t e r e s t i n g t o c o n s i d e r the syntax of the g r a p h i c s  commands because I t c l e a r l y  GIDS view of the p r i m i t i v e s o f a map. a l s o provides  a concrete  command language.  This  reflects  consideration  example of the advantages of a  We s h a l l d e f i n e the syntax and then  Illus-  t r a t e v a r i o u s options o f the DRAW command (see F i g . 4.4). An example o f a SUPERIMPOSE appears In F i g u r e 4.5. denotes an o p t i o n a l parameter. •qflle'  ['marked' BY 'fieldname*] £bN 'graphic device?]  •qflle' T h i s s p e c i f i e s the name o f the f i l e and t h e subset of the f i l e from which the p o i n t , l i n e or polygon boundaries a r e t o be drawn. •marked  1  BY * fieldname•  T h i s parameter s p e c i f i e s the type of symbolism t o be used on the map. I f i t Is omitted no symbolism Is drawn (see F i g . 4.4 a ) . Some of the types of symbolism a v a i l a b l e a r e shown l n the p l o t s of F i g u r e 4.4. .... A complete l i s t of the marking o p t i o n a v a i l a b l e Is given l n Appendix A. Note t h a t the command s t r i n g Is a u t o m a t i c a l l y used as a t i t l e f o r the map. ON 'graphic  device'  T h i s parameter c o n t r o l s the graphic d e v i c e t o which the graphs a r e to be d i r e c t e d . S e c t i o n 4.2.5 d e s c r i b e s the g r a p h i c d e v i c e s a v a i l a b l e a t UBC.  FIGURE 4.4  DRAW  (MUNI.R.MUNI.G)  106  CODED AND SYMBOLLED BY MUNICIPALIT  FIGURE 4.4  DRAW  (MUNI.R.MUNI.G) CODED BY MUNICIPALITY  DRAW  (MUNI.R.MUNI.G) SHADED BY MUNICIPALITY  10?  f  DRAW  (MUNI.R.MUNI.G) CODED AND SHADED BY MUNICIPALITY  DRAW  (MUNI.R.MUNI.G) TRIANGLED  BY MUNICIPALITY  DRAW  (MUNI.R.MUNI.G) SHADED AND TRIANGLED  DRAW  (MUNI.R.MUNI.G) CODED AND TRIANGLED  F i g u r e 4.4  A map o f 3 m u n i c i p a l i t i e s  symbolized  BY MUNICIPALIT  BY MUNICIPALITY  l n v a r i o u s ways.  109  ( IBRD RIVER  DEflSE LAKE  FINLflY  STIKINI  D MF)P_805.G SUP  (MAP_804.R.MAP_804.G)  Figure 4 . 5  L A B E L L E D BY WATER-ELEMENT  Sample output produced by a DRAW command f o l l o w e d by a SUPERIMPOSE command. ( T h i s map d e p i c t s a s e c t i o n of n o r t h e r n B r i t i s h Columbia).  110  4.2.4  Shading and Geometric  Symbolism  Symbolism  employs d i f f e r e n t i a t i o n l n shape, s i z e or  c o l o u r t o connote d i f f e r e n c e s i n s p a t i a l I n f o r m a t i o n . types o f symbolism commentst  1  Two  used by GIDS p a r t i c u l a r l y meant some  shading and geometric  symbolism.  Shading Is a powerful symbolism regions of d i f f e r e n t c h a r a c t e r i s t i c s .  for differentiating (See the example i n  Appendix C which shades r e s i d e n t i a l l a n d by d e n s i t y — t h e h i g h e r the d e n s i t y the d a r k e r the shade).  In a shaded map  each polygon i s shaded to one of seventeen l e v e l s o f darkness (see P i g . 4.4. e and f ) .  The darkness o f a polygon Is  l i n e a r l y p r o p o r t i o n a l to the v a l u e o f the "SHADED BY" a t t r i bute A.  The f o r m u l a used i s darkness = 16 x (A - MINA) MAXA-MINA where MINA and MAXA a r e the minimum and maximum v a l u e s of the a t t r i b u t e s f o r a l l s e l e c t e d polygons.  To produce a shaded graph, the s e l e c t e d f l i e s must be r e a d t w i c e , the f i r s t time to determine MINA and MAXA, and the second time t o draw and shade  the graph.  Shading i s Implemented by p a r a l l e l l i n e s p a t t e r n s , dot  p a t t e r n s , o r c h a r a c t e r p a t t e r n s depending on the g r a p h i c  S e e Mapping Q u a n t i t a t i v e Information ( F i s h e r . 1970) f o r I l l u s t r a t i o n s o f many types o f symbolism. x  Ill  d e v i c e (see Table VII)  To f a c i l i t a t e the d i f f e r e n t i a t i o n  of r e g i o n s shaded by p a r a l l e l l i n e s , the angle  Is v a r i e d as  a f u n c t i o n of the shading f a c t o r (see F i g . 4.6). TABLE V I I METHOD OF SHADING ON DIFFERENT DEVICES  Device 1)  Method f o r Shading on Area  Method f o r d i f f e r e n t i a t i n g darkness  families of parallel l i n e s w i t h i n area  v a r i a t i o n l n angle and s p a c i n g of parallel lines  2) Dot p r i n t e r s  regular dot pattern w i t h i n an area  d e n s i t y of dots  3) L i n e p r i n t e r  the same c h a r a c t e r a t every p r i n t p o s i t i o n w i t h i n an area  the darkness of the p r i n t character  Plotters, Vector CRT'S  GIDS employs two types o f shading f o r the p l o t t e r s : p a r a l l e l l i n e shading and c r o s s - h a t c h i n g as shown l n F i g u r e 4.6 i a ) and (b) r e s p e c t i v e l y .  Robinson notes t h a t d o t p a t t e r n s a r e  v i s u a l l y more s t a b l e than p a r a l l e l l i n e s (1969* p. 255). However, d o t t e d shading  Is a l s o much more d i f f i c u l t  plement on a p e n - p l o t t e r d e v i c e .  to Im-  The c r o s s - h a t c h i n g e f f e c t ,  which i s achieved by drawing two f a m i l i e s of p a r a l l e l  lines  p e r p e n d i c u l a r t o each o t h e r , Is more p l e a s i n g t o the eye but almost twice as expensive  as there a r e twice as many shade  l i n e s t o draw (see Table V I I I ) .  D (DISTRICTS.R.DISTRICTS.G) SHRDED BY HIGHWflY_DIS  F i g u r e 4.6 a  An example of p a r a l l e l l i n e shading on the calcomp. (This d e p i c t s 8 highway d i s t r i c t s i n B.C.)  113  114  TABLE V I I I THE EFFECT OF MAP SIZE AMD THE TYPE OF SHADING ON THE COST OF DRAWING ON THE PLOTTER  Parallel line Shading P l o t time f o r l a r g e  Cross-hatching  plot  29.3 minutes  VPlot time f o r s m a l l p l o t  5.0 minutes 1 9.75  $19.98  f o r small p l o t  I.67  3.08  CPU time f o r l a r g e  20.3 seconds  plot  CPU time f o r s m a l l p l o t CPU c o s t f o r l a r g e CPU cost  9.25 minutes  plot  P l o t cost f o r l a r g e P l o t cost  59.9 minutes  30.1 seconds  11.89 seconds 14.00 seconds  plot  $ 1.41  $ 2.09  f o r small p l o t  0.85  1.00  Large P l o t = 34" x 26" Small P l o t = 12" x 9" P l o t t e r = Calcomp Table V I I I a l s o shows the e f f e c t of the map s i z e on the  plot costs;  by r e d u c i n g the map by a f a c t o r o f t h r e e  the p l o t c o s t was reduced by a f a c t o r o f s i x . The  use o f s m a l l geometric c h a r a c t e r s as symbolism i s  achieved by drawing a r e g u l a r  n-gon a t the c e n t r o i d  polygon w i t h n b e i n g p r o p o r t i o n a l "SYMBOLIZED BY" a t t r i b u t e  o f the  to the value of the  (see F i g . 4.4 b and c ) .  T h i s type  115  of  symbolism i s most a p p r o p r i a t e f o r nominal data such as  l a n d use codes.  However, GIDS c h o i c e of symbols Is poor  because I t Is very d i f f i c u l t to d i s t i n g u i s h between an n-gon and an (n+l)-gon when n Is g r e a t e r than about 5« A l s o , the user cannot c o n t r o l the symbols as the number of s i d e s Is determined  by a formula depending on the minimum  and maximum codes.  Hence, a l a n d use code of 40 f o r  might be r e p r e s e n t e d as a square In another.  "vacant"  l n one p l o t and a hexagon  For these two reasons geometric  symbolism  has  not been very u s e f u l i n GIDS. Shading and symbolism c o u l d be much improved I f the f o l l o w i n g f e a t u r e s were Included In GIDSt 1) the a b i l i t y to d e f i n e a f u n c t i o n t h a t a s s o c i a t e s d i f f e r e n t values of an a t t r i b u t e w i t h g i v e n shadings or symbols. T h i s would enable a user to b e t t e r c o n t r o l the symbolism on h i s map. 2) the a b i l i t y to code, shade by, or symbolize the values of a r i t h m e t i c e x p r e s s i o n s , Instead of j u s t the values of f i e l d s . For Instance, I f one had the p o p u l a t i o n of each census t r a c t , one c o u l d shade by POPULATION/AREA and hence display a population density. 3) the a b i l i t y  to Include t e x t of s p e c i f i e d s i z e a t  a s p e c i f i e d p o s i t i o n on a 4.2.5  Graphics Devices A v a i l a b l e  Most mapping systems are geared one d e v i c e . for  map.  For SYMAP (Harvard, 1968)  e x c l u s i v e l y towards I t Is the l i n e  printer,  h i g h accuracy systems I t Is the f l a t b e d p l o t t e r , and f o r  I n t e r a c t i v e systems I t Is the CRT.  However, o f t e n there are  s e v e r a l d i f f e r e n t graphic devices a v a i l a b l e at a s i n g l e  116  installation.  These d e v i c e s u s u a l l y  c h a r a c t e r i s t i c s and stances.  hence are u s e f u l  have a wide range of in different  circum-  For example, t h e r e are a t l e a s t f i v e types of  g r a p h i c d e v i c e s a t the U n i v e r s i t y  of B r i t i s h Columbia.  1) Adage i n t e r a c t i v e g r a p h i c s t e r m i n a l . I t g i v e s the q u i c k e s t response and most v e r s a t i l i t y but i s a l s o the most expensive to use. It can be c o n t r o l l e d i n t e r a c t i v e l y v i a a l i g h t pen and other i n t e r a c t i v e c o n t r o l s . 2) T e c h t r o n i x Storage Scope. T h i s CRT d e v i c e has a slower response time than the adage but i s much cheaper to use. I t s screen i s s m a l l e r than the adage but can hold more i n f o r m a t i o n . 3) Calcomp drum p l o t t e r s . These are pen p l o t t e r s t h a t produce hard copy p l o t s of widths 10 and 30 inches on blank or graph paper. T h e i r p l o t s are much higher q u a l i t y than p r i n t e r p l o t s but much more expensive (|20 an hour f o r p l o t time) and have stjnuch l o n g e r response time ( a t l e a s t several hours). However, calcomp p l o t s are a c c u r a t e to .01" whereas l i n e p r i n t e r s are a c c u r a t e to one c h a r a c t e r i n the x - d i r e c t i o n and one p^inkallneiln^theay-direction. (See f i g . 4.4). 4) L i n e p r i n t e r . T h i s produces hard copy p l o t s much cheaper and q u i c k e r than a p l o t t e r . However, the q u a l i t y of maps i s much l e s s . (See F i g . 4.7). 5) V e r s a t e c dot p r i n t e r . This e l e c t r o s t a t i c printer produces small hard-copy p l o t s which are of comparable accuracy to the p l o t t e r output. E s p e c i a l l y good shading e f f e c t s can be obtained (see F i g . 4.8). C l e a r l y t h e r e i s a wide spectrum of d e v i c e s a t GIDS i s d i f f e r e n t from other systems i n t h a t  UBC.  i t does not  r e s t r i c t a user to one d e v i c e , but l e t s him choose the d e v i c e most s u i t e d to h i s needs. and d i r t y " map  For example, i f he wants a "quick  he can use the l i n e p r i n t e r , but i f he wants  a good r e f e r e n c e p l o t he can use the calcomp or d o t  printer.  117  Figure 4 . 7  A p l o t of Vancouver on the dot p r i n t e r .  * * *. * * * **  ******** r * * * * *  * *  * * *  ** *  *********** ******* * * *  **.*** «* * *  * *  * ****  * * * * * * * * * * *  * * * ** * * * ** * ** **  (.**»****  Figure 4 . 8  A p l o t of three m u n i c i p a l i t i e s  ** * ** * *  >  on the l i n e  printer.  lit?  4.2.6  Device-Independent Graphics and Other Concepts  The c e n t r a l concept behind the GIDS g r a p h i c s system i s device-independent g r a p h i c s .  The i d e a i s t h a t a l l the  d e v i c e dependencies o f d i f f e r e n t g r a p h i c d e v i c e s a r e made invisible  to the user.  Hence, he can choose t h e d e v i c e most  s u i t e d to h i s needs without concern f o r the d e t a i l s . A c a n o n i c a l graph and a l o g i c a l area are two other u s e f u l concepts t h a t are r e l a t e d t o device-independent graphics. A c a n o n i c a l graph i s an a b s t r a c t i o n o f the shape o f a graph, independent of the d e v i c e , s c a l e , and mode of p r e s e n t a t i o n . I t i s a g e n e r a l i z e d form f o r r e p r e s e n t i n g a g r e a t v a r i e t y of graphs. A l l the i n f o r m a t i o n r e q u i r e d to p l o t a graph can be obtained from the c a n o n i c a l graph d a t a s t r u c t u r e . A l o g i c a l a r e a i s an a b s t r a c t i o n of the medium or d e v i c e on which the graph i s to be p l o t t e d . Both these concepts o r i g i n a t e d i n the g r a p h i c s package of the S i m u l a t o r / S u p e r v i s o r system (Parker, 1971 c; McRae, 1972) developed i n the Department of Computer Science a t the U n i v e r s i t y o f B r i t i s h Columbia.  T h i s i s a system f o r super-  v i s i n g the e x e c u t i o n of i n t e r a c t i n g s i m u l a t i o n models i n whioh the  r e l a t i o n s h i p s among the v a r i a b l e s can be d i s p l a y e d on any  l o g i c a l a r e a as l i n e , p o i n t , or other types o f graphs a l l s t o r e d as c a n o n i c a l graphs.  On h i s experience w i t h t h i s  system the author found t h a t the c a n o n i c a l graph and the l o g i c a l a r e a concepts c l a r i f i e d  the problem of having many  types o f graphs which can be p l o t t e d on many d e v i c e s .  D i s p l a y space Is a term used In computer g r a p h i c s f o r the space on which graphs may  be drawn.  p l o t t e r I t Is the paper and f o r a CRT  For a p r i n t e r or  d e v i c e I t Is the screen.  Rather  than drawing only one graph on a l l of the d i s p l a y  space,  I t may  be advantageous to d i v i d e d i s p l a y space i n t o  s e v e r a l l o g i c a l areas and draw one graph on each a r e a . example, two and  l o g i c a l areas may  then g r a p h i c output may  than to a " d e v i c e . "  One  For  be e s t a b l i s h e d on a p l o t t e r  be d i r e c t e d to an "area" r a t h e r  can Imagine there Is one  virtual  d e v i c e f o r each a r e a whose job i s to p l o t on t h a t a r e a . An analogy  can be drawn between a l o g i c a l u n i t and  l o g i c a l area of a FORTRAN program, PROG, w r i t e s output l o g i c a l unit 7.  a  on  L o g i c a l u n i t 7 must be assigned to a 2  p h y s i c a l u n i t ( f i l e or d e v i c e ) b e f o r e e x e c u t i o n .  Similarly  a l o g i c a l a r e a must be assigned to a p h y s i c a l area ( g r a p h i c s d e v i c e ) b e f o r e g r a p h i c output 4.2.7  The  obtained.  Original  Graphics The  can be  Design  o r i g i n a l p l a n f o r the GIDS g r a p h i c s system  u t i l i z e d both the c a n o n i c a l graph s t r u c t u r e and l o g i c a l concepts.  F i r s t , an e x t r a c t o r r o u t i n e s e l e c t e d the data  massaged I t Into c a n o n i c a l graph form. processed area  area and  Then, a second r o u t i n e  the c a n o n i c a l graph and p l o t t e d i t on the  logical  (see F i g . 4 . 9 ) .  *Under MTS the f o l l o w i n g command e s t a b l i s h e s t h i s assignment: #RUN PROG 7 = OUTPUT  120  F i g u r e 4.9  The o r i g i n a l d e s i g n o f t h e g r a p h i c s subsystem.  S e v e r a l c a n o n i c a l graphs per d e v i c e were t o be s t o r e d i n computer memory.  T h i s would have f a c i l i t a t e d v a r i o u s  i n t e r a c t i v e m a n i p u l a t i o n s on the image such as those  performed  by Deecker's system (1971)J change of s c a l e and c e n t r e , and e n l a r g i n g o f one p a r t o f the image to f i l l  the s c r e e n .  However, we f i n a l l y decided not to implement t h i s because i t was n o t u s e f u l i n b a t c h and one o f our d e s i g n c r i t e r i a was t h a t the system be easy to use i n t e r a c t i v e l y and i n batch. Graphs produced  by r e a l world  users o f GIDS u s u a l l y  c o n t a i n too much i n f o r m a t i o n t o be viewed on o n l y p a r t o f d i s p l a y space; b u t i f o n l y one a r e a i s r e q u i r e d on each g r a p h i c d e v i c e the l o g i c a l area.concept  Is not very  useful.  Hence we decided a g a i n s t u s i n g l o g i c a l areas; graphs a r e d i r e c t e d to d e v i c e s r a t h e r than areas w i t h commands l i k e "DRAW...ON CALCOMP" r a t h e r than "DRAW...ON AREA 1" In the end, the drawing o f maps was implemented as another  sequential f i l e processing operation.  i s drawn, symbolized  Each polygon  and then f r e e d before the next  polygon  i s read In; the o n l y r e c o r d o f i t t h e r e a f t e r i s i n the p l o t . Device  independence was Implemented, b u t l o g i c a l areas and  c a n o n i c a l graphs were n o t .  121  4.2.8'  Implementation of Device  Device a standard The  Independence  Independence has been Implemented by e s t a b l i s h i n g  i n t e r f a c e f o r p l o t t i n g on a l l the g r a p h i c s d e v i c e s .  i n t e r f a c e used i s the UBC PLOT r o u t i n e s 3 p l u s one added  r o u t i n e f o r shading.  Any program, which draws graphs by  c a l l i n g the UBC PLOT r o u t i n e s , Is d e v i c e independent In t h a t the graphs can be d i r e c t e d to any d e v i c e merely by running the program w i t h the a p p r o p r i a t e v e r s i o n of the UBC PLOT r o u t i n e s for that device.  T h i s program i s l i k e a tap spewing out  graphs and each v e r s i o n of the UBC PLOT r o u t i n e s i s l i k e a hose which i s connected t o i t s g r a p h i c d e v i c e a t one end and which can be screwed onto the t a p a t the other end (see P i g . 4.10). When the command i s scanned, the g r a p h i c d e v i c e , D, i s determined.  Then t h e r e a r e almost three tasks to be performed  which a r e s p e c i f i c to the d e v i c e : 1) Obtain the addresses o f the UBC PLOT r o u t i n e s f o r d e v i c e D. 2) Obtain the s i z e of d i s p l a y space f o r the d e v i c e so t h a t graphs can be s c a l e d to f i t on the d e v i c e . 3) Handle other device-dependent f e a t u r e s such as queuing p l o t s f o r the calcomp.  •-'This i s a package o f FORTRAN-callable r o u t i n e s f o r p l o t t i n g l i n e s , symbol, axes, e t c . Versions have been w r i t t e n f o r t h e adage, calcomp, l i n e p r i n t e r ( C o u l t h a r d ) , t e c h t r o n i x (Webb), and dot p r i n t e r (Mathews) and are a v a i l a b l e from the UBC Computing Centre.  122  F i g u r e 4.10 The  Device Independent  graphics  draw r o u t i n e i s d e f i n e d as the program which i n i t i a t e s the g r a p h i c output i n t h a t i t invokes the UBC PLOT r o u t i n e s .  123  There a r e two methods f o r performing the f i r s t two of these t h r e e tasks$ the sandwich method.  I have dubbed them the s w i t c h method and In the s w i t c h method the draw r o u t i n e  keeps t r a c k of the a p p r o p r i a t e s i z e of d i s p l a y space and c a l l s a s w i t c h r o u t i n e which switches c o n t r o l to the a p p r o p r i a t e v e r s i o n of the UBC PLOT r o u t i n e s f o r d e v i c e D.  T h i s method  was used by the S i m u l a t o r / S u p e r v i s o r System. draw routine switch routine UBC PLOT routines F i g u r e 4.11  f  ADAGE routines  CALCOMP routines  LINE PRINTER routines  The s w i t c h method of d e v i c e  DOT PRINTER! routines  independence.  In the sandwich method a p r e p r o c e s s i n g r o u t i n e handles the d e v i c e dependence so t h a t the draw r o u t i n e can be comp l e t e l y ignorant of the g r a p h i c d e v i c e on which i t i s p l o t t i n g . The  preprocessor  scans the command t o determine the d e v i c e ,  s e t s the s i z e of d i s p l a y space In a common a r e a , and s e l e c t s the c o r r e c t UBC PLOT r o u t i n e s t o pass to the l o a d e r .  Hence,  upon dynamic l o a d i n g of the draw r o u t i n e i t i s a u t o m a t i c a l l y l i n k e d to the c o r r e c t UBC PLOT r o u t i n e s .  The advantage of  the sandwich method i s t h a t d e v i c e dependence i s completely i s o l a t e d from the draw r o u t i n e . approach.  GIDS uses the sandwich  124  UBC PLOT routines  DRAW routine  routines  F i g u r e 4.12  The sandwich method of device  independence  125  4.3  THE  INTERSECTION SUBSYSTEM The GIDS i n t e r s e c t i o n system  i n t e r s e c t s two as the f i r s t  (INTERSECT command)  s e t s of polygons f o r use as an o v e r l a y or  step i n a r e g i o n a l base t r a n s f o r m a t i o n .  T h i s s e c t i o n w i l l d i s c u s s the m o t i v a t i o n f o r i n t e r s e c t i o n , then the techniques f o r i n t e r s e c t i n g two and f i n a l l y  the techniques f o r i n t e r s e c t i n g two  polygons  sets of  polygons. 4.3.1  Motive t l o n — R e g i o n a l Base T r a n s f o r m a t i o n  In the o r i g i n a l c o n c e p t i o n of GIDS, one of the most important o p e r a t i o n s was For  the r e g i o n a l base t r a n s f o r m a t i o n .  example, one might have a map  and another map  showing s o i l type polygons  of study a r e a s , and wants to g e t the area of  each s o i l type w i t h i n each study polygon (see F i g . 4.13). T h i s t r a n s f o r m a t i o n i s performed and a g g r e g a t i o n .  First,  In two s t e p s * i n t e r s e c t i o n ,  the s o i l and study polygons are i n t e r -  s e c t e d , then the area of the d i f f e r e n t s o i l types are aggregated to the boundaries of the study polygons. The o r i g i n a l p l a n c a l l e d f o r performing both these steps w i t h i n a s i n g l e GIDS command and not s a v i n g the polygons of i n t e r s e c t i o n a f t e r w a r d s .  However, l t became c l e a r t h a t the  i n t e r s e c t i o n f i l e was  i n i t s own r i g h t .  composite  useful  One  can  use  c r i t e r i a f o r s e l e c t i n g polygons from i t , or o v e r l a y  i t w i t h a t h i r d s e t of polygons.  126 SOIL TYPE  rea=2)  STEP l l Intersection  Study Area  1 1 2 2 3 3 3 STEP 2t Aggregation  F i g u r e 4.13  Study Area  Area o f Peat  Area of Sand  1  2  8  2  7.5  1.5  3  6.5  2.5  SAND PEAT PEAT SAND PEAT SAND SAND  Area  8 2 7.5 1.5 6.5 0.5 2  R e g i o n a l base t r a n s f o r m a t i o n .  Hence, two subsystems subsystem  Soil Type  o f GIDS were b o r n — t h e  intersection  ( S e c t i o n 4.3) and the aggregation subsystem3  e t a l , 1973).  (Leong,  To perform a r e g i o n a l base t r a n s f o r m a t i o n a  3This t h e s i s i s a l r e a d y too l o n g f o r the a g g r e g a t i o n system to be d i s c u s s e d .  127  user must g i v e an INTERSECT command, and then an AGGREGATE command. 4.3.2  Intersecting Two Polygons  4.3.2.1  E x i s t i n g Algorithms  S e v e r a l algorithms been d e s c r i b e d  f o r i n t e r s e c t i n g two  i n the l i t e r a t u r e  Deecker, 1970).  (Arms, 1968;  polygons have Franklin,  1972;  F r a n k l i n ' s ANOTB r o u t i n e i s i n t e r e s t i n g  because i t can f i n d not only the i n t e r s e c t i o n but a l s o  the  union and a l l of the other 16 p o s s i b l e r e l a t i o n s between polygons. and  We  two  obtained ANOTB from the U n i v e r s i t y of Ottawa  found i t not completely  r e l i a b l e and not s u i t a b l e f o r  l a r g e d a t a bases because of i t s very l a r g e storage r e q u i r e ments. In h i s t h e s i s , Deecker (1970, p. 53) presented algorithms basic  f o r i n t e r s e c t i n g polygons.  two  They c o n s i s t of  three  steps; 1) f i n d the equations of a l l the l i n e segments then l o c a t e any p o i n t s of i n t e r s e c t i o n ;  and  2) i n s e r t these p o i n t s of i n t e r s e c t i o n i n the a p p r o p r i a t e p l a c e s i n the l i s t s of boundary c o o r d i n a t e s of the two polygons; t r a c e through these l i s t s using a p o i n t i n polygon r o u t i n e to determine which p o i n t s from one l i s t are i n s i d e the other polygon. 4.3.2.2 One  P o i n t i n Polygon Algorithms  of the most b a s i c o p e r a t i o n s r e q u i r e d by an  inter-  s e c t i o n r o u t i n e i s a p o i n t i n polygon d e t e r m i n a t i o n , which i s to  determine i f a g i v e n p o i n t i s i n s i d e , o u t s i d e , or on  the  128  boundary of a g i v e n polygon as shown below. Inside  Outside  On the boundary  S e v e r a l p o i n t In polygon algorithms described  In the l i t e r a t u r e  Chapter 11).  Aldred  d i f f e r e n t methods and  ( A l d r e d , 1972;  have been Tomlinson,  compared the performance of  1972,  eleven  found the l i n e - e x t e n s i o n method to be  the f a s t e s t s i n g l e method t h a t g i v e s a complete s o l u t i o n i n a l l cases.  This algorithm  uses the g e n e r a l p r i n c i p l e t h a t  i f a l i n e Is extended i n d e f i n i t e l y i n one d i r e c t i o n from the p o i n t under c o n s i d e r a t i o n , i t w i l l i n t e r s e c t an odd polygon s i d e s i f the p o i n t l i e s  number of  Inside the polygon and  even number otherwise (see F i g . 4.14). polygon r o u t i n e of t h i s type obtained  an  GIDS uses a p o i n t i n from David Douglas a t  the U n i v e r s i t y of Ottawa. P o i n t 1 i s i n s i d e P s i n c e there Is an odd number of i n t e r s e c t i o n s P o i n t 2 i s o u t s i d e P s i n c e there Is an even number of I n t e r s e c t i o n s  Point F i g u r e 4.14  2  The l i n e extension determination.  Aldred described  method f o r p o i n t i n polygon  another c l a s s of p o i n t i n polygon  methods which are quicker  than the l i n e extension  method but  129  do not always g i v e a s o l u t i o n .  T y p i c a l of these  i s the  s m a l l e s t r e c t a n g l e method which can sometimes i n d i c a t e very q u i c k l y t h a t the p o i n t i s o u t s i d e the polygon.  I f the p o i n t  i s o u t s i d e the s m a l l e s t r e c t a n g l e c o n t a i n i n g the polygon, i t i s o u t s i d e the polygon.  However, i f the p o i n t i s i n s i d e the  r e c t a n g l e , i t i s not determined whether the p o i n t i s i n s i d e the polygon or n o t , and another method must be a p p l i e d (see F i g . 4.15). I f a p o i n t i s o u t s i d e the r e c t a n g l e i t must be o u t s i d e the polygon  I f a p o i n t i s i n s i d e the r e c t a n g l e i t i s not n e o e s s a r i l y I n s i d e the polygon F i g u r e 4.15  The s m a l l e s t r e c t a n g l e method f o r p o i n t i n polygon d e t e r m i n a t i o n  An i n t e r e s t i n g r e s u l t A l d r e d found was t h a t a m u l t i stage p r o c e s s ,  such as the s m a l l e s t r e c t a n g l e method f o l l o w e d  by the l i n e - e x t e n s i o n method, was f a s t e r than the l i n e e x t e n s i o n method a l o n e . 4.3.2.3 The  GIDS method  a l g o r i t h m GIDS uses t o i n t e r s e c t two polygons has  been programmed and documented by Dale Troyer  (1972).  B a s i c a l l y , i t f o l l o w s the three steps r e f e r r e d to i n S e c t i o n 4.3.2.1.  Since Deecker (1970) has a l r e a d y provided  mathematical d e s c r i p t i o n of a s i m i l a r a l g o r i t h m , we e x p l a i n GIDS a l g o r i t h m by example.  us w i t h a shall  130  F i g u r e 4.16 w i t h polygon B. found  shows the steps i n i n t e r s e c t i n g polygon  In the f i r s t stage, the i n t e r s e c t i o n s are  and l a b e l l e d w i t h numbers.  are i n s e r t e d i n the l i s t and  A  the B - l i s t .  Now  In the second stage,  they  of c o o r d i n a t e s as shown to form A - l i s t  the polygons  o f i n t e r s e c t i o n are  found.  S t a r t a t ( 1 ) , the f i r s t p o i n t of i n t e r s e c t i o n ; mark l t , then b e g i n t r a c i n g along polygon B In the d i r e c t i o n t h a t i s i n s i d e polygon  A.  One  of the p o i n t s adjacent to (1) i n the  must be I n s i d e polygon  A and one c a l l to the p o i n t i n polygon  r o u t i n e w i l l determine which one.  Now  t r a c e along B i n t h a t  d i r e c t i o n u n t i l the next p o i n t o f I n t e r s e c t i o n . marked, a complete polygon I f n o t , change polygons. 2 polygons  We  F o l l o w i n g t h i s method we  found. find  the  i n F i g . 4.16).  E x t e n d i b l e Design  designed  i n such a way  If i t i s  of i n t e r s e c t i o n has been  of i n t e r s e c t i o n (the shaded areas  4.3.2.4  B-list  the modules of the i n t e r s e c t i o n r o u t i n e  t h a t polygon  union, complement, and other  r o u t i n e s c o u l d be e a s i l y added.  The  f i r s t two  such  steps are the  same f o r a l l these o p e r a t i o n s ; namely, f i n d the p o i n t s of i n t e r s e c t i o n and  i n s e r t them i n a l i s t of c o o r d i n a t e s .  However, the t r a c i n g step i s d i f f e r e n t f o r polygon  intersec-  t i o n , union, e t c .  to  the two  Thus we wrote one r o u t i n e , INT,  steps which are common t o a l l , and a separate r o u t i n e ,  ITRACE, to read i n the l i s t and  perform  t r a c e the polygons  of c o o r d i n a t e s and  of i n t e r s e c t i o n .  d e s i g n i n t h a t a polygon  intersections  T h i s i s an e x t e n d i b l e  union program c o u l d be achieved  by w r i t i n g a union t r a c i n g program (see F i g . 4.17).  simply  131 Stage l t F i n d the p o i n t s o f I n t e r s e c t i o n .  Stage 2t I n s e r t them In the l i s t s of c o o r d i n a t e s In the order they occur on the polygon boundary A-llstt B-llstt  (Ai,l,A ,A3,A4,A5,A6,4,A7,3,2,A ) 2  1  (,B B2,l Bj 2 B^ 3 3 ,k,Bs Bi) lt  t  t  f  t  t  5  t  Stage 3t t r a c e through these l i s t s f i n d i n g which p o i n t s from one l i s t are I n s i d e the other polygon  The polygons of I n t e r s e c t i o n are shaded In here  F i g u r e 4.16  The t h r e e stages In i n t e r s e c t & n g polygons A and B  132  INT routine for finding p o i n t s of intersection  INTERSECTION TRACING ROUTINE (ITRACE)  A Fig.  4.1?  and  B  I  ! UNKDN ! I TRA(:ING j ! R0U1DINE i _  \  i i  COMPLEMENT TRACING ROUTINE i  A  or  B  A  not  B  The s t r u c t u r e of the i n t e r s e c t i o n r o u t i n e s showing the e x t e n d i b l e d e s i g n . A d o t t e d box i n d i c a t e s the r o u t i n e is not y e t w r i t t e n .  4.3.2.5  Methods f o r Speeding up I n t e r s e c t i o n  Since i n t e r s e c t i o n i s the most c o s t l y o p e r a t i o n performed by GIDS, v a r i o u s techniques were considered f o r reducing t h i s cost.  Three of these techniques w i l l be  d e s c r i b e d ; namely, checking f o r the I n t e r s e c t i o n of minimal r e c t a n g l e s , checking f o r n e x t i n g of polygons, polygons.  and r e d u c i n g  133  The  first  technique  Is to f i n d  the I n t e r s e c t i o n o f  the minimal bounding r e c t a n g l e s of the polygons.  A null  I n t e r s e c t i o n of the r e c t a n g l e s Is a s u f f i c i e n t b u t not a necessary  c o n d i t i o n f o r a n u l l i n t e r s e c t i o n o f the polygons.  Nevertheless,  t h i s t e s t e l i m i n a t e s the m a j o r i t y of cases,  (see F i g . 4.18) and i s r e l a t i v e l y cheap. by  Thus, l t i s used  the GIDS i n t e r s e c t i o n r o u t i n e s . Since the r e c t a n g l e s do not i n t e r s e c t , the polygons do not i n t e r s e c t  Rectangles 2 and 3 both i n t e r s e c t 1, but polygon 2 i n t e r s e c t s 1 whereas polygon 3 does not  F i g u r e 4.18  I n t e r s e c t i o n o f the minimal r e c t a n g l e s can o f t e n a v o i d i n t e r s e c t i o n o f the polygons.  ^A second t r i c k Is a p p l i c a b l e when I n t e r s e c t i n g two polygons of w i d e l y d i f f e r i n g s i z e s . sect a t a l l ,  inter-  there i s a high p r o b a b i l i t y t h a t the s m a l l e r  polygon w i l l be completely The  I f these polygons  i d e a Is to r e c o g n i z e  contained  i n the l a r g e r polygon.  t h i s containment, and hence a v o i d  intersection. Assume polygon A i s s m a l l r e l a t i v e t o polygon B (see F i g . 4.19) and R rectangles.  A  and Rg are the r e s p e c t i v e minimal bounding  I f R^ i s contained  i n B, A i s contained  i n B,  134  I.e.,  R  In B i s a necessary (but not a s u f f i c i e n t ) con-  A  d i t i o n f o r A i n B. routine  we may be a b l e to a s c e r t a i n  hence A i s i n B. tensive  By f o u r c a l l s t o the p o i n t that B  A  i n polygon  Is i n B, and  Checking f o r t h i s n e s t i n g i s more ex-  than checking f o r the i n t e r s e c t i o n o f minimal  r e c t a n g l e s and l e s s l i k e l y t o be a p p l i c a b l e ;  i t was not  Included i n GIDS.  F i g u r e 4.19  T e s t i n g i f the bounding r e c t a n g l e of polygon A Is contained i n polygon B.  In g e n e r a l , i n t e r s e c t i n g sides  Is an n by m p r o c e s s .  two polygons w i t h n and m  When the number o f s i d e s Is  l a r g e and the two r e c t a n g l e s i n t e r s e c t , l t may be p r o f i t a b l e to.reduce the number o f s i d e s the  i n each polygon by i n t e r s e c t i n g  polygons w i t h the r e c t a n g l e of i n t e r s e c t i o n , and then  i n t e r s e c t i n g the two reduced polygons. f i g u r e below, i n s t e a d A  1  and B . 1  For example, i n the  of i n t e r s e c t i n g A and B we can I n t e r s e c t  135  (Mi*, the r e c t a n g l e of i n t e r s e c t i o n  the o r i g i n a l F i g u r e 4.20  the reduced p r o b l e m i n t e r s e c t A l and B l  problem—intersect A and B  Reducing the polygons b e f o r e i n t e r s e c t i o n .  C l e a r l y , t h i s o p e r a t i o n would not be p r o f i t a b l e i f the polygons had only three o r f o u r s i d e s , but would become more p r o f i t a b l e as the number o f s i d e s i n c r e a s e d .  We  wondered a t what p o i n t t h i s polygon r e d u c t i o n would become p r o f i t a b l e , and attempted to answer t h i s by an a n a l y s i s o f the algorithms  along  the l i n e Knuth has suggested (1970).  The d e t a i l s of t h i s appear i n Troyer's Results  report  i n d i c a t e d some b e n e f i t i n r e d u c i n g  (1972).  the polygons when  there were more than about twenty s i d e s i n each of the polygons. In summary, there a r e v a r i o u s techniques speed up the i n t e r s e c t i o n o f two polygons. of the minimal r e c t a n g l e s should  which may  The I n t e r s e c t i o n  always be found.  n u l l , the polygons do not i n t e r s e c t .  If i t i s  I f i t Is equal  to one  of the r e c t a n g l e s , i t may be worthwhile to check f o r nested polygons.  I f the number o f p o i n t s i s l a r g e , polygon r e d u c t i o n  may be u s e f u l .  136  4.3*3  I n t e r s e c t i n g Two  Sets of Polygons  4.3.3.1 In  The  Problem  p r a c t i c e , a geographic system must I n t e r s e c t not  two polygons but two f i l e s of polygons.  I f t h e r e are n  polygons i n f i l e A and m polygons i n f i l e B, t h e r e are nm p a i r s o f polygons which may the of  I n t e r s e c t each o t h e r .  However,  a c t u a l number o f polygons of i n t e r s e c t i o n i s of the order n+m.^  The problem, then, on which t h i s s u b s e c t i o n w i l l  focus, is—how  to e f f i c i e n t l y f i n d a l l the polygons from  f i l e B which I n t e r s e c t a g i v e n polygon from f i l e  A.  Various methods of a c h i e v i n g t h i s w i l l be d e s c r i b e d . S t r i p s o r t i n g , a method of sequencing polygons by t h e i r  loca-  t i o n s i n r e l a t i o n to s t r i p s , i s found t o be the most s u i t a b l e for  GIDS.  T h i s method i s d e s c r i b e d In some d e t a i l as i t i s  o r i g i n a l t o the author. Indexed f i l e problem (Arms, 1970)  s t r u c t u r e s have been used to s o l v e t h i s i n the f o l l o w i n g manner1 each square i n  a r e g u l a r g r i d serves as a key p o i n t i n g to a l l the polygons which l i e a t l e a s t p a r t i a l l y w i t h i n i t i n the same way the  g r i d squares on a road map  streets.  of  serve as an index t o the  For example, i n F i g u r e 4.21  g r i d squares Aa and Ba.  that  polygon P l i e s w i t h i n  Hence, only polygons from f i l e  B  For i n s t a n c e , i n one case we found t h a t 56O polygons i n t e r s e c t i o n were produced from the i n t e r s e c t i o n of two  maps w i t h n=96 and m=377.  137  t h a t i n t e r s e c t Aa o r Ba are c o n s i d e r e d f o r i n t e r s e c t i o n w i t h polygon P.  6  A  c y  ( *  /  ...polygon P from f i l e A 3  r—-  /  ?  polygons from from f i l e B  \  °\  \ ^  KS1 £a  Indexed file data structure  L I  3  F i g u r e 4.21  C <x  L y  Cb  A i  y  H  2  J ?  (o  2 5  z 2  10  10  Using an o v e r l a i d g r i d as an index t o the polygons.  Since we had decided to use s e q u e n t i a l f i l e s f o r GIDS, we c o u l d not apply t h i s i n d e x i n g method.  The f i r s t method  t h a t oomes t o mind f o r i n t e r s e c t i n g two s e q u e n t i a l f i l e s i s what might be c a l l e d the b r u t e f o r c e method*  Intersect a l l  n polygons from f i l e A w i t h a l l m polygons from f i l e B.  The  NRIS system (Boeing) employs such a b r u t e f o r c e technique for  intersection.  They read i n one polygon from f i l e A and  138  pass a l l of f i l e By by i t , then read the next polygon from f i l e A and do the same, e t c . T h i s method r e q u i r e s r e a d i n g and rewinding f i l e B n times, once f o r each of the polygons ln  f i l e A.  However, t h e i r I n t e r s e c t i o n times were  still  r e a s o n a b l e fin f i l e $ on a CDC 6600 computer. However, we can do b e t t e r than the b r u t e f o r c e method. By o r d e r i n g the polygons w i t h i n the s e q u e n t i a l f l i e s t h a t p r e s e r v e s some of the 2-dlmensIonal  locational  l n a way Informa-  t i o n , we can reduce the number of I n t e r s e c t i o n s t h a t must be made from nm. the  Each of the f o l l o w i n g methods of sequencing  polygons In a s e q u e n t i a l f i l e w i l l be c o n s i d e r e d ! (a) one-dlmensIonal (b) g r i d (c)  strip  4.3.3.2  ordering  ordering ordering One-DlmensIonal O r d e r i n g  Sequencing the polygons l n a f i l e a c c o r d i n g to t h e i r l o c a t i o n s l n the y dimension  (or the x dimension)  Is c a l l e d  a one-dlmenslonal o r d e r i n g .  T h i s s o r t could be keyed  to one  c o o r d i n a t e of the c e n t r o i d o r one c o o r d i n a t e of the minimal bounding r e c t a n g l e .  Since I t Is more u s e f u l t o know a bound  on the extent of a polygon than t o know where the polygon Is c e n t r e d , I t Is p r e f e r a b l e t o s o r t by the l a t t e r . sequenced  by minimum x v a l u e s Is shown l n F i g . 4.22 a.  t h a t o r d e r i n g o n l y conveys the  A file Note  Information about the l o c a t i o n of  polygons In the x - d l r e c t l o n .  For Instance, polygon B Is  c l o s e r to A than E or F a r e ; y e t , l n the f i l e , E and F are c l o s e r t o A than B I s .  F i g u r e 4.22 Polygons from the same map ordered i n s e v e r a l ways i n s e q u e n t i a l f i l e s . (The l e t t e r s u n i q u e l y i d e n t i f y polygons and the numbers g i v e t h e i r sequence).  14$  4.3.3.3  Grid Ordering  In t h i s case, a g r i d  Is chosen and each polygon Is  a s s i g n e d t o a g r i d square which I t I n t e r s e c t s on some b a s i s . ^ All  the polygons w i t h i n one g r i d square appear together on  the  sequential f i l e  order by minimum % w i t h i n the g r i d square.  G r i d squares c o u l d be arranged on the f i l e  l n a Morton M a t r i x  order as d e s c r i b e d by Tomlinson (1970, p. 71).  (This  Morton  M a t r i x order I s u s e f u l because I t p r o v i d e s a minimum s e q u e n t i a l s e a r c h on a s t a t i s t i c a l b a s i s between any two a d j a c e n t areas l n any d i r e c t i o n ) . 4.3.3.4  S t r i p Ordering  As shown l n F i g u r e 4 . 2 2 c, a s e t of h o r i z o n t a l  strips  which covers the map Is chosen and then each polygon Is a s s i g n e d to s t r i p on the b a s i s of I t s l a r g e s t  y value.  The f i l e i s  ordered by s t r i p s from top t o bottom and from l e f t t o r i g h t (by  the s m a l l e s t x-value o f a polygon) w i t h i n each I n d i v i d u a l  strip.  In e f f e c t , I maxy  o r d e r i n g the polygons.  I  m l n y l Is being used as a key f o r  S t r i p o r d e r i n g w i l l be d e s c r i b e d i n  more d e t a i l In the s e c t i o n s to come. 4.3.3.5  A View from Problem Solving  The problem of sequencing polygons i n a s e q u e n t i a l can be expressed i n terms of the metaphors of problem  the  file  solving.^  -'in F i g . 4.6 b, polygons are a s s i g n e d to g r i d squares on basis of t h e i r centrolds.  ^See, f o r example,N&llson s book (197D coverage o f problem s o l v i n g . 1  f o r a thorough  141  T y p i c a l l y i n problem s o l v i n g there i s a l a r g e problem space ( u s u a l l y r e p r e s e n t e d as a graph) which i s t o be searched for  states s a t i s f y i n g certain c h a r a c t e r i s t i c s  (goal  states).  Rather than s e a r c h i n g the space e x h a u s t i v e l y , there i s an attempt to d i r e c t derived  the s e a r c h by the use o f i n t u i t i v e l y  heuristics. In  the case a t hand, the problem space i s a l l the B-  polygons and t h e g o a l nodes a r e those B-polygons which s e c t a g i v e n polygon P.  inter-  Each B-polygon i s r e p r e s e n t e d as a  node i n the graph (see P i g . 4.23) and two nodes, 1 and j , are connected i f and only i f one can examine polygon 1 a f t e r polygon j . the  S i n c e the polygons can be searched i n any order  graph i s a complete graph as shown.  One-dimensional  o r d e r i n g , g r i d o r d e r i n g and s t r i p o r d e r i n g a r e a l l techniques for  "pruning" the graph i n t o a l i s t .  In some sense, they are  h e u r i s t i c s t h a t determine which B-polygon to c o n s i d e r next. 4.3.4  S t r i p Sort i n More D e t a i l  4.3.4.1  Algorithm f o r S t r i p Sorting a F i l e  There a r e two i n p u t s : 1) a f i l e F I o f polygons t o s o r t . ( F o r each polygon we know maxy and minx p a r t o f the dimensioning information); a  s  2) a l i s t o f y - v a l u e s which determine the s t r i p boundaries. There a r e three s t e p s to s t r i p s o r t i n g f i l e F I : SI.  Read the f i l e F I , s e q u e n t i a l l y . For each polygon determine the s t r i p number from the l i s t of y - v a l u e s and then w r i t e t h i s number and the polygon i n t o f i l e F2.  142  5.2.  S o r t f i l e F2 i n t o f i l e F3 i n ascending order by the s t r i p number and miny.  5.3.  Read the f i l e F3 s e q u e n t i a l l y . A s s i g n each polygon a number that i s i n sequence, and w r i t e i t i n t o f i l e F4. Stop on r e a c h i n g end of f i l e F3.  A STBIPSORT command f o r performing these steps has been designed but not y e t implemented. 4.3.4.2  Intersecting  Two  S t r i p Sorted F i l e s T h i s s e c t i o n w i l l d e s c r i b e two d i f f e r e n t methods f o r I n t e r s e c t i n g f l i e s A and B t h a t take advantage of the f a c t t h a t A and B have been s t r i p s o r t e d .  Both methods l e a d t o  memory savings by i n t e r s e c t i n g the f l i e s one s t r i p a t a time i n s t e a d of one map In  a t a time.  the examples to f o l l o w polygons from f i l e s A and  B are l a b e l l e d A^, A , 2  ....and B^, B ,  where the s u b s c r i p t denotes polygon. Definitions t  2  ....respectively  the s t r i p s o r t e d order of the  A polygon i s s a i d to be i n a s t r i p i f Its maximum y value i s i n the s t r i p . During o v e r l a y , a polygon from f i l e A i s s a i d t o be f i n i s h e d i f a l l p o s s i b l e i n t e r s e c t i o n s of l t w i t h polygons from f i l e B have been found. During o v e r l a y , a polygon P i s s a i d to be covered i f i t has produced polygons of i n t e r s e c t i o n s whose union make up P.  143  F i g u r e 4.25  Sequencing polygons In a s e q u e n t i a l f i l e as expressed i n a problem s o l v i n g context.  Polygon Ai i s f i n i s h e d when i t has been i n t e r s e c t e d w i t h B i and B ; however, i t i s not covered. 2  Polygon A i s covered and f i n i s h e d when i t has been i n t e r s e c t e d w i t h B and By 2  2  The f i r s t method Is to i n t e r s e c t a l l the s e c t i o n s of polygons from the two f i l e s t h a t are l n the c u r r e n t hence f i n i s h i n g t h a t s t r i p 4.24,  l n one blow.  strip,  As shown l n F i g u r e  t h i s r e q u i r e s i n t e r s e c t i n g a l l the polygons t h a t are  In the s t r i p and polygons from p r e v i o u s s t r i p s t h a t have not been f i n i s h e d w i t h the s t r i p boundary  P^ P  2  P3 P^»  Then the  two s e t s of polygons of i n t e r s e c t i o n are I n t e r s e c t e d , f i n i s h e d , and f r e e d .  However, the shaded polygons must be  saved f o r p r o c e s s i n g i n the next s t r i p , and a complement r o u t i n e Is r e q u i r e d .  Thus, we d e c i d e d a g a i n s t using t h i s  method. The method a c t u a l l y used by GIDS Is s i m i l a r t o t h i s l n t h a t polygons are i n t e r s e c t e d one s t r i p a t a time from top to bottom of the map, s t r i p s themselves.  but there are no i n t e r s e c t i o n s w i t h the  One  s t r i p of polygons Is read Into core  where i t i s s t o r e d i n a doubly l i n k e d l i s t 11st; then one A-polygon  s t r u c t u r e (the B-  In the same s t r i p Is I n t e r s e c t e d  145  w i t h a l l polygons i n the l i s t .  I f t h i s A-polygon i s not  covered and extends i n t o the next B - s t r i p i t i s saved i n another l i s t in  (the A - l i s t ) .  A f t e r r e a d i n g the l a s t  the s t r i p a l l the B-polygons  A-polygon  i n t h a t s t r i p which are  f i n i s h e d , or which do not extend i n t o the next A - s t r i p , are freed. is  Then the next lower s t r i p i s read i n and the process  repeated.  T h i s may  as w i l l be explained  Figure  4.24  All lists  be a s t r i p o f A-polygons or  B-polygons  later.  I n t e r s e c t i n g polygons w i t h the s t r i p , and then i n t e r s e c t i n g two s t r i p s of polygons. polygons are s t o r e d  i n one of three doubly l i n k e d  o f i d e n t i c a l s t r u c t u r e : the A - l i s t , B - l i s t and  The A - l i s t and B - l i s t c o n s i s t of u n f i n i s h e d  C-list.  A and B polygons  r e s p e c t i v e l y and the C - l i s t c o n s i s t s of polygons of i n t e r s e c t i o n that have not y e t been w r i t t e n file.  i n t o the i n t e r s e c t i o n  Each of these l i s t s are arranged i n order by ascending  v a l u e s of minimum x of the polygons.  14$  TAKE THE FIRST B-POLYGON  IS ITS AXX MINX OF P> IS ITS MINX ,MAXX OF P  ANY MORE POLYGONS \ j « £ _ IN THE B-LIST?  TAKE THE tfEXT 3-POLYGON  MARK P AS UNFINISHED  JL DOES ITS' tECTANGLE ^INTERSECT "S RECT./  T  INTERSECT THE POLYGONS & INSERT POLYGONS IN THE C-LTST  I  IS P : COVERED?  \1  YES  MARK P AS FINISHED  F i g u r e 4.2<£  -J>( RETURN  The method used by the INTSL r o u t i n e t o i n t e r s e c t a polygon P w i t h a s t r i p o f polygons s t o r e d l n the B - l i s t .  14?  One is  of the most important  of the i n t e r s e c t i o n r o u t i n e s  INTSL which i n t e r s e c t s the contents of the A - l i s t and  list  and  s t o r e s the r e s u l t i n g polygons of i n t e r s e c t i o n  the C - l i s t . t h a t the f i l e  T h i s r o u t i n e makes good use of the is strip  by minimum x (see how  s o r t e d and  B-  on  information  t h a t the l i s t s are  ordered  i n F i g . 4.25).  As shown i n F i g . 4.26,  the s t r i p boundaries  B do not n e c e s s a r i l y c o i n c i d e .  In such cases, how  choose which s t r i p to read i n next?  We read i n and  of A do  and  we  s t o r e the  strip  1 whose bottom boundary i s h i g h e r , and pass the  strip  J by i t because t h e r e i s a g r e a t e r chance of f i n i s h i n g  other  the polygons i n j by i n t e r s e c t i n g them w i t h polygons In i than v i c e v e r s a .  F i l e A S t r i p Sorted  The  File B Strip  A - l i s t a f t e r reading i n s t r i p  F i g u r e 4.26  Two  strip  Sorted  SA^  s o r t e d maps, and a t y p i c a l A - l i s t .  -  148  For example, the stages In i n t e r s e c t i n g f i l e s A B t h a t are s t r i p below.  Upon completing a s t r i p  on the l i s t other  s o r t e d as shown i n F i g . 4.2&  only  are  and  given  u n f i n i s h e d polygons are kept  i f they extend i n t o the next s t r i p of  the  file.  Stage (1)  Bead the polygons from s t r i p SA^ and s t o r e them i n the A - l l s t ; pass the polygons of s t r i p SB± by the A - l i s t and s t o r e u n f i n i s h e d B-polygons, i n the B - l i s t .  Stage (2)  Pass the polygons of s t r i p SB2 by the A - l i s t and s t o r e u n f i n i s h e d B-polygons i n the B - l i s t .  Stage (3)  Read the polygons from s t r i p SA and s t o r e them i n the A - l i s t and s t o r e u n f i n i s h e d B-polygons i n the B - l i s t .  Stage (4)  Pass the polygons of s t r i p SBij. by the A - l i s t s t o r e u n f i n i s h e d polygons i n the B - l i s t .  2  4.3.5  The  Current  State  and  of  the I n t e r s e c t i o n Subsystem All  the r o u t i n e s f o r i n t e r s e c t i n g two  f i l e s as d e s c r i b e d but  i n the previous  strip  sorted  s e c t i o n have been w r i t t e n ,  have not y e t been completely debugged.  Until  strip  s o r t i n g i s working, our approach i s to t r e a t each map single strip;  using t h i s technique we  as  a  have s u c c e s s f u l l y i n t e r -  7 s e c t e d a few  files.'  However, one  work on GIDS w i l l d e f i n i t e l y  be  important step i n f u t u r e  to p e r f e c t the  subsystem so t h a t i t can assume i t s r i g h t f u l l a y i n g data p o l y g o n a l  data  Intersection  place  i n over-  files.  *«*#«»* ?Cost s t a t i s t i c s Chapter 5.  f o r these runs are i n c l u d e d  in  149  CHAPTER 5 CRITIQUE OF GIDS T h i s chapter presents a c r i t i c a l view of the GIDS d e s i g n and  I t s implementation  Is developed  to d a t e .  The system a t present  to about h a l f i t s p o t e n t i a l .  The next  chapter  d e s c r i b e s d i r e c t i o n s t h i s development may f o l l o w . The  implementation  Is on the whole a success.  Except  f o r o v e r l a y , a b a s i c system has been running reasonably smoothly s i n c e the f a l l of 1972  performing most of the impor-  t a n t f u n c t i o n s r e q u i r e d of a geographic The  "proof of the pudding"  Information system.  Is that v a r i o u s o r g a n i z a t i o n s have  been u s i n g I t , and s u p p o r t i n g I t s development f i n a n c i a l l y , and p l a n to continue to do so.  To the b e s t knowledge of the  author, there Is nowhere e l s e a system which performs a l l the same f u n c t i o n s i n t e r a c t i v e l y . t h a t other geographic  However, t h i s Is not to say  Information systems are not s u p e r i o r l n  other ways. One way  to e v a l u a t e GIDS Is t o observe  how  well It  s a t i s f i e s the d e s i g n c r i t e r i a l a i d down i n Chapter 2.  Clearly,  the system s a t i s f i e s the c r i t e r i a of emphasizing g r a p h i c a l output, b e i n g usable i n t e r a c t i v e l y or l n b a t c h , and problem Independent.  being  As f o r b e i n g e a s i l y e x t e n d i b l e , new  commands can be added a t any  time by f o l l o w i n g a sequence of  steps shown i n S e c t i o n 3.4.  The  completely r e l a t i v e .  q u e s t i o n of ease of use Is  GIDS Is much e a s i e r to use  than  150  Map/Model where one has to contend w i t h PL/I, JCL, and recompllatlons.  However, the user o f GIDS must have some f a m i -  l i a r i t y w i t h the MTS o p e r a t i n g system and must know the MTS f i l e names of h i s d i s k d a t a f l i e s .  The author contends  an I n t e l l i g e n t user could l e a r n the fundamentals s t r u c t u r e s and command languages 5.1  that  of the f i l e  i n an hour.  STRONG FEATURES OF DESIGN Perhaps  the s t r o n g e s t p a r t s o f GIDS are i t s b a s i c  approach t o geographic d a t a d e s c r i b e d i n Chapter 2 and i t s f o u n d a t i o n elements d e s c r i b e d i n Chapter 3.  The approach o f  encoding geographic d a t a by p o i n t s , l i n e s , or polygons over which some a t t r i b u t e i s homogeneous, enables a user to m a i n t a i n the  I n t e g r i t y of i n d i v i d u a l coverages, and y e t t o r e l a t e  d i f f e r e n t coverages t o g e t h e r .  Secondly, the GIDS f i l e  struc-  t u r e s p r o v i d e e f f i c i e n t and e l e g a n t storage of both l o c a t i o n a l and d e s c r i p t i v e d a t a .  T h i r d l y , the command language w i t h i t s  s e l e c t i o n c a p a b i l i t i e s enables a user to e a s i l y s p e c i f y a g r e a t v a r i e t y o f subsets o f these f i l e s  f o r processing.  These  few components a r e the bases of a system which i s both easy to  use and easy t o e v o l v e . W i t h i n the v a r i o u s subsystems  o f GIDS d e s c r i b e d i n  Chapter 4 t h e r e a r e two elements of GIDS t h a t are p a r t i c u l a r l y noteworthy.  These are device-independent g r a p h i c s which  f a c i l i t a t e s o b t a i n i n g graphs on s e v e r a l d e v i c e s , and s t r i p  151  s o r t i n g which speeds  up the process of r e l a t i n g a c r o s s  f i l e boundaries polygons which occupy 5.2  WEAKNESSES  OF DESIGN  The weakest l i n k o f the system system.  the same l o c a t i o n .  i s the input sub-  Since a l l polygons, must be d i g i t i z e d  individually,  each l i n e must be t r a c e d t w i c e , o f t e n w i t h a a n o t l c e a b l e d i f f e r e n c e l n the two d i g i t i z a t i o n s of the same l i n e .  Editing  of  Another  these d i s c r e p a n c i e s Is a d i f f i c u l t manual p r o c e s s .  shortcoming o f GIDS Input Is the i n a b i l i t y to match l i n e s a c r o s s map boundaries.  In s h o r t , the Input process Is q u i t e  expensive and time-consuming  without b e i n g very a c c u r a t e .  I n v e s t i g a t i o n Into Ray Boyle's i n t e r a c t i v e d i g i t i z a t i o n  An  (1970)  and David Douglas' once o n l y d i g i t i z a t i o n (1972) i s r e q u i r e d , f o l l o w e d by a comprehensive  reworking of the input  A minor weakness o f the system support some v e r s i o n of indexed f i l e  subsystem.  Is t h a t I t does not structure.  In cases  where one p a r t i c u l a r a t t r i b u t e Is t o be used c o n s i s t e n t l y as a key f o r a f i l e of s i g n i f i c a n t s i z e , there i s no doubt  that  an indexed f i l e would l e a d t o cheaper r e t r i e v a l than the sequential  file.  There a r e other p a r t s o f the system which s u f f e r not from weakness o f d e s i g n o f , but r a t h e r from weakness of emphasis.  These a r e p a r t s o f the system which are r e l a t i v e l y  weak, but which c o u l d be Improved without any fundamental  152  changes t o GIDS.  Some o f these are l i s t e d below.  1.  Update c a p a b i l i t y f o r GIDS s e q u e n t i a l f i l e s .  2.  U s e r - d e f i n e d symbolism and shading as mentioned i n S e c t i o n 4.3.  3.  Report g e n e r a t i o n o f data i n GIDS f i l e s ( e . g . s o r t e d t a b l e s of frequency counts or sums f o r the a t t r i b u t e s i n a GIDS f i l e ) .  5.3 COST TO USE GIDS Costs t o use GIDS a r e i n c u r r e d a t two d i s t i n c t p o i n t s i n time: f i r s t i n p r e p a r i n g the maps and i n p u t i n g them t o files  under the system, and secondly i n d i s p l a y i n g and mani-  p u l a t i n g these  files.  The former c o s t can be estimated from the experience of  the Greater Vancouver R e g i o n a l D i s t r i c t P l a n n i n g Department.  To i n p u t and e d i t a s e t o f s i x t e e n land use maps o f about 400 polygons  each, they had to i n v e s t about $10,000 as shown below. D i g i t i z e r operator D i g i t i z e r r e n t a l @ #20/hour E d i t i n g @ 2.50/hour Computer p l o t t i n g @ $20.hour Other computing Total  -  |  600 2,400 5,600 500 500  -  $9.600  The c o s t s to use GIDS f o r data m a n i p u l a t i o n can be e x t r a c t e d from the sample s e s s i o n s of Appendix C.  The CPU  times t o perform v a r i o u s o p e r a t i o n s on a land use f i l e of 377 polygons were as f o l l o w s : 1. 2. 3. 4. 5.  40 17 15 12 5  seconds seconds seconds seconds seconds  f o r INPUT f o r PLOT f o r INITIALIZE f o r DRAW f o r COPY  153  Note t h a t although DRAW i s performing a more s o p h i s t i c a t e d o p e r a t i o n than PLOT, i t i s s t i l l f a s t e r because o f the  d i f f e r e n c e In I/O f o r f i n a l  f i l e s and i n t e r m e d i a t e f i l e s ;  the  same Information can be read q u i c k e r from a f i n a l  (by  the DRAW command) than from an i n t e r m e i d a t e f i l e  file  (by the  PLOT command). In  an attempt t o measure how much computer time and  elapsed time were r e q u i r e d to read GIDS f i l e s we measured the time to l i s t the f i r s t files In are  of various s i z e s .  each case because  of v a r i o u s s i z e s ,  two r e c o r d s o f s p l i t  (Note t h a t the whole f i l e must be read  o f the way s e l e c t i o n works.) The r e s u l t s  shown i n Table IX. TABLE IX THE RESPONSE TIME AND CPU TIME TO BEAD SPLIT PILES OF VARIOUS SIZES AND LIST TWO RECORDS  # of polygons l n the file  CPU elapsed time time  377  3.5  28  150  2.5  18  1  12  2  during a busy p e r i o d drum reads  during a q u i e t period CPU elapsed drum reads time time 4  13  48  228  2  10  32  142  1  8  42  These experiments were conducted both when the computer was  q u i t e busy as shown by the l a r g e number o f drum reads and  when I t was r e l a t i v e l y I d l e .  As we expected, the CPU times  15*  were comparable In both cases, but the response  times were  s i g n i f i c a n t l y l o n g e r d u r i n g the busy p e r i o d s .  Response  time i s an important measure i f the system i s to be interactively. the g i v e n f i l e  For Instance, we of 37?  found t h a t f o r p r o c e s s i n g  polygons, the response  seconds achieved d u r i n g a busy p e r i o d was but 13  seconds was  useful  time of 28  uncomfortably  long  quite satisfactory.  I n t e r s e c t i o n i s the most expensive o p e r a t i o n , but i t i s not as expensive as we intersect a f i l e  had o r i g i n a l l y a n t i c i p a t e d .  of 96 polygons w i t h a subset of 50  from another f i l e producing 136  polygons  low p r i o r i t y r e q u i r i n g 2 minutes of CPU case 5°  5.4  REAL USEFULNESS SO  time.  In a  polygon  land use  second 5 polyfile.  FAR  At the Greater Vancouver R e g i o n a l D i s t r i c t GIDS Is now  polygons  c o s t only $6.50 on  seconds were r e q u i r e d to i n t e r s e c t the f i r s t  gons of a zoning f i l e w i t h the 377  To  a household  word.  (GVRD)  A c c o r d i n g t o Peter George,  p l a n n e r , i t Is the most u s e f u l i n f o r m a t i o n system i n the GVRD P l a n n i n g Department. superimposing areas.  I t i s used f r e q u e n t l y f o r p l o t t i n g  s e l e c t e d p o r t i o n s of maps, and  for calculating  A l s o i t has l a r g e l y i n f l u e n c e d the way  b e i n g organized; data i s now coverages  and  information i s  being gathered as p o l y g o n a l  t h a t can be d i r e c t l y converted t o GIDS f i l e s .  For  the GlfRD planners the most important f e a t u r e of GIDS i s I t s a b i l i t y to m a i n t a i n the f i d e l i t y of separate d a t a s e t s ,  and  155  yet to r e l a t e them t o g e t h e r .  Because o f the d i f f i c u l t y i n  I n p u t t i n g data they have n o t been a b l e t o use GIDS f o r as many maps as they would have l i k e d . continue to p l a y a v e r y important  However, GIDS w i l l  p a r t i n the use o f geo-  g r a p h i c a l i n f o r m a t i o n a t the GVRD. GIDS d i s p l a y and s e l e c t i o n c a p a b i l i t i e s have been of some value to Peter D o o l l n g of the UBC Department o f F o r e s t r y f o r a study o f p o t e n t i a l r e c r e a t i o n s i t e s l n n o r t h e r n  British  Columbia; however, GIDS has not been able to answer t h e i r more i n t e r e s t i n g q u e s t i o n s which r e q u i r e knowledge o f a d j a c e n c i e s of p o i n t s .  L a s t l y , GIDS has been used as a d i s p l a y t o o l f o r  the output from r e g i o n a l s i m u l a t i o n models by the H P S p r o j e c t a t UBC.  156  CHAPTER 6 FUTURE DEVELOPMENTS OF GIDS 6.1  INTRODUCTION The  potential.  system has not y e t been developed  to i t s f u l l  In t h i s chapter, some new a p p l i c a t i o n s o f the  system a t i t s c u r r e n t l e v e l and v a r i o u s extensions an a b b r e v i a t e d command language and g e o g r a p h i c a l w i l l be d i s c u s s e d (see F i g . 6.1).  such as  selection  F i n a l l y , a summary o f  the system as i t stands a t p r e s e n t w i l l be g i v e n . USE WITH CENSUS OR ADDRESS DATA CURRENT GIDS SYSTEM  ABBREVIATED COMMAND SYNTAX  '."MINICOMPUTER ! • INPUT SYSTEM |  GEOGRAPHICAL] SELECTION I USE AS A GRAPHICAL TOOL INCREASING CHANGE FROM CURRENT GIDS F i g u r e 6.1 6.2  P o s s i b l e Extensions  to GIDS.  NEW USES FOR GIDS 6.2.1  With Census and Address Data  Most of the data s e t s d e s c r i b e d have been e i t h e r p h y s i c a l (such as s o l i or l a n d use) or j u r i s d i c t i o n a l  (such  157  as m u n i c i p a l i t y boundaries)  c h a r a c t e r i s t i c s o f the l a n d .  However, the realm o f a p p l i c a b l e d a t a f o r GIDS i s f a r g r e a t e r ; f o r Instance, I t Includes census data and other d a t a which c o n t a i n an address as p a r t of each r e c o r d . Census data has been aggregated  to areal units  census t r a c t s and p u b l i s h e d i n tape form. data were s t o r e d i n a d e s c r i p t i v e f i l e boundaries  I f t h i s census  and the census  i n a corresponding l o c a t i o n a l f i l e ,  used as a r e t r i e v a l system  like  f o r the census data  tract  GIDS c o u l d be (see F i g . 6.2i|\a).  The most common method o f coding l o c a t i o n f o r s o c i o economic data has been by s t r e e t address, but I t i s d i f f i c u l t to  r e l a t e t h i s data w i t h d a t a coded by x-y c o o r d i n a t e s .  However, the p a s t few years has seen  the development o f geo-  c o d i n g systems, such as the GRDSR system (1972),  of S t a t i s t i c s Canada  which can a u t o m a t i c a l l y a s s i g n x-y c o o r d i n a t e s t o  s t r e e t addresses.  One of the i m p l i c a t i o n s o f these  geocoding  systems Is t h a t s t r e e t address data has become a c c e s s i b l e t o s p a t i a l a n a l y s i s by a system 6.2.2  As A G r a p h i c a l T o o l for  In of  l i k e GIDS (see F i g . 6 . 2 b ) .  Regional Simulations  a r e g i o n a l s i m u l a t i o n , there i s u s u a l l y a f i x e d s e t  p o l y g o n a l study areas over which data i s p r o j e c t e d i n t o  the f u t u r e .  Each i t e r a t i o n o f the model produces  output v a r i a b l e f o r each study a r e a .  a row of  T h i s output i s u s u a l l y  t a b u l a r o r , i f g r a p h i c a l , then q u i t e p r i m i t i v e . However, GIDS w i t h i t s a f f i n i t y f o r p o l y g o n a l maps, could be used t o produce e x c i t i n g d i s p l a y s from t h i s d a t a .  T h i s Is accomplished by  158  GIDS SYSTEM  GIDS POLYGON] FILE  GIDS DESCRIPTIVE FILE  GIDS POINT FILE  GIDS DESCRIP TIVE FILE  DATA CODED BY COORDINATES-^  EXTRACTOR PROGRAM  STATISTICS CANADA GEOCODING PROGRAMS  /  7K Address DATA CODED BY ADDRESSES •  5"S  MAiu ST  DIGITIZED CENSUS TRACTS (a)  F i g u r e 6.2  I n p u t t i n g census or address d a t a t o GIDS  Data so, o os  5"  159  s t o r i n g the study area boundaries  as a l o c a t i o n a l f i l e ;  as s i m u l a t i o n output was generated, descriptive f i l e s  then,  i t i s copied i n t o GIDS  t o which the f u l l power o f GIDS g r a p h i c s  w i t h s e l e c t i o n a r e a p p l i e d (see F i g . 6.3).  PLOT  GIDS LOCATIONAL FILE  GIDS DESCRIPr^ TIVE ""FILE—  SIMULATOR  MAP OF STUDY AREAS F i g u r e 6.3  GIDS as a g r a p h i c a l t o o l f o r r e g i o n a l simulations.  GIDS has a l r e a d y been used  i n t h i s c o n t e x t w i t h the  I n t e r - I n s t l t u t i o n a l P o l i c y Simulation (HPS) Project (Rolling, et a l . , 6.3  1971).  EXTENSION-ABBREVIATED COMMANDS Probably the most awkward p a r t of the command  language i s the s p e c i f i c a t i o n o f f i l e names and the s e l e c t o r . F o r i n s t a n c e , to draw a l l the polygons  from l o c a t i o n a l  L and d e s c r i p t i v e f i l e D w i t h a v a l u e f o r the f i e l d of  10, one must say DRAW (D,L) SCOPE=(ZONING=10)  file  o f zoning  160  All i n every  f i l e s t o be processed  must be r e f e r r e d t o by name  command, even when a whole s e r i e s of commands  the same f i l e s .  process  However, i f the f i l e names were known t o GIDS  i n advance i t c o u l d be s u f f i c i e n t to say DRAW Z0NING=10 It  i s recommended t h a t GIDS be extended to support  abbreviated  command  structure.  this  T h i s could be accomplished by  e n a b l i n g the user t o d e f i n e a f i l e or s p l i t f i l e s as " a c t i v e f i l e s " t o be processed t i o n e d i n a command.  i f no other f i l e s are e x p l i c i t l y menOne p o s s i b l e command syntax f o r d e f i n i n g  a f i l e as the a c t i v e f i l e The  i s "GET f i l e . "  example below shows a command s e s s i o n f i r s t  as i t  i s now, then as i t could be i f t h i s extension were implemented. Note t h a t the o l d syntax can s t i l l be used and must s t i l l be used f o r some commands such as COPY. S e s s i o n A - GIDS In i t s c u r r e n t form DRAW (D,L) SCOPE=(ZONING=10) LIST (D,L) DRAW (D,L) SC0PE=(Z0N1NG=10) CODED BY AREA COPY (D,L) SC0PE=(Z0NING=10) TO (D1,L1) DRAW (D1,L1) DRAW (D1,L1) SC0PE=(Z0NING=15 & AREA >1) LIST L l EMPTY (D1,L1) S e s s i o n B - GIDS w i t h  extension  GET (D,L) DRAW Z0NING=10 LIST DRAW Z0NING=10 CODED BY AREA COPY (D,L) SC0PE=(Z0NING=10) TO (D1,L1) GET (D1,L1) DRAW Z0NING=15 & AREA >1 LIST L l EMPTY  161  6.4  GEOGRAPHICAL SELECTION 6.4.1  Theory  G e o g r a p h i c a l s e l e c t i o n i s d e f i n e d as s e l e c t i o n on the b a s i s of g e o g r a p h i c a l c r i t e r i a .  (A t y p i c a l  example i s  s e l e c t i o n o f those areas from a d a t a f i l e which i n t e r s e c t an i n q u i r y a r e a ) .  I t i s an important access method which i s  n o t i c e a b l y l a c k i n g i n GIDS and which should be i n c o r p o r a t e d ln  f u t u r e v e r s i o n s of the system.  and then an implementation  Some theory i s presented  i s suggested.  Geographic s e l e c t i o n i s s p e c i f i e d by a s e l e c t i o n c r i t e r i o n and an i n q u i r y a r e a .  The I n q u i r y areQ»I, i s  d e f i n e d by a s e t of p o i n t s , l i n e s , or polygons. geographic  A few sample  s e l e c t o r s are l i s t e d below and i l l u s t r a t e d i n  F i g u r e 6.4. S e l e c t a l l l o c a t i o n a l r e c o r d s from a d a t a f i l e which (a) have a non-empty I n t e r s e c t i o n w i t h I; (b) a r e t o t a l l y contained i n I; (c) a r e t o t a l l y e x c l u s i v e from I; (d) a r e w i t h i n d i s t a n c e r of I. 6.4.2  Implementation  Geographical  s e l e c t i o n should be Implemented w i t h i n  the I/O r o u t i n e s so i t i s t r a n s p a r e n t to a l l p r o c e s s i n g r o u t i n e s (see F i g . 3.-$).  Since i t i s cheaper t o e v a l u a t e  l o g i c a l expressions o f the form " i s the land use=3 check i f two polygons  w  i n t e r s e c t , numerical s e l e c t i o n  be a p p l i e d b e f o r e g e o g r a p h i c a l  selection.  than t o should  162  FIGURE 6& Regions S e l e c t e d from a Data F i l e by D i f f e r e n t Selection C r i t e r i a .  163  The  geographic s e l e c t o r r o u t i n e must be passed  c u r r e n t polygon, the returns  i n q u i r y a r e a , and  " t r u e " i f the r e c o r d  the r e l a t i o n .  i s t o be s e l e c t e d and  the It  "false  H  otherwise. Some of the elements r e q u i r e d f o r the of g e o g r a p h i c a l  implementation  s e l e c t i o n are;  1) a method of d e f i n i n g , s t o r i n g , and manipulating i n q u i r y areas; 2) a mechanism f o r s p e c i f y i n g geographic s e l e c t i o n i n the command language. These i n q u i r y areas c o u l d be s t o r e d e i t h e r on d i s k as GIDS l o c a t i o n a l f i l e s or i n core  i n a new  r e f e r e n c e d by name through a d i r e c t o r y . former.  One  data  structure  L e t us assume the  should be able to c r e a t e an i n q u i r y area i n three  ways t 1) by copying a s e l e c t e d p o r t i o n of a GIDS f i l e (with the COPY command); 2) by i n p u t i n g the c o o r d i n a t e s from the source stream; 3) by It ln  u s i n g the l i g h t  i s not c l e a r how  the command language.  pen.  to b e s t s p e c i f y geographic s e l e c t i o n Suggestions are g i v e n f o r d e f i n i n g  i t g l o b a l l y or l o c a l l y f o r each  file.  To d e f i n e i t g l o b a l l y , one might SET where  WINDOW= ^geographic s e l e c t o r >  ^geographic selector> <bperator>  say  <bperator) <inquiry  areq>  »i=INTERSECT/IN/OUTSIDE/WITHIN r  <lnquiry area); » M r  <set of p o i n t s , l i n e s or polygons^  164  To d e f i n e the geographic s e l e c t o r l o c a l l y to one f i l e lt  c o u l d be i n c l u d e d as p a r t o f the f i l e name i n the same  way t h a t the numeric s e l e c t o r was. that a " q u a l i f i e d f i l e "  R e c a l l i n S e c t i o n 3§2  ( q f l l e ) was d e f i n e d as a GIDS f i l e  o p t i o n a l l y q u a l i f i e d by a numeric s e l e c t o r .  Now we could  d e f i n e a " g e o g r a p h i c a l l y q u a l i f i e d f i l e " as a " q u a l i f i e d file"  o p t i o n a l l y q u a l i f i e d by a g e o g r a p h i c a l (geographically qualified <qfile> | < q f i l e )  selector.  f i l e > »t=  (geographic  selector^  For example, i f BURNABY i s a l o c a t l o n a l f i l e  containing  the o u t l i n e o f the m u n i c i p a l i t y o f Burnaby, and i f ' . f i l e S ^ (ZONING;B,ZONING G) c o n t a i n zoning f  and  the surrounding  area*  f o r Burnaby  I f we wanted to draw o n l y those  p a r t s o f the zoning map,flying this  information  w i t h i n Burnaby, we c o u l d s p e c i f y  i n two ways t 1) w i t h a g l o b a l window SET WINDOW=INTERSECT BURNABY DRAW (ZONING.R,ZONING.G) 2) without a g l o b a l window DRAW (ZONING.R,ZONING.G) INTERSECT BURNABY We c o u l d a l s o combine numeric and geographic s e l e c t i o n  as shown i n the example below. DRAW (ZONING.R,ZONING.G) SC0PE=(Z0NING=10) INTERSECT BURNABY  165  6.5  SUMMARY In the p a s t , the emphasis lw g e o g r a p h i c a l i n f o r m a t i o n  systems has ) been on computational power r a t h e r than on ease of  use.  The r e s u l t  i s t h a t the o v e r a l l l e v e l of hardware and  software technology f a r exceeds the l e v e l of i n f o r m a t i o n use. Now we must b r i n g up the l e v e l of system use.  To accomplish  t h i s end system d e s i g n e r s should concentrate on making t h e i r systems more u s e r - o r i e n t e d .  The g o a l should be not the  development o f new techniques, but the s y n t h e s i s o f the o l d techniques  i n a manner t h a t makes the data and computational  powers more r e a d i l y a c c e s s i b l e t o the decision-maker. There a r e s e v e r a l elements present i n GIDS which enable us t o c l a i m t h a t our system Is one step on the path towards the more useable systems of the f u t u r e t 1.  There are two simple v i r t u a l views of the d a t a base, one f o r the user and one f o r the programmer.  2. The system can be used  interactively.  3. Requests a r e expressed language.  i n a simple command  4. The system i s problem-independent. ( I t can be a p p l i e d to any 2-dimensional data and associated a t t r i b u t e s ) . 5. The system i s r e a d i l y e v o l v a b l e . 6. The user can r e f e r to h i s data Items by names he chooses h i m s e l f .  166  BIBLIOGRAPHY A l d r e d , B.K. " P o i n t i n Polygon A l g o r i t h m s , " unpublished paper. IBM S c i e n t i f i c Centre, N e v i l l e Road, P e t e r l e e , County Durham, U.K., 1972. Arms, S.  "Map/Model S y s t e m — T e c h n i c a l Concepts and Program D e s c r i p t i o n s , " unpublished document. Columbia Region A s s o c i a t i o n of Governments, P o r t l a n d , Oregon, 1968.  Arms, S.  "Map/Model System—System D e s c r i p t i o n and User's Guide," presented a t the Puget Sound Governmental Conference, Euguene, Oregon, Bureau of Governmental Research and S e r v i c e , 1970.  B a r r o n , D.W. R e c u r s i v e Techniques i n Programming. American E l s e v i e r P u b l i s h i n g Company, Inc., New York, I968. ^ o e t t n e r , D.W. "Command (Job c o n t r o l ) languages f o r g e n e r a l purpose computing systems," unpublished paper. U n i v e r s i t y of Michigan Computing Centre, I969. B o y l e , A.R.  "Automation i n Hydrographic  Charting."  Canadian Surveyor. V o l . 24, No. 5,  PP. 519-537.  The  (Dec. 1970),  B o y l e , A.R. " P r e l i m i n a r y User's Notes on I n t e r a c t i v e D i s p l a y System f o r M a n i p u l a t i o n of C a r t o g r a p h i c Data." U n i v e r s i t y of Saskatchewan, E l e c t r i c a l E n g i n e e r i n g Department, Saskatoon, 1972. Clement, A. "Report on INTURMAP—An I n t e r a c t i v e Urban Mapping System," unpublished document; Department of Computer S c i e n c e , U n i v e r s i t y of B r i t i s h Columbia, 1973. Conway, R.L., Maxwell, W.L., Morgan, H.L. " F i l e Processing w i t h ASAP—An I n t r o d u c t i o n . " Department of Computer Scienoe, C o r n e l l U n i v e r s i t y , Ithaoa, New York, 1971* PP. 3-7. C o u l t h a r d , W.J. "MTS Commands," unpublished r e p o r t . Computing Centre, U n i v e r s i t y of B r i t i s h Columbia, 1970. Dangermond, J . "Polygon Information Overlay System," unpubl i s h e d r e p o r t . Comprehensive P l a n n i n g O r g a n i z a t i o n , San Diego, C a l i f o r n i a , 1971. Deecker, G.F.P. I n t e r a c t i v e G r a p h i c s and a P l a n n i n g Problem., M.Sc. T h e s i s . Department of Computing S c i e n c e , U n i v e r s i t y of A l b e r t a , Edmonton, 1970.  167  Deecker, G.F.P., Penny, J.P. "On I n t e r a c t i v e Map Storage and Retrieval." INFOR, V o l . 1 0 , No. 1 (Feb. 1972),  pp. 62-74.  Denenberg, S., C o r b i n , C , A l s b e r g , P. "NARIS, A N a t u r a l Resource Information System." Centre f o r Advanced Computation, U n i v e r s i t y o f I l l i n o i s a t Urban Champaign, Urbana, I l l i n o i s , 61801. Douglas, D. "BNDRYNET," unpublished paper. Department o f Geography, Simon F r a s e r U n i v e r s i t y , 1973. Dueker, K.J. " S p a t i a l Data Systems: O r g a n i z a t i o n o f S p a t i a l Data." T e c h n i c a l Report No. 4, Department o f Geography, Northwestern U n i v e r s i t y , A D 6 5 2 0 0 5 , C l e a r i n g House f o r F e d e r a l Domaments, S p r i n g f i e l d , VA., 22151, 1966. Environment, Canada. "Canada Geographic Information System," unpublished r e p o r t . Lands D i r e c t o r a t e , Lands F o r e s t and W i l d l i f e S e r v i c e , Environment Canada, Ottawa,1972. F i s h e r , H.T. Mapping Q u a n t i t a t i v e Information. L a b o r a t o r y f o r Computer Graphics and S p a t i a l A n a l y s i s , The Graduate School o f Design, Harvard U n i v e r s i t y , 1970. F r a n k l i n , W.R. "The ANOTB Program," unpublished document. Computing Centre, U n i v e r s i t y o f Ottawa, 1972. G o o d c h l l d , M.F. "A P o s i t i o n Paper on Geographic Data Proc e s s i n g , " unpublished paper. Department o f Geography, U n i v e r s i t y o f Western O n t a r i o , 1972. George, P. " H P S Land C l a s s i f i c a t i o n Subgroup Report," unpublished r e p o r t . Resource Science Centre, U n i v e r s i t y of B r i t i s h Columbia, 1972. Harvard U n i v e r s i t y . "SYMAP V Operator*s Manual." Laboratory f o r Computer Graphics and S p a t i a l A n a l y s i s , Cambridge, Mass., 1968. H o l l l n g , C.S., Goldberg, M.A., K e l l y , R. "Vancouver r e g i o n a l s i m u l a t i o n study 1970-1971," unpublished paper. Resource Science C e n t r e , U n i v e r s i t y o f B r i t i s h Columbia,  1971.  Kenney, J.F., Clapp, G.D. " N a t u r a l Resource Information System ( N R I S ) — O v e r a l l D e s c r i p t i o n . " Boeing Computer S e r v i c e s , Inc., S e a t t l e , Washington, 1972. Leong, E., Ng, R., Lau, W., Yau, S. "The Report Generating System o f GIDS," unpublished r e p o r t . Department o f Computer S c i e n c e , U n i v e r s i t y o f B r i t i s h Columbia, 1972.  168  MacLeod, M.H. "Semi-Automated Large Scale Mapping," presented at the X I I Congress of t h e I n t e r n a t i o n a l S o c i e t y of Phot©grammetry, Ottawa, 1972. McRae, R.N. A S u p e r v i s o r t o Monitor M u l t i p l e S i m u l a t o r s . M.Sc. T h e s i s , Department of Computer S c i e n c e , U n i v e r s i t y of B r i t i s h Columbia, 1972. N i l s s o n , N.J. Problem S o l v i n g Methods In A r t i f i c i a l gence. McGraw-Hill, Inc., New York, 1971.  Intelli-  Nake, F., Peucker, W, "Progress Report A f t e r Year One—The I n t e r a c t i v e Map i n Urban Research," unpublished paper. Department o f Computer S c i e n c e , U n i v e r s i t y o f B r i t i s h Columbia, 1972. P a r k e r , J.L. "Information R e t r i e v a l w i t h Large-Scale Geographic Data Bases," unpublished paper. Resource Science Centre, U n i v e r s i t y of B r i t i s h Columbia, 1971. P a r k e r , J.L. "The S c a n n e r — A System f o r P r o c e s s i n g Command Languages i n User-Oriented Systems," unpublished document. Department o f Computer S c i e n c e , U n i v e r s i t y of B r i t i s h Columbia, 1971. P a r k e r , J . L ! "A g r a p h i c s and i n f o r m a t i o n r e t r i e v a l s u p e r v i s o r f o r s i m u l a t o r s , " AFIPS, V o l . 40, 1972 ( S p r i n g J o i n t Computer Conference). Peucker,  T.K. "Computer Cartography." Resource Paper Noi 17. Commission on C o l l e g e Geography, Washington, D.C., 1972.  Rapp, M.H., Goldman, M., Smallwood, R. "The I n t e r a c t i v e Graphic T r a n s i t S i m u l a t o r , A T o o l f o r P l a n n i n g Node-Oriented T r a n s i t Systems." Research Report No. 7» Urban Transp o r t a t i o n Program, Department o f Urban P l a n n i n g and C i v i l E n g i n e e r i n g , U n i v e r s i t y of Washington, S e a t t l e , 1971. Robinson, A.H., S a l e , R.D. Elements o f Cartography. Wiley and Sons Inc., New York, 1969. Schmidt, W. Vol.  "The AUTOMAP System."  29, No. 1, 1969.  John  Surveying and Mapping.  S t a t i s t i c s Canada. "GRDSR, An I n t r o d u c t i o n , " unpublished paper. S t a t i s t i c s Canada, Methodology and Systems Branch, Ottawa, 1972. T a u t z , A., B e l f o r d , D. " E d i t i n g Procedures f o r GIDS Data," unpublished document. G r e a t e r Vancouver R e g i o n a l D i s t r i c t P l a n n i n g Department, Vancouver, 1972.  169  Tomlinson, R.F. "An I n t r o d u c t i o n to the Geo-Information System of the Canada Land Inventory," unpublished paper. Department of F o r e s t r y and R u r a l Development, Ottawa,  1967.  Tomlinson, R.F., ( e d . ) . Environment Information Systems. The Proceedings of the UNESCO/IGU F i r s t Symposium on G e o g r a p h i c a l Information Systems, Ottawa, 1970. (A p u b l i c a t i o n of the IGU Commission on G e o g r a p h i c a l Data Sensing and P r o c e s s i n g , Ottawa). Tomlinson, R.F., ( e d . ) . G e o g r a p h i c a l Data Handling. A publicat i o n of the I n t e r n a t i o n a l G e o g r a p h i c a l Union Commission on G e o g r a p h i c a l Data Sensing and P r o c e s s i n g , Ottawa,  1972.  T r o y e r , D. "The I n t e r s e c t i o n o f Polygons," unpublished r e p o r t . Department o f Computer S c i e n c e , U n i v e r s i t y of B r i t i s h Columbia, 1972. U n i t e d S t a t e s Department of Housing a Urban Development. Urban and R e g i o n a l Information Systernst Support f o r P l a n n i n g l n M e t r o p o l i t a n Areas. Washington, 1968. VandenBosch, P. "An I n t e r a c t i v e P i c t u r e E d i t o r — A Subsystem of the G e o g r a p h i c a l Information and D i s p l a y System," unpublished document. Department of Computer S c i e n c e , U n i v e r s i t y of B r i t i s h Columbia, 1972. W a l t e r s , H.W. "Map M o d e l i n g — G e o g r a p h i c Data Handling a t Land C o u n c i l of Governments, Eugene, Oregon," presented a t the P a c i f i c Northwest N a t i o n a l R e c r e a t i o n Parks A s s o c i a t i o n Conference, Vancouver, May 1972. Waugh, T.C., Thomas, A.L. "Geographic Information M a n i p u l a t i o n and Mapping System (GIMMS), a system d e s c r i p t i o n , " unpublished r e p o r t . Department of Geography, Edinburgh U n i v e r s i t y , Edinburgh, S o o t l a n d . W i t l u k , S.W. "SGIDS—A Simple G e o g r a p h i c a l Information D i s p l a y System," extended essay, Department of Geography, Simon F r a s e r U n i v e r s i t y , 1973. W l t t l c k , R.I. "The Geography Program Exchange." Computer I n s t i t u t e f o r S o c i a l Science Research, Michigan S t a t e U n i v e r s i t y , East L a n s i n g , Mich., 1973. Yan,  J.Z. "The Command Manual f o r GIDS," unpublished document. Resource Science C e n t r e , U n i v e r s i t y of B r i t i s h Columbia,  1972.  **«*«««  170  APPENDIX A. SUMMARY OF THE COMMAND LANGUAGE The f o l l o w i n g d e s c r i p t i o n g i v e s a b r i e f o u t l i n e o f the GIDS command language.  The t e x t i n upper case r e p r e s e n t s  words which must appear w i t h o u t change. case w i t h i n  quotes i s t o be r e p l a c e d  v a r i a b l e by the user. optional.  forms of a parameter.  by the a p p r o p r i a t e  The t e x t w i t h i n  The t e x t w i t h i n  The t e x t i n lower  square b r a c k e t s i s  round b r a c k e t s denotes a l t e r n a t i v e  U n d e r l i n e d t e x t i s e i t h e r an a b b r e v i a -  t i o n o f a command o r the d e f a u l t value of a parameter. mands t h a t a r e marked w i t h a plus additional  Com-  s i g n query the user f o r  information.  The f o l l o w i n g types of f i l e s are r e f e r r e d to i n the command  syntaxt •dfile*  - c o n t a i n s the d i g i t i z e d d a t a  •iflie'  - c o n t a i n s the d a t a i n i n t e r m e d i a t e form, used f o r e d i t i n g  •file'  - GIDS f i n a l f i l e ( d e s c r i p t i v e , l o c a t i o n a l , s p l i t , or merged) without a s e l e c t o r  •qfile*  - GIDS f i n a l f i l e selector  + AGGREGATE • q f i l e *  perhaps q u a l i f i e d by a  [TO] 'row f i l e  1  The s e l e c t e d p o r t i o n o f a f i l e i s aggregated a c c o r d i n g to user s p e c i f i c a t i o n s and the r e s u l t i s w r i t t e n i n t o a row f i l e . COMMENT 'any information* A mechanism f o r e n t e r i n g  a comment.  171  COPY • q f l l e  1  [TO] • q f l l e  1  The s e l e c t e d p o r t i o n o f a f i l e file. •CREATE •flle»  [LIKE  'file]]  Is copied t o another GEO/MERGED)j  [KIND=(ROW/SPLIT/  (SIZE** Integer]] [TYPE=(SEQ/LINE/SEQWLJ A f i n a l f i l e Is c r e a t e d and fieldnames and other header Information a r e w r i t t e n i n t o I t . *DRAW • q f l l e *  [jmarked*  BY • f l e l d n a m e j  (ON •graphic device]]  [SCALE*• positive  no.']  [PAPER*(BLANK/GRAPH]]  The s e l e c t e d p o r t i o n o f t h e f i l e Is drawn on the s p e o l f i e d d e v i c e w i t h the s p e c i f i e d symbolism. EMPTY  'file* The data, i n the f i l e  EXECUTE •mts program f i l e  Is emptied, but the headers a r e n o t . f'l/oassignments^]  1  (PAR**execution parameters  1  J  Runs some programs under MTS without unloading GIDS. ' f i l e ' [TO] ' q f l l e * The Intermediate f i l e i s i n p u t , converted to a users p e c i f i e d c o o r d i n a t e system; the dimensioning Is c a l c u l a t e d , and the r e s u l t i n g d a t a Is w r i t t e n out Into the f i n a l f i l e .  •INITIALIZE  •INPUT ' d f l l e ' JTOL='real  [TO] 'If H e ' MENU*•menuflie*[pEL=»real no. *J  no.^|  [CENTROIDS=fcNQWN/UNKNOWN)j  [TYPE*(POLYGON/LINE/DOTT)  The d i g i t i z e d data i s read l n , e d i t e d s l i g h t l y , r e formatted, and w r i t t e n out i n t o an i n t e r m e d i a t e file. The d e s c r i p t i v e data i s decoded v i a the menu l n 'menuflle'. INTERSECT  'qflle'  [WITH]  'qflle'  (AND S T O R E I N | ' q f l l e '  The s e l e c t e d p o r t i o n s o f two f l i e s a r e o v e r l a i d ; the r e s u l t i n g polygons of I n t e r s e c t i o n s a r e w r i t t e n Into the t h i r d l o c a t i o n a l f i l e , and the r e s u l t i n g concatenated a t t r i b u t e s a r e w r i t t e n i n t o the t h i r d descriptive f i l e .  172  LIST • q f i l e  1  [ON 'mts f i l e  or device*]  The s e l e c t e d p o r t i o n o f the f i l e specified device.  is listed  on the  MTS T h i s command r e t u r n s a user t o MTS, d u r i n g which a ^RESTART r e t u r n s him to GIDS. PLOT ' i f l i e '  [ S C A L E = r e a l no. •]  j(AXIS/NOAXISJj  t  1  ON •graphic d e v i c e *  The i n t e r m e d i a t e f i l e can be e d i t e d . SET  [CODE^ i n t e g e r ] PAPER=(BLANK/GRAPH}  Is p l o t t e d , so t h a t the data  (AREA_PRINTING=(ON/OFF) / SCALING=(DEVICE/•positive no.')  /COMMANDJTITLING=(ON/OFF)  / CHARACTER^jSIZEs p o s i t i v e no. •  /SYMBOL^SIZE^positive no.  1  1  / DOUBLETSHADING=(ON/OFF))  T h i s command allows the user to c o n t r o l v a r i o u s of the DRAW or SUPERIMPOSE Commands.  options  SIGNOFF T h i s command w i l l submit any graphs f o r p l o t t i n g and then s i g n a user o f f the computer. STOP Any pending graphs are submitted f o r p l o t t i n g , and then the GIDS run l s s t e r m i n a t e d . •^-SUMMARIZE • q f i l e  1  JOM •mts f i l e  or device ] 1  The s e l e c t e d p o r t i o n o f a f i l e i s aggregated and the r e s u l t s are p r i n t e d as a r e p o r t on the s p e c i f i e d f i l e or device. ^SUPERIMPOSE ' q f i l e '  ["'marked BY 'fieldname]  [JON 'graphic  device  [PAPER=(BLANK/GRAPH^ The s e l e c t e d p o r t i o n o f the f i l e i s drawn superimposed on tops of p r e v i o u s graphs on the d e v i c e w i t h the s p e c i f i e d symbolism.  173  * •marked' may be r e p l a c e d by any o f the f o l l o w i n g * CODED, TRAINGLED, SQUARED, CIRCLED, SYMBOLLED, SHADED, TRIANGLED AND CODED, SQUARED AND CODED, CIRCLED AND CODED, SYMBOLLED AND CODED, SHADED AND CODED, TRIANGLED AND SHADED, SQUARED AND SHADED, CIRCLED AND SHADED, SYMBOLLED AND SHADED. •graphic d e v i c e ' may be r e p l a c e d by any o f the f o l l o w i n g : ADAGE, CALCOMP, LARGE CALCOMP, SYN1, SYN4, SYN6, 2260, 27^1, TTY, 'mts f i l e ' "  B. FIELDNAMES FOR LOCATIONAL FILES Below a r e the twelve fieldnames a s s o c i a t e d w i t h any l o c a t i o n a l f i l e , be I t p o l y g o n a l , l i n e , or p o i n t d a t a . are the 12 dimensioning  These  Items d e s c r i b e d i n S e c t i o n 3.1. ( F i e l d s  #5 through #8 s p e c i f y the minimum bounding r e c t a n g l e ) . 1. STRIPSORTNO.S  unique polygon  2. NOCOORDS  t o t a l number o f c o o r d i n a t e s In the polygon (twice the number o f p o i n t s i n i t )  3. XCENTROID  x - c o o r d l n a t e o f the v i s u a l o e n t r o l d  4. XCENTROID  y - c o o r d i n a t e o f the v i s u a l c e n t r o i d  5. MINX  minimum x-value  6. MINY  minimum y-value  7. MAXX  maximum  8. MAXY  maximum y - v a l u e  9.  area f o r polygon, for point data  AREA  number  i n the polygon  x-value  l e n g t h f o r l i n e , and zero  10. STRIPNO  has to do w i t h s t r i p t h i s i s always zero  11.  user a s s i g n e d polygon  POLYGONNO  12. MAPNO  sorting—currently number  an I d e n t i f i e r f o r the map from which t h i s r e c o r d was d i g i t i z e d  174  C. SAMPLE BUNS WITH GRAPHICAL OUTPUT The f o l l o w i n g computer p r i n t - o u t shows two a c t u a l computer runs. at  The maps produced  the end o f the computer t e x t .  line  by these runs a r e i n c l u d e d The f i r s t  I n d i c a t e s the i n t e n t i o n o f t h a t l i n e .  c h a r a c t e r on each A l i s t of these  p r e f i x c h a r a c t e r s and the i n t e r p r e t a t i o n of the corresponding line  i s g i v e n below: a user command  t o GIDS or a response from GIDS  ?  answer to a q u e s t i o n asked by GIDS  #  a user command  >  a l i n e of a f i l e  to MTS or a response from MTS l i s t e d by MTS  175  SCO 7 ACH: EXA "l.E i ENTER «)S£». 'A'.SJIRO.  :  I  ?  <l **l f. ST SlONl'l *A5: 14:59:37 i f A O J I , „ L U J ; o „P,f AT IJL-c;u Q3-5R 9U_\uS _3i/T3 _ 'I SET TO»=ON * TO. 00 CF = 0 a JLIST LANOUSEI 1•>Q1 ^ ' •" > 1 32yC770052-O270KCCC*0277^196 1712f2186H7IOOOOO > 2 33 7077 10 11-0=23 +027/,-002° + 0274+0563 + 2093+03 05+2186+ 0891 + 2186+0892 + 21 79* C899+2178 > 3 3J_707_7•) 01 j • 089 8+2195 + 09JJ4 + 2 1 35 + 0902 + 2161 + 08 56 + 2 16 3 + 03 56 + 21 5 3 + 0e 73 +2 1 52 + 0872 + 2_147 > 4 i3 7C7 7(:T)'i'3 + ' c l 6 3"+? l-.4ro'3 67+Ti3'6+"cefc*8+ 2131 i06'74• 2 1 2 b * ~ O i 8 0 * 2 r 2 6 T o ' 8 9 5 ' « - 2 1 2 7 " * 0 9 6 b ~ 2 i 2 T > 5 33 707 '0013 +09 10+1 •;09+C33i + 1<;33 + OR80+1956 :  +  +  — > — f — i ^ f ^ o f ^ ^  > 8 3.3 7O77O016 +020 3 +2 1 55 > 0 3 3 7 07 70017-C470 + 0472-00 22+02 73 + 08 3 6+ 1?2<.+0784•194 3 + 0806+1967+0899t_924+ C893 + 1887 > io 3l7oT7oneVc7s^Y945 > 11 337C770119-0227+0126-0026+0273+0759+1398+0624+1969+0639+2004+0767+1926+0766+1943 > ' 12 3 3 7 07 7Q 02 0 + 0 856+ i 90 3+ C3 57 » 1 3 32+ 0E64 + 1 8 56 » 03 7 5 + 1 84 4 + 0 3 86 +1 8 3 3 +0861 +1 824 + 0798+1824 > 13 33 7C7 7 021 » 07 JI H .n 6+ C7 85 H 3 21 +7JT 7lTlTloTbT6TTinr3T+OT66 + 184 S+T>T5§+lT&9*m'!SV* 18 > 14 33 70770 022 +073 6+1 8 7.3 + 0716 • 1 8 87 + 0689+1 908+06 57+1 93 1 + 06 29 +1 94 7 +0 635+1 955+0632 + 196 3 > 15 3 3 7C7 70 024-O52 5+CC71-CO27+O2 68* 0380+ 2 14 5 + 03 73+ 2 1 52+ 0856 + 2 1 53 +08-56 +2 1 63 +0902 +2 161 > 16 3T?OT7:)025»b9OoT2Y2X^^ > 17 38 7077O026+Ci"'2+al47+0374 + 2i52+O856+2153 > 18 33 7CT 'O02 7-0326 + 02 2 5- 00 24 + 02 7 9+ 089.5 + 2 1 S3+ OR 92 + 2 1 S 8+ 089 2 + 2 180 + 0899 +2 I 80+ C899 + 2 1S 7 _ 3l-?O7r)O23+-0-39'2+2ifl7 ' > 20 33 7C7 7J 32 9-0 52 3 +CC77-C024+0274 + 0883 + 1975 + 0831+1990+0899 +1990 + 0899fi556+0878+1958 1 END OF FILE S"T^oriT^S = 4T * tCO'l-'ENT -THIS IS THE DIGITIZER FILE. LINE 1 CONTAINS CONTROL INFORMATION 1 T-0,06 CR = 8 il iCF-.MM E T : FROM COLUMN 13 ON "ARE X AMD Y C nTTPTJf rfAlTTS " •I T = 0.05 0°=7 SRU-v GIDS: 1.0 ; --'THE SET COM.'.A'il IS WORKING - SEE GIDS:NEWS FOR DETAILS 0 "PLEASE ENTER CCM4N0 TO GtOS* fj CG^MF.NT: TH+: L A ' D ISS M E N U h A S"""!^ £ VI Ou S I. Y " h"£ S N " W K l'TTEN~nrNT0~TTiTnnnr£^E^5t! a iai :vAL to c J-MviJ*** 3 *PLFASE F - I T E ^ CO'MANO TO GIOS* " V1 I':.•>•;.• r !\\\>'iSE; ( yENU=?ACH:"ME'iU " •0 ESTF3 SCAL E JF . j , . ) ? 2M0) it w»jt> v6>( a<i c A w a ^ n c K s t hKmryrs-vtrm • ? YES. a WILL T+-ERE M •JEST IMG CF "ClYGC'MS'.' SMHSR Y S OK NO ~~ ? YES " " " • " ENTER FILE v\ME -OR M\N!° U L A 7 I C N " I LE 0  5  s  P  L  ? -M  r~s^5rT-p<r~ir^ 9 TOTAL A--£4 Ci O'lT-'-IT ^R T» W F ' L E « 201.07 T-irat ARE A "••! l\ II •''UL \ MN FILE-- 1 8.02 ",3 " ""'' PLEAS E" "; 'HER"'cr"J"A*N l" TO "G [OS* ' 3 *TS r  1 T;1(  1 (  »C  P,C  O  1  "  '"  ' "'  "  176  •J. M S " L 6 V V « S ! .'.6 V M S ' Ii •• 32  3  \GES  7 = 0 . 0 ? CR = ia K . >'-'-tE\'Y : T H E F U S T T = 0 . 06 OR=8 ' L I S T L . w n i J S E . 1( 1 , 1 3 1  5.3 J  >  _>_ >  3. ' 2 5 8.75 7.5 1 4. 15 8.74 5.  9 13 11 12 13 14  >  15 1 6 17  5 6.  1.8  OQLVGCNS  Or  2. 2. 7 o 0. 00 0.0 6 . '• •> 2 0 . ° ? 9.61 63~~ R. 5 6 " 2 1 . 53 24 9.00 lo.S° 9^> 5.49 20.22 0.0 1. 00 0.36 3 . 36 1 ••>.?. 4 0.0 7 6 . 00 ""f. 5 ° 1 . 3 . 9 3 1.52 1 8 . 44 3.3ft 18.38 1 sj. 59 7,?,6 18.73 0.0 3 0. 00 0.1.3. 3 . 8 0 21 . 4 5 2 1 . _____ _9.6_8 21. . 3 1 CO " 0.0" 4  '.'.OJ  FEW  THE  INTERMEDIATE  70  0.0  ; .77  FILE  21 . 8 5  95 00 8 . 33  21.83 0.0 19.75  EX  IU  SYSTEM,  UT10N 8 . 3 9 OR PLOT__0 C U T ION"  P L ->T  IN  s  USER  0.02  707AUC  0.02  TOTAL  PLOT  TIME  PLOT  TIME  21.78 21.31 19.66 21.41  S.98 8.74 7.68 3.46  19.24  8.98  18.87  7.84  19 3.81 7 . 16  PTS-> 18. 24 16. 87  6,24 7.98 6.89  19.69 18.24 19. 08  6.39 7.91 6. 57  20.04 18.16 1 9 . 31  7.67 7.85 6.39  19.26 18.2 1 19.4 7  7.86 7.72 6.35  19.43 18.30 19.55  8.56 7.67 6.32  24 3.67  PTS-> 21 . 36  8.73  2 1 . 52  8.56  2 1 . 53  8.56  21.63  9.02  21.61  9.00  8. 69  21.44  8. 72  2 1 . 47  8.74  21 . 5 2  8. 56  2 1 . 53  8. 73  3.92  21  .99  21.80  8.99  21.87  8.92  8.99  19.90  19. 56  8.78  19.58  8 . 81  06  27  PTS->  8,92  29  P7S->  6.6.1  21.88 19.90  MINUTES  0  SECONDS  4  Mi M U T E S  35  SECONDS  PASSWORD.  * * L A S T SIC..TV4 WAS:15:02:08 OS F P. _" ? A C i r _ S l G IE D O M A T -1.6; 10: 16 LRU "GUTS':"!.0 " " •F X IT I T ! 8EG I NS ' — 7 H E SET COMMAND I S WORKING ;EE  8.68 8.08 3.70  8.99  P  TOTAL  8.90  6.91 21.86 _8.<?2 21.79_ 'fiT69 ' 2 1 . 4 4 " S.67""2"i'."3 6 8.98 1 9 . 56 8.99 19.2 3 4.21 2 1 . 14 4.13 21.1 4 19.67  E X E C U T I O M B E G I MS W A ! T M.EMORY = 5 . 6 2 PAGE-HOUR, CGST=S2.79 A CT ! V E M E M O R Y * 5 6 . 5 4 PAGE-MID, C0ST=tl.31 E L A P S E D TIME M IN 34 S E C , CCST=»1.02 CPL' TIME USE0=67.6B SEC, CCST=16.58 J O T A L C O S T S I N C E S I G'-I0N=___1. 6 9 S 1 . 4 E X F C U T ' l O I T T S K M IN AT to" T = 0 . 7 9 0R=13 ENTER  0  S.06  EKE C O T l O f J TERMINAT ED T= ; .06 OR=53 S.R! N W E R R : C O S T  «  25CC0.O0  19.43  TERMINATED =1.1 0 2 A R = A L l NED_ BEGINS  SY S T E M ,  0.0  7.84  1  PL71T  1.7, 1 0  PTS->  1  T=l  21..16  17  0.01 0.  _3.05__21.86 0.72 2i~.4 7 8.80 l.o. 56 4 . 61 2 0 . 7 7  1 l_PTS-> 3 . 7 3 2 1 . 52 8.81 19.83 5.11 20.40  OF FILE T = <>, . 6 4 OR=92 IRE: ; T » R T MAMO TO G I 0 S « * ? L E A S E ENTER. COM i £ N T : P L O T T H E IN T E R M E D ! A T E FILE MAMO TO G I D S * CC'. "PLEASE ENTER LANOII.SE. 1 T 3 A C O0E = 0 S C A l 5 = 2 . 0 PLC * P I E » S E E N T E R COM MA'-ID TO G I D S "  a  17.12  31,  1973  0.  ON  FR I  AUG  nros:NEwr,  31  FOR  /72  DETAILS  .80  3.99  21.85 21.26 19.27 21.54 19.45  9.04 6.80 6 . 39 3.05  21.85 21.26 20.04 21.86  6 . 95 6 . 23  2 1 .; 19."  7.84  19.43  19.08 18.31 19.63  8.57 7.66 6.24  18.82 18.42 19.69  8.64 7.59  1 8.5 1 8.1  21.24  8.95  21.27  8.80  21.2  21.  52  21.88 19.  90  177  a  *PLEASE  ENTE*  COMMAND  TO G I O S *  aCPEATE I LANOins.a,tANOUSE.G> 3 ? a S_ a a a a' ? ? ? ?  YEAR M VMIC-I T H E D A T A I N T H I S F I L E W I L L H E I N V A L I D 198 E'ITF.P. F I E L D N A M E , M P P E R D O W O , LOWER 8DUM0 O N I T S V A L U E !F THE FIELD I S m O U N D S D IM V M.IJE E N T E R O N L Y T H E F I EL D N A M E I N D I C A T E NO M O I E F I E L D S BY E N T E R I N G *END FOR E X A M P L E LANDUSE. 0 I C O POPULATION SEMO POL'YGONNO 1ANOUSE LEVEL SEMO ••? I S OAT A FPC'1 MOrE THAN 1 MAP TO BE P U T I N T H I S F I L E 7 E N T E R Y E S M!l a *4A*e F I L E ' L A N D U S E . G ' HAS B E E N C R E A T E D a * * * * * F I L E ' L A N D J S E . R ' HAS B EEM C R E A T E D a ' P L E A S E E N T E t COMMANO TO G I D S * 3 MTS #_ • . D I S P L A Y V S T IE u V'SIZE = 32 " A GES It ? S E T Tnp.=OM u T = 0 . 0 0 DR = 0 <r S R E S T A R T a ' P L E A S E E N T E 3 COMMAND TO G I D S * FILES a COMMENT : MOW WE W R I T E THE C ATA INTO F I N A L a • P L E A S E E N T E * CO"<MAND TO G I D S * a I N I T I A L I Z E L A N D U S E . I TO ( L AM DUSE .P. , L A N D U S E . G 1 a ENTER F I L E MAMS - I I T H G L O B A L O F F S E T S ? GI.OP/AL a ' P L E A S E E M T E l COMMAND TO G I D S * a "TS T=16.50 DR=1!28 DISPLAY VMSIZE VMSIZE = 40 °A GES i T = 0 . 1 8 DR = 41 pc a * P L E AS E ENTEH COMMAND TO G I O S * a E X E C U T E KEB'.StCOSr a E X E C U T I O N B E , IMS a WAIT M E M O R Y * * . * ! ° - \ G E - H C U R i CdST=S1.43  0  7  OR  NO  J  -  3  ACTIVE  •MFMO^Y=l<5.46 P A O E - M I M ,  C T S T = «.0.45  S E L A P S E D TIM-1 = 5 II M 4 1 S E C , C0ST=S0.39 J ^ C P i ^ T j V E U S £ _ J * 2 6 . 1 _ l _ S E C , j £ - l ! 1 * 2 . '. 3 "tofAL C O S T ' ' S f N C E SIGN )M="'S4.S2 " ' *" "" ~ '"~ a EXECUTION TERMINATED _3 * L E A S E SMTEt C 0 ^ N 0 T O GIOS* a C O M M E M T : N)'-J w= T E S T T H E T1VE TO 3(50,150. '2 "OLVSONS a ' P L E A S E E N T E * CCKMIMO TO G I O S * a L I S_T (LAMDUsf . R .LA'-iaUSE.G) SC0PF = (_P0LYGCNMn<3! "a'sosi DAY A:~ P ' l l . Y •("= I,' '"'"CiTDE'S " A P . f": "' 4"D~."00"""til a STC.PSTI* <r.nru05 CENTRA 4.43 21.48 RECT = 0.35 1".73 6. 94 22.36 AREA OR LENGTH* 9.61 a 0 . *'.•-•> > = 7 J 7 . COORDINATES: 6 • 6 . 2S 6 . 79 .32 22.11 6.36 ^>. • 6TT3 T6 a ).!^ 2 2.36 2U .2.36 22.35 6. 7 5 6 .. 6 . 5 4 21 6.4 9 4 6 . 4 7 2 2 . 2 9 ' 6 . 4 1 2 1 . 51 66 .. 6S 04 222.35 1.76 6 . 76 222.13 1.74 6 6.61 . 3 r>.5 . F. 6 5 . 6 . 8 0 2 0 . 4 9 3 . 29 2 0 . 7 2 a 6 . 6 1 21.9 2 0 . 0 67 6 .'" 1 6 .7 9 16 5. <-!> . 0 3 21.77 2.91 2 0 . 06 1 9 . 7 7 4 . 1 9 20.54 4 " 20.20 3 . 6 5 ~}„ ?._. ' i " ••: 0 4 1 '.- 1 ."2 1 7T. 6 - ~ T. 2 6 0 '2! . " 6 4 " " r. •:• r 0 4 " J . :< 6 ' "' 0. 0 "II. 6,16 5.64 19.37 20.17 84 6. 79 0.36 a sTRPsr-i* = 12 C E N T SO* T  P  2  M  READ  »1U«=  1.  2  i ROW DATA: 0 Y»*  =  1 1  77  AT®  0  70 2 „ 21 73 1 '•1 ' "" 2. cnn - S A'". E : 1. 00 ll.RDS 1 °»  ~ ""  77  1 "22. SECT*'  80 20.30  '22.  AREA OR LEMGTH=  22.02 2 0 . 38 20.90  178  3 3 a 3 « H 3 3 3 3 3  POLY** 0. MA»* = 7 0 7 . C00F.0INATES: 5.6'. 19.93 5 . 3 6 2 0 . 17 6.79 19.7'. "6.78 1 9 . 37 ' P L E A S E E N P t H C OK MA NO 10 G I O S * "TS T = 7 . 7 0 DR = 372 RE ' P L E A S E E N T E R COMMAND TO G I D S * C R E A T E ( - R . - G ) L IKE ( LAND U S E , R . L A M D U S E . G ) FILE ! - . ^ J ._H A S 1SJEN .CREMATED * " * V « * F ' l L E '-f< ' ( A S B E E N C R E £ T ¥ D ' ' P L E A S E E N T E l COMMAND TO G I D S *  3 * tt 3 3 3 3  MTS T=2.47 0R=159 .RE 'PLEASE ENTtl LIST (-R.-G) * P L EAS E E N T E l MTS T = 3 . 6 2 DP = 9 9  a 3  a a 3  a a a a  5 . 6'-  19.95  5.6'.  19.93  ;  COMMAND  TO  GIDS*  COMMAND  TO  GIDS*  RE COPY  ' P L E A S E E N T E R COMMAND TO G I D S * ( L A N D U S E . <l, L A N D U S E . " . ) S'lPOLYGGNNO ' P L E A S E E N T E . COMMAND TO G I O S *  <  151)  TO  ( - P ,, - G )  J  MTS T=4,76 DR=108 RE • P L E A S E E N T E * COMMAND T O G I O S * LIST (-P..-G) SC0 E'(PCLYG0NMQ<3) 0. 0 ROW D A T A : POLY«» 1. CODES A R E ! '0.00 STP.PST"= 1. <C0OR0S= 7 2 CENTRD* 4 ,, 4 3 2 1 . 48 PDLY-a=0. '.lA'3.(.=-70-7. COORDINATES.: 0.85 22.36 6.71 22.36 6.72 22.29 6,78 5.79 22,28 6 . 52 21.97 6.4? 21.94 6.47 .21.-36 6 . 4 j i _ 2 3 . £ ! . _ 6 . 54 . . '• : f 6.60 20.06 6.73 20.06 6 . 7 9 1"9."7 3 5 V 3 3 207 16 1.2 6 2.41 21.27 1.93 21.64 1.50 21.91 2.01 21.64 P O H D A T A : P O L Y-')= :005S ARE: 1.00 0.0 2. C E N T ?.D= 6.16 1 •= , 8 4 i C C O R D S = 12 SfRPST** 2 POLYi»= 0. MA3'(- 7 0 7 . COORD I N A T E S : 5.64 19.93 5.8S 20.17 6.70 19.74 _6.J_8 • 37 5.64 * P L E A S E E N i i: < C 0 M M AN.) TO G I O S * " MTS T=2.54 DR=223 R E * P L E A S E E ITER COMMAND T O G I D S * J  r  J L ^ f l Y . J_-R , - Gt COMMAND "TO" " G I D S * " " " " ' P L E A S E" E J f E . COMMENT : C0-> Y 0>ILY T H E F I R S T 2 P C L Y C O N S COMMAND TO G I D S * ' P L E A S E E NTER CflPY (LANDUSE AN JUS E..", ) S ' l P O L Y G O N N O <~5) 'PLEASE N T E l C 1MMA.M0 TO G I D S * "TS "T'= 5 7 2 9 'OR 2711 "  RECT = 22.35 21 . 7 6 ! . / 7 22.04 P. E O T 19. ° 5  0.35 6, b. 4, 0,  19.73  6. 84  6, 8 2 2 2 , 1 1 8 4 22 35 6 , 75 21 , 6 0 21 7 6 "4", '0 3" 2 0 . " 2 0 ~ ! 9 "2 0 . 5 4 8 5 22 3 6 .  5.64 5.64  AREA  2 2 . 36 6, 3 6  22.13  LL -A3,? 865""0 _ 22 10 .. 47 94  19.37  6.79  207TT  OR  LENGTH=  6 . 36 2 2 . 0 3 6 . 80 2 0 . 3 9 "3, 2 9 ' 2 0 , 7 2  9i61 6 . 53 2 2 . 0 2 6 . 61 2 0 . 3 8 _ 2"."9T "2"0';"9'0  AREA OR L E N G T H '  19.93  3  S 3 3 "« a _3 a 3  TO  (-R.^fT)  0=  ' P L E A S E E N T E < COMMAND T I 1ST ( - R . - O I ROW CAT A : P O L 40. C0 0. 0 Y1= 1. : : n - 1 E S AR 1. 3_STCr>sjra= CENT RO4,43 Kn IRHS = COP.-r ! N A T ? s : " a •• Vi V i - " 0. " " MA)<=707, 22 . ? o 6 , 79 2;;. a 0 . B 5 2 2. 36 6./L 2 2.36 3 6.52 21.97 :, . 4 7 2 1 , R 6 6.48 6.4' M.94  RECT =  6. 7 ? 22. 3 5 6, 5  0.85  1°."73  i.84 2 2. • , 6 0 2 1.  6.8 4 =2 75  r 2  21  2 2.36 1 1 77  AREA 36 BO  2'.13 2 1.74  00  LENGTH' b. 36 j . 80  22.03 20.3°  6.53 6.61  22.02 20. 38  179  •4  J  a 3 3 3 3  6.60 20,06 6.74 20. 06 6.79 19.73 5 .63 2.0. 16 5.<-e 19.77 ',.19 20.54 4.03 20.2 C 3.65 20.49 3.29 20.72 2.91 20.90 2. 41 21. 2 7 2.01 21.64 1 .93 21 .64 1 .50 21.91 • 1.26 22.04 0.85 22, 26 ROW 1ATA: P0LYS= 2. COOES APE: l.OQ 0.0 . STKPST>i= 2. 'ICJOROS* 12 CENT»D» 6,16 19.84 P.ECT* 5.64 19.37 6.79 20. 17 A P E A OP. L E NG T H = 0.36 POLYS* 0 . «*-M= 70 7, COORD I NA TES: 5ift4_.L2iiL3  5.34 20. 17  6.70 19.7/. .78 19.37 6  3 'PLEASE ENTER C CM 4 A MO TO GIOS* 3 '-US .I?1*JL?J)R=_IA2. « DISPLAY VM S I Z E V M S U E  'I  =  45  ' P L E A S E ENTER COMMAND TO G I O S * COMMENT : MOW WE D R A W O N L Y R E S I D E N T I A L  POLYGONS  "  ^CsK^~?"rTf^''CW^H'S~TO~C,TOS*  ' P L E A S E ENTER SET SCALIMG =3 . 0 ' P L E A S E ENTER  C CM MA N D  TO G I D S '  COMMAND  70  3  TOTAL  3  SET AREA  3 »  BY  DENSITY  '  ;  GIDS*  a .ORAM (LANOUSE.R.LyiOUSE.-;! _S_*( LANOUSE <  a  AND SHADE  SET CHARACTSR_S!ZE = , 0 7  3 _2 3 a  ~5  |  -  * RE a 3  5.64 19.93  PAGES  1 T.Q.1Q pp  ~a  5. 64 19.95  AREA  0.5 L E ' H T H  *PLEASE  =  79,27""  COMMAND  ENTER  TO.  4-) S H A D E D  BY LA MOUSE.  ~  GIOS*  PRINTING*OFF  *!^LE^rE^TEl"Tci^NT^  :  ^TS T= 1 4 . 7 5 D R = 3 3 1  "  3  ' P L E A S E ENTER COMMAND 10 GIDS* C-IMMENT •• OR A J 1 R \ S . A M D T H E N S U P E R I M P O S E C O M M A N D To^IOS^-  ^LTATriNTET 0  RESIDENTIAL '  AREAS  S DRAW <LANDUSE,R,LANDUSE.GI S = (LAMDU3E > 69 f. L ANDUS E < 30) COOED AND TRIANGLED B Y LANDUSE NT=RR | p T AT 6G506B2A 3 A T T E N T I O N IIMT=s H RE -'PLEASE  3  =NTER  0O'"'4NO  TO  GIOS*  3 SUP tLANDUSE.R.LV-l-jUSE.-il S=(LANOUSc <3> C0DE6 RY LANDUS6 3 ' P L E A S E ENTE* C OMMAND T O G I O S * ?  STOP  a  PLOT  S  EXECUTION  i  co  *sir.  I N SYSTEM,  TOTAL  TERMINATED  * SOURCE *  PLOT  TIME  4  /s^TL^"TTr~ETmTETarrn  MINUTES  44  SECONDS  180  0.0  3.0  6.0 Y  PYTS  9.0  12.0  15.0  1B.0  181  Figure  7.2  R e s i d e n t i a l land shaded by d e n s i t y .  DRAW ( L A N D U S E . R . L A N D U S E . 6 ) S=( LANDUSE < 4) SHADED BY LANDUSI  182  Figure 7 . 3  A map o f r e c r e a t i o n a l land (enclosed i n t r i a n g l e ) , w i t h r e s i d e n t i a l land superimposed on i t . T h i s was produced by the coTjunands DRAW (LANDUSE.R, LANDUSE.G) S-(LANDUSE > 6 9 & LANDUSE <80) CODED AND TRIANGLED BY LANDUSE SUPERIMPOSE (LANDUSE.R, LANDUSE.G) S=(LANDUSE< 3)  SUP  (LANDUSE.R.LANDUSE.G) S=(LANDUSE<3) CODED BY L f  183  D. LEGEND OF LAND USE CODES The l a n d use codes used i n the maps i n t h i s t h e s i s are summarized  below.  Classification  For a more complete l i s t see " H P S Land  Subgroup Report" (George, 1972). Interpretation  Code 1-9 10-39 40 41-49 50-59 60-69 70-79 80-89 90-99  Residential I n d u s t r i a l manufacturing Vaaant land A g r i c u l t u r e , forestryT r a n s p o r t a t i o n , communication Commercial Recreation Institutions Water bodies S i n g l e FamilyTownhouse, Garden Apartment Apartment T r a i l e r Parks Summer Cottages Urban Vacant Duplex and Conversion  RESIDENTIAL  Strip Residential Park Development Parks—Undeveloped Beach Areas S k i i n g Areas D r i v e - I n Theatres Race Tracks G o l f Courses, D r i v i n g Ranges and P u t t i n g Greens Recreational Campgrounds  RECREATION  Miscellaneous  and Marinas  E. LISTING OF THE COPY COMMAND ROUTINE This l i s t i n g  has been i n c l u d e d because i t shows how t o  c o n s t r u c t a command out o f the foundation i n S e c t i o n 3.4. ###*##*  elements as explained  1UT  LISTING  OF F I L E  COPY  05:06  PoMo  0CT  o  05 , 1 9 7 3  ID=J0EL  1 S U B R O U T I N E COPY 2 C SYNTAX OF T H I S COMMAND: 3 C COPY ' Q F I L E ' ( T O ) ' Q F I L E ' 4 C 5 C T H I S COMMAND R O U T I N E SCANS OFF THE 'COPY' COMMAND, 6 C AND C A L L S T A B S E L TO OPEN THE GIDS F I L E S o J__ COMMON / S K I N / j A R (1 32 ) , LOGU.3^ )_»JLJ^G»NpATJJ33_) , ERR , IPOSC 1 3 2 ) , " 8 ~ ~ * LENI132) '"" * "" " " " " 9 C T H I S COMMON AREA C C N T A I N S THE INFORMATION 10 C RETURNED FROM T H E SC ANNERFQR THE COMMAND, U N=IAR(2)+2 12 1=5 13 IF< LOG( 5 ) o E Q o 8) 1=6 14 C OPEN I N P U T F I L E 15 C A L L T A B S E L ( I A R , L O G , I P O S , L E M , I , I EN D, I FI L E , J F ILE , £ 100 ) 16 1=1 END + 1 17 C S K I P OVER BLANKS AND O P T I O N A L KEYWORDS 18 5 J= LOG(D 19 _ IF (_J_o_N E 08 oANDoJoNEo 2) GOTO 10 _ 2 0 1 = 1 +1 21 IF( I oGT.N1 GOTO 2 0 0 2? GOTO 5 23 10 I3EG=I 24 C OPEN J U T P U T F I L E S _25 J^AL_L_ T A B S E L <I AR_,LOG , IP O S , L E N , I REG , IE N D I F I L E I , J F IL E 1 , £ 100 j 26 C DO THE COPY 27 C A L L C0PY1 ( I F I L E , J F I L E , I F I L E 1 , J F ILE3. ) 28 C RETURN TO THE SUPERVISOR ROUTINE •29 100 RETURN 30 C ERROR - NO T O F I L E - PRINT ERROR MESSAGE 31 200 CALL EMSG(200) 32 RETURN 33 END 34 SUBROUTINE C 0 P Y 1 ( I F I L E , J F I L E , I F I L E 1 , J F I L E 1 ) 35 C T H I S S U B R O U T I N E C O P I E S S E L E C T E D RECORDS FROM F I L E ( I F IL E , J F I L E ! 36 C TO ( I F I L E l t J F I L E l ) 37 C 38 C RETURN I F T H E R E IS NO F I L E TO READ 39 I F ( I F I L E o E Q o O o A N D c J F I L E o E O o O ) RETURN 40 C RETLRN IF T H E R E IS NO F I L E TO WRITE 41 I F { I F I L E l o E Q o O o A N D o J F I L E l o E Q o O I RETURN 42 I5ELCT=1 43 C CHECK ON C O M P A T I B I L I T Y OF F I L E S 44 C 45 C S E T T H I N G S UP SO NOTHING I S READ IF NOT NEEDED 46 IF; I F I L E l o E Q o O ) I F I L E = 0 47 I F( J F I L E l o E O o 0) J F I L E = 0 48 C RETURN IF NO F I L E S HAVE TO BE READ 49 I F ( I F I L E o E Q o O o A N D o J F I L E o E Q o 0 ) GOTO 2 0 6  "50  51 52 "53 54 55 56 57 58  C  rjiTpcirTT^rTrTimr^^  I F ( I F I L E l . N E o O o A N D o I F I L E o E Q . O ) GOTO 2 0 6 IF( J F I L E l o N E o O o A M D o J F I L E o E Q o O ) GOTO 206 T COPY I S A C C E P T A B L E C READ ONE RECORD U S I N G TREAD 10 C A L L T R E A D ( I F I L E , X R O W , N ROW,J F I L E,C,N C, I S E L C T , I C O D E , £ 1 0 0 , £ 2 02) C WRITE ONE RECORD U S I N G TWRITE CALL TWRITE(IFILE1,XROW,NROW,JFILE1,C,NC, I SELCT,I C O D E , £ 2 0 4 , £ 2 0 4 C F R E E T H E S P A C E O C C U P I E D RY THE RECORD  I [STING 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74  OF F I L EI FCOPY !IFILEoMEoO)  C 100 C 202 C 204 C 206 500  CALL CALL  :06 P M F S ° A C E <0 5XROW) FSPACE(C)  IF(JFILEoNEoO) GOTO 1 0 RETURN ON EOF RETURN ERROR IN READING F I L E MESS=202 GOTO 5 0 0 EFROR I N WRITING F I L E S MESS=204 GOTO 5 0 0 NOT ENOUGH INPUT TO DO THE MESS=206 CALL EMSG(MESS) RETURN END  0  COPY  0  OCT, 0 5 , 1973  ID=JOEL  

Cite

Citation Scheme:

        

Citations by CSL (citeproc-js)

Usage Statistics

Share

Embed

Customize your widget with the following options, then copy and paste the code below into the HTML of your page to embed this item in your website.
                        
                            <div id="ubcOpenCollectionsWidgetDisplay">
                            <script id="ubcOpenCollectionsWidget"
                            src="{[{embed.src}]}"
                            data-item="{[{embed.item}]}"
                            data-collection="{[{embed.collection}]}"
                            data-metadata="{[{embed.showMetadata}]}"
                            data-width="{[{embed.width}]}"
                            async >
                            </script>
                            </div>
                        
                    
IIIF logo Our image viewer uses the IIIF 2.0 standard. To load this item in other compatible viewers, use this url:
http://iiif.library.ubc.ca/presentation/dsp.831.1-0052000/manifest

Comment

Related Items