DOC PREVIEW
Cartographic Computer Programming

This preview shows page 1-2-3 out of 10 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 10 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 10 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 10 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 10 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

29415Cartographic ComputerProgrammingThe control necessary for implementing cartographic data structures, for performing car-tographic transformations, and for anything other than applied computer cartography, re-quires the use of a programming language. Many students find their way into analyticalcartography from other disciplines and as such are excluded from a more in-depth under-standing of analytical cartography because they do not know how to program. Althoughmuch of the material presented in this book can be understood, and even taught, withoutthe use of programming, the advanced student may wish to go further. If your backgroundhas not been in computing, the best advice is to learn programming from the experts. Thisusually means in a computer science department. Learning programming along with agraphics course is not recommended. When we program, we usually do so in a programming language. Just as we use theEnglish language to express our ideas to others, so we use a programming language toexpress our ideas to the computer. Computer programming languages perform sequencesof instructions. This is the case even though our thoughts are often not sequential. A pro-gram moves from step A, to step B, to step C, and the move to step C does not start untilB is reached. Human thought can easily branch from A to C, or to X, Y, and Z, or all foursimultaneously, based on the loosest of connections. Usually, a program or set of programs written in a programming language performs aspecific task. Such a program is referred to as an applications program. The other generaldivision of programming is systems programming, in which the programs control the op-erating system itself. All cartographic programming falls into the applications program-ming category, although there is much that cartographers have to gain from anunderstanding of systems programming.15.1 LANGUAGESSec. 15.1 Languages295All computer programs perform certain generic processes. Most programs perform in-put; that is, they read data from files or a user, they perform operations that transform thedata in some way (such as between data structures) and then they produce output. Theoutput can be a column of numbers, a new file, a graphic, or a map. The most importantfunction of a computer programming language is to control the operation taking place.The programming language gives complete control over an application; it allows us tosay exactly what we want to do, how we want to do it, what data should be processed,and where we want to put the output. Languages have different levels. At the very lowest level of instruction computers useprograms called microcode. Microcode is in binary and is so fundamental to the opera-tions of the computer that without it you cannot even load the operating system or use thecomputer. Microcode instructions tell a computer where to find the operating system,what kind of computer it is, and how to start the boot or the initialization process.At the next level is the machine language program. This language has to be tailoredexclusively for a particular brand of computer, a particular type of memory, and so forth.Programs in machine code (language) talk directly to the hardware. Machine code has thedisadvantage that not only are data required to be in binary but the instructions are also.The last of the low-level computer languages is assembly language. Assembler is com-piled in the same way as higher-level languages. This means that a program can be en-tered and stored in a file, then processed into machine language via a large translationprogram called a compiler. The machine language program is then ready to run.An assembler gives access to registers or parts of the memory into which we can writeinstructions and numbers. Assembly language uses as building blocks an instruction set,consisting of multicharacter mnemonics standing for individual operations. These oper-ations codes perform simple operations, such as putting a number into memory, or takingthe current number that is in one register, and performing a binary AND with the numberin the current register. Assembler language programs are highly adapted to the architec-ture of the computer on which they run and as such are capable of running very fast. Inmany cases, programs are written in higher-level languages, and their most time-consum-ing modules are rewritten in assembly language for efficiency.The remaining levels of computer programming languages fall into what are calledhigh-level languages. High-level languages have named operations, expressions that per-form control, and defined data types. Examples of widely distributed higher-level lan-guages are FORTRAN (or FORmula TRANslation language) although it certainly wasnot the only one, BASIC, and COBOL. Others have found their way into general use. Adistinguishing characteristic of these languages is that although they contain the mechan-ics to write modular programs, they do not make the modular structure an integral part ofthe language.One step beyond high-level languages like FORTRAN are the structured languages.Structured languages, like Pascal and Ada, encourage the user to write programs that aremodular. Modular programs consist of independent units that can be worked on in isola-tion from each other. A structured language encourages the splitting up of programs intosmaller and smaller pieces. Each small program can be worked on, tested, and optimizedindependently, and then the modules can be assembled into a whole, working program.Cartographic Computer ProgrammingChap.15296Other structured languages are PL/1, ALGOL, APL, C, and RATFOR. In addition, anumber of special-purpose languages that are suited to specific tasks, such as text and listprocessing, and complex database management exist at this level. Among these are LISP,PROLOG, MODULA, SNOBOL, and the object-oriented languages such as C++ andSmalltalk. Beyond the high-level language are application-level programs or macroswithin systems with their own internal programming language. Graphics languages existthat can perform manipulation of graphic objects and data structures with a command lan-guage rather than a programming language. For example, within AUTOCAD, you canprogram with LISP, or in many systems you can query a database using SQL (StandardQuery Language).The language used throughout this book is a language called C. C is the third versionof a programming language developed at Bell Laboratories by Dennis Richie.


Cartographic Computer Programming

Download Cartographic Computer Programming
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Cartographic Computer Programming and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Cartographic Computer Programming 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?