GMT - GENERIC MAPPING TOOLS Data Processing and Plotting

Total Page:16

File Type:pdf, Size:1020Kb

GMT - GENERIC MAPPING TOOLS Data Processing and Plotting GMT - GENERIC MAPPING TOOLS Data Processing and Plotting ! 4th Year Honours Course Unit (25 hours) University of Sydney Maria Seton and Jo Whittaker GMT Honours Course - University of Sydney" 1 TABLE OF CONTENTS 1. Introduction" 7 The Course" 7 What is GMT?" 7 2. Spatial Data" 10 Vector Data" 12 Vector Data Storage (File Formats)!................................................................14 Raster Data" 15 Colour" 20 Colour Models!..................................................................................................22 RGB Colour Model!...........................................................................................23 CMYK Colour Model!........................................................................................24 HSV Colour Model!............................................................................................25 3. Historical View of Spatial Data" 29 4. Coordinate Systems" 39 Cartesian Coordinate System" 39 Geographic Coordinate System!.....................................................................39 Latitude!.............................................................................................................44 Longitude!.........................................................................................................45 Determining Longitude!...................................................................................47 Measuring Distance!.........................................................................................48 5. Geodetics" 50 Geometric Earth Models" 50 GMT Honours Course - University of Sydney" 2 Historical Note on the Shape of the Earth!.....................................................53 Figure of the Earth!...........................................................................................55 Ellipsoid!............................................................................................................55 Geoid!.................................................................................................................57 Projections!.......................................................................................................58 Distortion Properties!.......................................................................................60 Projection Parameters!....................................................................................61 Projection Surfaces!.........................................................................................62 Cylindrical Projections!....................................................................................63 Conical Projections!.........................................................................................71 Azimuthal or Planar Projections!....................................................................74 Pseudo or Miscellaneous Projections!...........................................................79 Summary" 81 6. Map Making" 84 Basic UNIX" 84 Command Line Navigation!.............................................................................84 Find out where you are [pwd]!.........................................................................84 List the contents of the current directory [ls]!...............................................84 Change Directory [cd]!.....................................................................................85 Making Directories!..........................................................................................85 Deleting Files and Directories!........................................................................85 Copying and Moving!.......................................................................................86 Other useful UNIX commands and processes!..............................................86 Shell redirection: [<] [>] [>>]!...........................................................................86 Pipes: [ | ]!..........................................................................................................86 Permissions:!....................................................................................................87 GMT Honours Course - University of Sydney" 3 UNIX Summary!.................................................................................................87 GMT Fundamentals" 89 GMT Default Parameters!.................................................................................89 Map boundary parameters in GMT: GMT defaults!........................................93 Defining geodetic parameters in GMT: GMT Defaults!..................................95 Measurement Units in GMT: GMT Defaults!...................................................95 Creating a map boundary in GMT: -B option!.................................................95 Defining the map frame in GMT: -R option!....................................................98 Defining map projections in GMT: -J option!................................................100 Linear projection -Jx or -JX!..........................................................................100 Mercator projection -JM or -Jm!....................................................................101 UTM projection -JU or -Ju!.............................................................................101 Conical projections!.......................................................................................102 Azimuthal projections!...................................................................................102 Thematic (global) projections!.......................................................................103 Creating a basemap using psbasemap!........................................................104 Plotting Vector Data" 105 Plotting Symbols: -S[symbol][size] option!..................................................105 Plotting Vector Data: psxy command!...........................................................106 Colouring Interiors : -G[fill] option!...............................................................108 Colouring Outlines and Lines: -W[pen] option!...........................................110 Plotting Polygons: -L option!.........................................................................112 Plotting Coastlines: pscoast command!.......................................................113 Creating Colour Tables" 115 Defining colours for gridded data: -C option!..............................................115 Creating a colour table using makecpt!........................................................116 Creating a colour table using grd2cpt!.........................................................118 GMT Honours Course - University of Sydney" 4 Plotting Raster Data" 118 Querying raster data using grdinfo!..............................................................119 Plotting contours using grdcontour!............................................................120 Plotting gridded data using grdimage!.........................................................121 Building a GMT Script" 123 Starting a Shell Script!...................................................................................124 Building a Shell Script!...................................................................................124 Make a Shell Script Executable!....................................................................124 Run a Shell Script!..........................................................................................124 Assigning Variables in a Shell Script!...........................................................125 PostScript" 125 Building a PostScript file in GMT: -K and -O options!.................................126 Using Multiple GMT Commands!...................................................................127 7. Data Processing and Interpolation" 129 Modifying Vector Data" 129 Using common UNIX commands!.................................................................129 Using basic awk programming!.....................................................................129 How to use AWK" 129 Processing Vector Data" 134 filter1d!.............................................................................................................134 filter2d!.............................................................................................................134 trend1d!............................................................................................................134 Modifying Raster Data" 134 Querying raster data: grdinfo!.......................................................................135 Resizing or merging gridding data: grdcut, grdpaste and grdblend!........135 Resampling gridded data: grdsample!.........................................................135 GMT Honours Course - University of Sydney" 5 Performing mathematical operations on gridded data: grdmath!..............135 Processing Raster Data" 135 grdfilter!...........................................................................................................135 Data Interpolation" 135 Data Gridding!.................................................................................................135 xyz2grd!...........................................................................................................136 surface!............................................................................................................136 nearneighbor!..................................................................................................136 8. Further Reading" 136 9. References"
Recommended publications
  • Introduction to Unix (PDF)
    Introduction to… UNIX Bob Booth December 2004 AP-UNIX2 © University of Sheffield Contents 1. INTRODUCTION....................................................................................................................................... 3 1.1 THE SHELL ........................................................................................................................................... 3 1.2 FORMAT OF COMMANDS ...................................................................................................................... 4 1.3 ENTERING COMMANDS ......................................................................................................................... 4 2. ACCESSING UNIX MACHINES ............................................................................................................. 5 2.1 TERMINAL EMULATION SOFTWARE...................................................................................................... 5 2.2 LOGGING IN.......................................................................................................................................... 6 2.3 LOGGING OUT ...................................................................................................................................... 6 2.4 CHANGING YOUR PASSWORD............................................................................................................... 8 3. BASIC UNIX COMMANDS...................................................................................................................... 9 3.1 FILENAMES..........................................................................................................................................
    [Show full text]
  • UNIX Text Processing Tools—Programs for Sorting, Compar- Ing, and in Various Ways Examining the Contents of Text Files
    UNIX® TEXT PROCESSING DALE DOUGHERTY AND TIM O’REILLY and the staffofO’Reilly & Associates, Inc. CONSULTING EDITORS: Stephen G. Kochan and PatrickH.Wood HAYDEN BOOKS ADivision of HowardW.Sams & Company 4300 West 62nd Street Indianapolis, Indiana 46268 USA Copyright © 1987 Dale Dougherty and Tim O’Reilly FIRST EDITION SECOND PRINTING — 1988 INTERNET "UTP Revival" RELEASE — 2004 The UTP RevivalRelease is distributed according to the terms of the Creative Commons Attribution License. A copyofthe license is available at http://creativecommons.org/licenses/by/1.0 International Standard Book Number: 0-672-46291-5 Library of Congress Catalog Card Number: 87-60537 Trademark Acknowledgements All terms mentioned in this book that are known to be trademarks or service marks are listed below. Nei- ther the authors nor the UTP Revivalmembers can attest to the accuracyofthis information. Use of a term in this book should not be regarded as affecting the validity of anytrademark or service mark. Apple is a registered trademark and Apple LaserWriter is a trademark of Apple Computer,Inc. devps is a trademark of Pipeline Associates, Inc. Merge/286 and Merge/386 are trademarks of Locus Computing Corp. DDL is a trademark of Imagen Corp. Helvetica and Times Roman are registered trademarks of Allied Corp. IBM is a registered trademark of International Business Machines Corp. Interpress is a trademark of Xerox Corp. LaserJet is a trademark of Hewlett-Packard Corp. Linotronic is a trademark of Allied Corp. Macintosh is a trademark licensed to Apple Computer,Inc. Microsoft is a registered trademark of Microsoft Corp. MKS Toolkit is a trademark of Mortice Kern Systems, Inc.
    [Show full text]
  • Portraying Earth
    A map says to you, 'Read me carefully, follow me closely, doubt me not.' It says, 'I am the Earth in the palm of your hand. Without me, you are alone and lost.’ Beryl Markham (West With the Night, 1946 ) • Map Projections • Families of Projections • Computer Cartography Students often have trouble with geographic names and terms. If you need/want to know how to pronounce something, try this link. Audio Pronunciation Guide The site doesn’t list everything but it does have the words with which you’re most likely to have trouble. • Methods for representing part of the surface of the earth on a flat surface • Systematic representations of all or part of the three-dimensional Earth’s surface in a two- dimensional model • Transform spherical surfaces into flat maps. • Affect how maps are used. The problem: Imagine a large transparent globe with drawings. You carefully cover the globe with a sheet of paper. You turn on a light bulb at the center of the globe and trace all of the things drawn on the globe onto the paper. You carefully remove the paper and flatten it on the table. How likely is it that the flattened image will be an exact copy of the globe? The different map projections are the different methods geographers have used attempting to transform an image of the spherical surface of the Earth into flat maps with as little distortion as possible. No matter which map projection method you use, it is impossible to show the curved earth on a flat surface without some distortion.
    [Show full text]
  • Table of Contents 1
    Table Of Contents 1. Zoo Information a. Logging in b. Transferring files 2. Unix Basics 3. Homework Commands G etting onto the Zoo Type “ssh <netid>@node.zoo.cs.yale.edu”, and enter your netID password when ​ ​ prompted. Your password won’t show up and the cursor won’t move, but it knows what you’re typing. G etting Files onto the Zoo Use the “scp” command to transfer files onto the Zoo. Type “scp filename1 filename2 ​ ​ ​ <netid>@node.zoo.cs.yale.edu:~/mydirectory/mysubdirectory” ​ You should be on your local machine in the same directory as the two files. This will copy the two local files, filename1 and filename2 into the directory mysubdirectory (which is ​ ​ ​ ​ ​ ​ located inside mydirectory in your home directory on the Zoo). You will be prompted to ​ ​ enter your netID password, just like when you ssh in. U nix Basics What is a directory? A directory is simply a folder, which can contain any mixture of files and ​ subdirectories. What is different about a file versus a directory? A directory contains other files and directories, ​ but does not contain information itself -- for example, you can’t use emacs to view a directory. However, you can often use a text editor to view the contents of a file. Sometimes directories and files have different colors when you look at what’s in your current directory, depending on your terminal settings, which can help you tell which is which. What about an executable? An executable is a special type of file that can be run by your ​ computer.
    [Show full text]
  • Maps and Cartography: Map Projections a Tutorial Created by the GIS Research & Map Collection
    Maps and Cartography: Map Projections A Tutorial Created by the GIS Research & Map Collection Ball State University Libraries A destination for research, learning, and friends What is a map projection? Map makers attempt to transfer the earth—a round, spherical globe—to flat paper. Map projections are the different techniques used by cartographers for presenting a round globe on a flat surface. Angles, areas, directions, shapes, and distances can become distorted when transformed from a curved surface to a plane. Different projections have been designed where the distortion in one property is minimized, while other properties become more distorted. So map projections are chosen based on the purposes of the map. Keywords •azimuthal: projections with the property that all directions (azimuths) from a central point are accurate •conformal: projections where angles and small areas’ shapes are preserved accurately •equal area: projections where area is accurate •equidistant: projections where distance from a standard point or line is preserved; true to scale in all directions •oblique: slanting, not perpendicular or straight •rhumb lines: lines shown on a map as crossing all meridians at the same angle; paths of constant bearing •tangent: touching at a single point in relation to a curve or surface •transverse: at right angles to the earth’s axis Models of Map Projections There are two models for creating different map projections: projections by presentation of a metric property and projections created from different surfaces. • Projections by presentation of a metric property would include equidistant, conformal, gnomonic, equal area, and compromise projections. These projections account for area, shape, direction, bearing, distance, and scale.
    [Show full text]
  • Adaptive Composite Map Projections
    IEEE TRANSACTIONS ON VISUALIZATION AND COMPUTER GRAPHICS, VOL. 18, NO. 12, DECEMBER 2012 2575 Adaptive Composite Map Projections Bernhard Jenny Abstract—All major web mapping services use the web Mercator projection. This is a poor choice for maps of the entire globe or areas of the size of continents or larger countries because the Mercator projection shows medium and higher latitudes with extreme areal distortion and provides an erroneous impression of distances and relative areas. The web Mercator projection is also not able to show the entire globe, as polar latitudes cannot be mapped. When selecting an alternative projection for information visualization, rivaling factors have to be taken into account, such as map scale, the geographic area shown, the mapʼs height-to-width ratio, and the type of cartographic visualization. It is impossible for a single map projection to meet the requirements for all these factors. The proposed composite map projection combines several projections that are recommended in cartographic literature and seamlessly morphs map space as the user changes map scale or the geographic region displayed. The composite projection adapts the mapʼs geometry to scale, to the mapʼs height-to-width ratio, and to the central latitude of the displayed area by replacing projections and adjusting their parameters. The composite projection shows the entire globe including poles; it portrays continents or larger countries with less distortion (optionally without areal distortion); and it can morph to the web Mercator projection for maps showing small regions. Index terms—Multi-scale map, web mapping, web cartography, web map projection, web Mercator, HTML5 Canvas.
    [Show full text]
  • Map Projections
    MAP PROJECTIONS Methods of presenting the curved surface of the Earth on a flat map. MAP PROJECTIONS On your notebook paper, create a graphic organizer as illustrated below…Title it MAP PROJECTIONS Map Name Illustration Strength Weakness Used For?? Are all Maps created equally? Imagine trying to flatten out a globe; you would have to stretch it here, compress it there. Because of this, it is quite common for sizes, shapes, and even distances to be misrepresented in the transition from three dimensions to two. Large distortion if you are looking at a hemisphere or the entire world. Smaller distortion/inaccuracies - At the scale of a city or even a small country, Mercator Projection Cylinder shape Meridians stretched apart & parallel to each other instead of meeting at the poles. Landmasses at high latitudes appears LARGER Landmasses at lower latitudes appears relatively SMALLER. Conic Projection Designed as if a cone had been placed over the globe. Arctic regions portrayed accurately. Further you get from the top of the cone, the more distorted sizes and distances become. Great for aeronautical plotting - latitudes are more accurate. Flat Plane/Azumithal Projection Distances measured from the center are accurate. Distortion increases as you get further away from the center point. Used by airline pilots & ship navigators to find the shortest distance between 2 places. Equal Area Map Projection An interrupted view of the globe. Land masses are proportional - giving the correct perspective of size. Not usable for navigation - longitude & latitude are stretched apart in order to conform to sizes. Gall-Peters Projection Landmasses in this projection are kept accurate and in proportion.
    [Show full text]
  • Cylindrical Projections 27
    MAP PROJECTION PROPERTIES: CONSIDERATIONS FOR SMALL-SCALE GIS APPLICATIONS by Eric M. Delmelle A project submitted to the Faculty of the Graduate School of State University of New York at Buffalo in partial fulfillments of the requirements for the degree of Master of Arts Geographical Information Systems and Computer Cartography Department of Geography May 2001 Master Advisory Committee: David M. Mark Douglas M. Flewelling Abstract Since Ptolemeus established that the Earth was round, the number of map projections has increased considerably. Cartographers have at present an impressive number of projections, but often lack a suitable classification and selection scheme for them, which significantly slows down the mapping process. Although a projection portrays a part of the Earth on a flat surface, projections generate distortion from the original shape. On world maps, continental areas may severely be distorted, increasingly away from the center of the projection. Over the years, map projections have been devised to preserve selected geometric properties (e.g. conformality, equivalence, and equidistance) and special properties (e.g. shape of the parallels and meridians, the representation of the Pole as a line or a point and the ratio of the axes). Unfortunately, Tissot proved that the perfect projection does not exist since it is not possible to combine all geometric properties together in a single projection. In the twentieth century however, cartographers have not given up their creativity, which has resulted in the appearance of new projections better matching specific needs. This paper will review how some of the most popular world projections may be suited for particular purposes and not for others, in order to enhance the message the map aims to communicate.
    [Show full text]
  • Operational Guidance Document.Pdf
    Operational Guidance for the Community Multiscale Air Quality (CMAQ) Modeling System Version 4.7.1 (June 2010 Release) Prepared in cooperation with the Community Modeling and Analysis System Institute for the Environment University of North Carolina at Chapel Hill Chapel Hill, NC 27599 CMAQv4.7.1 Operational Guidance Document Operational Guidance for the Community Multiscale Air Quality (CMAQ) Modeling System June 2010 ii http://www.cmaq-model.org CMAQv4.7.1 Operational Guidance Document Disclaimer The information in this document has been funded wholly or in part by the United States Environmental Protection Agency. The draft version of this document has not been subjected to the Agency’s peer and administrative review, nor has it been approved for publication as an EPA document. The draft document has been subjected to review by the Community Modeling and Analysis System Center only; this content has not yet been approved by the EPA. Mention of trade names or commercial products does not constitute endorsement or recommendation for use. June 2010 iii http://www.cmaq-model.org CMAQv4.7.1 Operational Guidance Document Foreword The Community Multiscale Air Quality (CMAQ) modeling system is being developed and maintained under the leadership of the Atmospheric Modeling and Analysis Division of the EPA National Exposure Research Laboratory in Research Triangle Park, NC. CMAQ represents over two decades of research in atmospheric modeling and has been in active development since the early 1990’s. The first release of CMAQ was made available in 1998 without charge for use by air quality scientists, policy makers, and stakeholder groups to address multiscale, multipollutant air quality concerns.
    [Show full text]
  • Section 4 Network Programming and Administration Exercises
    Lab Manual SECTION 4 NETWORK PROGRAMMING AND ADMINISTRATION EXERCISES Structure Page Nos. 4.0 Introduction 48 4.1 Objectives 48 4.2 Lab Sessions 49 4.3 List of Unix Commands 52 4.4 List of TCP/IP Ports 54 3.5 Summary 58 3.6 Further Readings 58 4.0 INTRODUCTION In the earlier sections, you studied the Unix, Linux and C language basics. This section contains more practical information to help you know best about Socket programming, it contains different lab exercises based on Unix and C language. We hope these exercises will provide you practice for socket programming. Towards the end of this section, we have given the list of Unix commands frequently required by the Unix users, further we have given a list of port numbers to indicate the TCP/IP services which will be helpful to you during socket programming. To successfully complete this section, the learner should have the following knowledge and skills prior to starting the section. S/he must have: • Studied the corresponding course material of BCS-052 and completed the assignments. • Proficiency to work with Unix and Linux and C interface. • Knowledge of networking concepts, including network operating system, client- server relationship, and local area network (LAN). Also, to successfully complete this section, the learner should adhere to the following: • Before attending the lab session, the learner must already have written steps/algorithms in his/her lab record. This activity should be treated as home- work that is to be done before attending the lab session. • The learner must have already thoroughly studied the corresponding units of the course material (BCS-052) before attempting to write steps/algorithms for the problems given in a particular lab session.
    [Show full text]
  • Think Unix Associate Publisher Tracy Dunkelberger Jon Lasser Acquisitions Editor Copyright © 2000 by Que Corporation Katie Purdum All Rights Reserved
    00 2376 FM 11.30.00 9:21 AM Page i PERMISSIONS AND OWNERSHIP • USERS AND GROUPS HARD LINKS • SOFT LINKS • REDIRECTION AND PIPES REDIRECTING STDERR • NAME LOOKUP • ROUTING READING MAIL VIA POP3 • VI AND REGULAR EXPRESSIONS FILENAME GLOBBING VERSUS REGEXPS • INTERACTIVE COMMAND-LINE EDITING • HISTORY SUBSTITUTION • JOB CONTROL • VARIABLES AND QUOTING • CONDITIONAL EXECUTION • WHILE AND UNTIL LOOPS • ALIASES AND FUNCTIONS • THE X WINDOW CLIENT/SERVER MODEL WIDGETS AND TOOLKITS • CONFIGURING X • PERMISSIONS AND OWNERSHIP • USERS AND GROUPS • HARD LINKS • SOFT LINKS • REDIRECTION AND PIPES • REDIRECTING STDERR NAME LOOKUP • ROUTING READING MAIL VIA POP3 • VI AND REGULAR EXPRESSIONS FILENAME GLOBBING VERSUS REGEXPS • INTERACTIVE COMMAND-LINE EDITING • HISTORY SUBSTITUTION • JOB CONTROL • VARIABLES AND QUOTING CONDITIONAL EXECUTION • WHILE AND UNTIL LOOPS • ALIASES AND FUNCTIONS • THE X WINDOW CLIENT/SERVER MODEL WIDGETS AND TOOLKITS • CONFIGURING X • PERMISSIONS AND OWNERSHIP • USERS AND GROUPS HARD LINKS • SOFT LINKS • REDIRECTION AND PIPES • REDIRECTING STDERR • NAME LOOKUP • ROUTING READING MAIL VIA POP3 • VI AND REGULAR EXPRESSIONS • FILENAME GLOBBING VERSUS REGEXPS • INTERACTIVE COMMAND-LINE EDITING • HISTORY THINKSUBSTITUTION • JOB CONTROL • VARIABLES AND QUOTINGUnix READING MAN PAGES • ABSOLUTE AND RELATIVE P PERMISSIONS AND OWNERSHIP • USERS AND GRO HARD LINKS • SOFT LINKS • REDIRECTION AND PIPE JON LASSER REDIRECTING STDERR • NAME LOOKUP • ROUTING READING MAIL VIA POP3 • VI AND REGULAR EXPRE FILENAME GLOBBING VERSUS REGEXPS • INTERACT
    [Show full text]
  • The Mercator Projection: Its Uses, Misuses, and Its Association with Scientific Information and the Rise of Scientific Societies
    ABEE, MICHELE D., Ph.D. The Mercator Projection: Its Uses, Misuses, and Its Association with Scientific Information and the Rise of Scientific Societies. (2019) Directed by Dr. Jeff Patton and Dr. Linda Rupert. 309 pp. This study examines the uses and misuses of the Mercator Projection for the past 400 years. In 1569, Dutch cartographer Gerard Mercator published a projection that revolutionized maritime navigation. The Mercator Projection is a rectangular projection with great areal exaggeration, particularly of areas beyond 50 degrees north or south, and is ill-suited for displaying most reference and thematic world maps. The current literature notes the significance of Gerard Mercator, the Mercator Projection, the general failings of the projection, and the twentieth century controversies that arose as a consequence of its misuse. This dissertation illustrates the path of the institutionalization of the Mercator Projection in western cartography and the roles played by navigators, scientific societies and agencies, and by the producers of popular reference and thematic maps and atlases. The data are pulled from the publication record of world maps and world maps in atlases for content analysis. The maps ranged in date from 1569 to 1900 and displayed global or near global coverage. The results revealed that the misuses of the Mercator Projection began after 1700, when it was connected to scientists working with navigators and the creation of thematic cartography. During the eighteenth century, the Mercator Projection was published in journals and reports for geographic societies that detailed state-sponsored explorations. In the nineteenth century, the influence of well- known scientists using the Mercator Projection filtered into the publications for the general public.
    [Show full text]