/usr/share/doc/gmt/html/man/mapproject.html is in gmt-doc 4.5.12-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 | <!-- Creator : groff version 1.22.2 -->
<!-- CreationDate: Thu Feb 27 18:13:05 2014 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta name="Content-Style" content="text/css">
<style type="text/css">
p { margin-top: 0; margin-bottom: 0; vertical-align: top }
pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
table { margin-top: 0; margin-bottom: 0; vertical-align: top }
h1 { text-align: center }
</style>
<title>MAPPROJECT</title>
</head>
<body bgcolor="#ffffff">
<h1 align="center">MAPPROJECT</h1>
<a href="#NAME">NAME</a><br>
<a href="#SYNOPSIS">SYNOPSIS</a><br>
<a href="#DESCRIPTION">DESCRIPTION</a><br>
<a href="#OPTIONS">OPTIONS</a><br>
<a href="#ASCII FORMAT PRECISION">ASCII FORMAT PRECISION</a><br>
<a href="#EXAMPLES">EXAMPLES</a><br>
<a href="#RESTRICTIONS">RESTRICTIONS</a><br>
<a href="#ELLIPSOIDS AND SPHEROIDS">ELLIPSOIDS AND SPHEROIDS</a><br>
<a href="#SEE ALSO">SEE ALSO</a><br>
<a href="#REFERENCES">REFERENCES</a><br>
<hr>
<h2>NAME
<a name="NAME"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">mapproject
− Forward and Inverse map transformation of 2-D
coordinates</p>
<h2>SYNOPSIS
<a name="SYNOPSIS"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em"><b>mapproject</b>
<i>infiles</i> <b>−J</b><i>parameters</i>
<b>−R</b><i>west</i>/<i>east</i>/<i>south</i>/<i>north</i>[<b>r</b>]
[
<b>−Ab</b>|<b>B</b>|<b>f</b>|<b>F</b>[<i>lon0</i>/<i>lat0</i>]
] [ <b>−C</b>[<i>dx</i>/<i>dy</i>] ] [
<b>−Dc</b>|<b>i</b>|<b>m</b>|<b>p</b> ] [
<b>−E</b>[<i>datum</i>] ] [
<b>−F</b>[<b>k</b>|<b>m</b>|<b>n</b>|<b>i</b>|<b>c</b>|<b>p</b>]
] [
<b>−G</b>[<i>x0</i>/<i>y0</i>][<b>+</b>|<b>-</b>][/<i>unit</i>]
] [ <b>−H</b>[<b>i</b>][<i>nrec</i>] ] [
<b>−I</b> ] [
<b>−L</b><i>line.xy</i>[/<i>unit</i>][<b>+</b>] ] [
<b>−Q</b>[<b>d</b>|<b>e</b> ] [ <b>−S</b> ] [
<b>−T</b>[<b>h</b>]<i>from</i>[/<i>to</i>] ] [
<b>−V</b> ] [ <b>−:</b>[<b>i</b>|<b>o</b>] ] [
<b>−b</b>[<b>i</b>|<b>o</b>][<b>s</b>|<b>S</b>|<b>d</b>|<b>D</b>[<i>ncol</i>]|<b>c</b>[<i>var1</i><b>/</b><i>...</i>]]
] [ <b>−f</b>[<b>i</b>|<b>o</b>]<i>colinfo</i> ] [
<b>−g</b>[<b>a</b>]<b>x</b>|<b>y</b>|<b>d</b>|<b>X</b>|<b>Y</b>|<b>D</b>|[<i>col</i>]<b>z</b>[+|-]<i>gap</i>[<b>u</b>]
] [ <b>−m</b>[<b>i</b>|<b>o</b>][<i>flag</i>] ]</p>
<h2>DESCRIPTION
<a name="DESCRIPTION"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em"><b>mapproject</b>
reads (longitude, latitude) positions from <i>infiles</i>
[or standard input] and computes (x,y) coordinates using the
specified map projection and scales. Optionally, it can read
(x,y) positions and compute (longitude, latitude) values
doing the inverse transformation. This can be used to
transform linear (x,y) points obtained by digitizing a map
of known projection to geographical coordinates. May also
calculate distances along track, to a fixed point, or
closest approach to a line. Finally, can be used to perform
various datum conversions. Additional data fields are
permitted after the first 2 columns which must have
(longitude,latitude) or (x,y). See option <b>−:</b> on
how to read (latitude,longitude) files. <i><br>
infiles</i></p>
<p style="margin-left:22%;">Data file(s) to be transformed.
If not given, standard input is read.</p>
<table width="100%" border="0" rules="none" frame="void"
cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="11%"></td>
<td width="3%">
<p><b>−J</b></p></td>
<td width="8%"></td>
<td width="78%">
<p>Selects the map projection. The following character
determines the projection. If the character is upper case
then the argument(s) supplied as scale(s) is interpreted to
be the map width (or axis lengths), else the scale
argument(s) is the map scale (see its definition for each
projection). UNIT is cm, inch, or m, depending on the
<b><A HREF="gmtdefaults.html#MEASURE_UNIT">MEASURE_UNIT</A></b> setting in .gmtdefaults4, but this can
be overridden on the command line by appending <b>c</b>,
<b>i</b>, or <b>m</b> to the <i>scale</i> or <i>width</i>
values. Append <b>h</b>, <b>+</b>, or <b>-</b> to the given
<i>width</i> if you instead want to set map height, the
maximum dimension, or the minimum dimension, respectively
[Default is <b>w</b> for width].</p></td></tr>
</table>
<p style="margin-left:22%;">In case the central meridian is
an optional parameter and it is being omitted, then the
center of the longitude range given by the <b>−R</b>
option is used. The default standard parallel is the
equator. <br>
The ellipsoid used in the map projections is user-definable
by editing the .gmtdefaults4 file in your home directory. 73
commonly used ellipsoids and spheroids are currently
supported, and users may also specify their own custum
ellipsoid parameters [Default is WGS-84]. Several GMT
parameters can affect the projection: <b><A HREF="gmtdefaults.html#ELLIPSOID">ELLIPSOID</A></b>,
<b><A HREF="gmtdefaults.html#INTERPOLANT">INTERPOLANT</A></b>, <b><A HREF="gmtdefaults.html#MAP_SCALE_FACTOR">MAP_SCALE_FACTOR</A></b>, and
<b><A HREF="gmtdefaults.html#MEASURE_UNIT">MEASURE_UNIT</A></b>; see the <b><A HREF="gmtdefaults.html">gmtdefaults</A></b> man page for
details. <br>
Choose one of the following projections (The <b>E</b> or
<b>C</b> after projection names stands for Equal-Area and
Conformal, respectively):</p>
<p style="margin-left:22%; margin-top: 1em"><b>CYLINDRICAL
PROJECTIONS: <br>
−Jc</b><i>lon0/lat0/scale</i> or
<b>−JC</b><i>lon0/lat0/width</i> (Cassini).</p>
<p style="margin-left:32%;">Give projection center
<i>lon0/lat0</i> and <i>scale</i> (<b>1:</b><i>xxxx</i> or
UNIT/degree).</p>
<p style="margin-left:22%;"><b>−Jcyl_stere</b>/[<i>lon0/</i>[<i>lat0/</i>]]<i>scale</i>
or <b><br>
−JCyl_stere</b>/[<i>lon0/</i>[<i>lat0/</i>]]<i>width</i>
(Cylindrical Stereographic).</p>
<p style="margin-left:32%;">Give central meridian
<i>lon0</i> (optional), standard parallel <i>lat0</i>
(optional), and <i>scale</i> along parallel
(<b>1:</b><i>xxxx</i> or UNIT/degree). The standard parallel
is typically one of these (but can be any value):</p>
<p style="margin-left:43%;">66.159467 - Miller’s
modified Gall <br>
55 - Kamenetskiy’s First <br>
45 - Gall’s Stereographic <br>
30 - Bolshoi Sovietskii Atlas Mira or Kamenetskiy’s
Second <br>
0 - Braun’s Cylindrical</p>
<p style="margin-left:22%;"><b>−Jj</b>[<i>lon0/</i>]<i>scale</i>
or <b>−JJ</b>[<i>lon0/</i>]<i>width</i> (Miller
Cylindrical <br>
Projection).</p>
<p style="margin-left:32%;">Give the central meridian
<i>lon0</i> (optional) and <i>scale</i>
(<b>1:</b><i>xxxx</i> or UNIT/degree).</p>
<p style="margin-left:22%;"><b>−Jm</b>[<i>lon0/</i>[<i>lat0/</i>]]<i>scale</i>
or
<b>−JM</b>[<i>lon0/</i>[<i>lat0/</i>]]<i>width</i></p>
<p style="margin-left:32%;">Give central meridian
<i>lon0</i> (optional), standard parallel <i>lat0</i>
(optional), and <i>scale</i> along parallel
(<b>1:</b><i>xxxx</i> or UNIT/degree).</p>
<p style="margin-left:22%;"><b>−Jo</b><i>parameters</i>
(Oblique Mercator <b>[C]</b>).</p>
<p style="margin-left:32%;">Typically used with
<b>−R</b><...><b>r</b>, otherwise region is in
oblique coordinates. Specify one of: <b><br>
−Jo</b>[<b>a</b>]<i>lon0/lat0/azimuth/scale</i> or
<b><br>
−JO</b>[<b>a</b>]<i>lon0/lat0/azimuth/width</i></p>
<p style="margin-left:43%;">Set projection center
<i>lon0/lat0</i>, <i>azimuth</i> of oblique equator, and
<i>scale</i>.</p>
<p style="margin-left:32%;"><b>−Jo</b>[<b>b</b>]<i>lon0/lat0/lon1/lat1/scale</i>
or <b><br>
−JO</b>[<b>b</b>]<i>lon0/lat0/lon1/lat1/scale</i></p>
<p style="margin-left:43%;">Set projection center
<i>lon0/lat0</i>, another point on the oblique equator
<i>lon1/lat1</i>, and <i>scale</i>.</p>
<p style="margin-left:32%;"><b>−Joc</b><i>lon0/lat0/lonp/latp/scale</i>
or <b><br>
−JOc</b><i>lon0/lat0/lonp/latp/scale</i></p>
<p style="margin-left:43%;">Set projection center
<i>lon0/lat0</i>, pole of oblique projection
<i>lonp/latp</i>, and <i>scale</i>.</p>
<p style="margin-left:32%; margin-top: 1em">Give
<i>scale</i> along oblique equator (<b>1:</b><i>xxxx</i> or
UNIT/degree).</p>
<p style="margin-left:22%;"><b>−Jq</b>[<i>lon0/</i>[<i>lat0/</i>]]<i>scale</i>
or <b>−JQ</b>[<i>lon0/</i>[<i>lat0/</i>]]<i>width</i>
(Cylindrical <br>
Equidistant).</p>
<p style="margin-left:32%;">Give the central meridian
<i>lon0</i> (optional), standard parallel <i>lat0</i>
(optional), and <i>scale</i> (<b>1:</b><i>xxxx</i> or
UNIT/degree). The standard parallel is typically one of
these (but can be any value):</p>
<p style="margin-left:43%;">61.7 - Grafarend and Niermann,
minimum linear distortion <br>
50.5 - Ronald Miller Equirectangular <br>
43.5 - Ronald Miller, minimum continental distortion <br>
42 - Grafarend and Niermann <br>
37.5 - Ronald Miller, minimum overall distortion <br>
0 - Plate Carree, Simple Cylindrical, Plain/Plane Chart</p>
<p style="margin-left:22%;"><b>−Jt</b><i>lon0/</i>[<i>lat0/</i>]<i>scale</i>
or
<b>−JT</b><i>lon0/</i>[<i>lat0/</i>]<i>width</i></p>
<p style="margin-left:32%;">Give the central meridian
<i>lon0</i>, central parallel <i>lat0</i> (optional), and
<i>scale</i> (<b>1:</b><i>xxxx</i> or UNIT/degree).</p>
<p style="margin-left:22%;"><b>−Ju</b><i>zone/scale</i>
or <b>−JU</b><i>zone/width</i> (UTM - Universal
Transverse <br>
Mercator <b>[C]</b>).</p>
<p style="margin-left:32%;">Give the UTM zone
(A,B,1-60[C-X],Y,Z)) and <i>scale</i> (<b>1:</b><i>xxxx</i>
or UNIT/degree). <br>
Zones: If C-X not given, prepend - or + to enforce southern
or northern hemisphere conventions [northern if south >
0].</p>
<p style="margin-left:22%;"><b>−Jy</b>[<i>lon0/</i>[<i>lat0/</i>]]<i>scale</i>
or <b>−JY</b>[<i>lon0/</i>[<i>lat0/</i>]]<i>width</i>
(Cylindrical <br>
Equal-Area <b>[E]</b>).</p>
<p style="margin-left:32%;">Give the central meridian
<i>lon0</i> (optional), standard parallel <i>lat0</i>
(optional), and <i>scale</i> (<b>1:</b><i>xxxx</i> or
UNIT/degree). The standard parallel is typically one of
these (but can be any value):</p>
<p style="margin-left:43%;">50 - Balthasart <br>
45 - Gall-Peters <br>
37.0666 - Caster <br>
37.4 - Trystan Edwards <br>
37.5 - Hobo-Dyer <br>
30 - Behrman <br>
0 - Lambert (default)</p>
<p style="margin-left:22%; margin-top: 1em"><b>CONIC
PROJECTIONS: <br>
−Jb</b><i>lon0/lat0/lat1/lat2/scale</i> or
<b>−JB</b><i>lon0/lat0/lat1/lat2/width</i> <br>
(Albers <b>[E]</b>).</p>
<p style="margin-left:32%;">Give projection center
<i>lon0/lat0</i>, two standard parallels <i>lat1/lat2</i>,
and <i>scale</i> (<b>1:</b><i>xxxx</i> or UNIT/degree).</p>
<p style="margin-left:22%;"><b>−Jd</b><i>lon0/lat0/lat1/lat2/scale</i>
or <b>−JD</b><i>lon0/lat0/lat1/lat2/width</i> <br>
(Conic Equidistant)</p>
<p style="margin-left:32%;">Give projection center
<i>lon0/lat0</i>, two standard parallels <i>lat1/lat2</i>,
and <i>scale</i> (<b>1:</b><i>xxxx</i> or UNIT/degree).</p>
<p style="margin-left:22%;"><b>−Jl</b><i>lon0/lat0/lat1/lat2/scale</i>
or <b>−JL</b><i>lon0/lat0/lat1/lat2/width</i> <br>
(Lambert <b>[C]</b>)</p>
<p style="margin-left:32%;">Give origin <i>lon0/lat0</i>,
two standard parallels <i>lat1/lat2</i>, and <i>scale</i>
along these (<b>1:</b><i>xxxx</i> or UNIT/degree).</p>
<p style="margin-left:22%;"><b>−Jpoly</b>/[<i>lon0/</i>[<i>lat0/</i>]]<i>scale</i>
or
<b>−JPoly</b>/[<i>lon0/</i>[<i>lat0/</i>]]<i>width</i>
<br>
((American) Polyconic).</p>
<p style="margin-left:32%;">Give the central meridian
<i>lon0</i> (optional), reference parallel <i>lat0</i>
(optional, default = equator), and <i>scale</i> along
central meridian (<b>1:</b><i>xxxx</i> or UNIT/degree).</p>
<p style="margin-left:22%; margin-top: 1em"><b>AZIMUTHAL
PROJECTIONS:</b></p>
<p style="margin-left:22%; margin-top: 1em">Except for
polar aspects, <b>−R</b> w/e/s/n will be reset to
<b>−Rg</b>. Use <b>−R</b><...><b>r</b> for
smaller regions. <b><br>
−Ja</b><i>lon0/lat0</i>[<i>/horizon</i>]<i>/scale</i>
or
<b>−JA</b><i>lon0/lat0</i>[<i>/horizon</i>]<i>/width</i>
<br>
(Lambert <b>[E]</b>).</p>
<p style="margin-left:32%;"><i>lon0/lat0</i> specifies the
projection center. <i>horizon</i> specifies the max distance
from projection center (in degrees, <= 180, default 90).
Give <i>scale</i> as <b>1:</b><i>xxxx</i> or
<i>radius/lat</i>, where <i>radius</i> is distance in UNIT
from origin to the oblique latitude <i>lat</i>.</p>
<p style="margin-left:22%;"><b>−Je</b><i>lon0/lat0</i>[<i>/horizon</i>]<i>/scale</i>
or
<b>−JE</b><i>lon0/lat0</i>[<i>/horizon</i>]<i>/width</i>
<br>
(Azimuthal Equidistant).</p>
<p style="margin-left:32%;"><i>lon0/lat0</i> specifies the
projection center. <i>horizon</i> specifies the max distance
from projection center (in degrees, <= 180, default 180).
Give <i>scale</i> as <b>1:</b><i>xxxx</i> or
<i>radius/lat</i>, where <i>radius</i> is distance in UNIT
from origin to the oblique latitude <i>lat</i>.</p>
<p style="margin-left:22%;"><b>−Jf</b><i>lon0/lat0</i>[<i>/horizon</i>]<i>/scale</i>
or
<b>−JF</b><i>lon0/lat0</i>[<i>/horizon</i>]<i>/width</i>
<br>
(Gnomonic).</p>
<p style="margin-left:32%;"><i>lon0/lat0</i> specifies the
projection center. <i>horizon</i> specifies the max distance
from projection center (in degrees, < 90, default 60).
Give <i>scale</i> as <b>1:</b><i>xxxx</i> or
<i>radius/lat</i>, where <i>radius</i> is distance in UNIT
from origin to the oblique latitude <i>lat</i>.</p>
<p style="margin-left:22%;"><b>−Jg</b><i>lon0/lat0</i>[<i>/horizon</i>]<i>/scale</i>
or
<b>−JG</b><i>lon0/lat0</i>[<i>/horizon</i>]<i>/width</i>
<br>
(Orthographic).</p>
<p style="margin-left:32%;"><i>lon0/lat0</i> specifies the
projection center. <i>horizon</i> specifies the max distance
from projection center (in degrees, <= 90, default 90).
Give <i>scale</i> as <b>1:</b><i>xxxx</i> or
<i>radius/lat</i>, where <i>radius</i> is distance in UNIT
from origin to the oblique latitude <i>lat</i>.</p>
<p style="margin-left:22%;"><b>−Jg</b><i>lon0/lat0/altitude/azimuth/tilt/twist/Width/Height/scale</i>
or <b><br>
−JG</b><i>lon0/lat0/altitude/azimuth/tilt/twist/Width/Height/width</i>
<br>
(General Perspective).</p>
<p style="margin-left:32%;"><i>lon0/lat0</i> specifies the
projection center. <i>altitude</i> is the height (in km) of
the viewpoint above local sea level. If <i>altitude</i> is
less than 10, then it is the distance from the center of the
earth to the viewpoint in earth radii. If <i>altitude</i>
has a suffix <b>r</b> then it is the radius from the center
of the earth in kilometers. <i>azimuth</i> is measured to
the east of north of view. <i>tilt</i> is the upward tilt of
the plane of projection. If <i>tilt</i> is negative, then
the viewpoint is centered on the horizon. Further, specify
the clockwise <i>twist</i>, <i>Width</i>, and <i>Height</i>
of the viewpoint in degrees. Give <i>scale</i> as
<b>1:</b><i>xxxx</i> or <i>radius/lat</i>, where
<i>radius</i> is distance in UNIT from origin to the oblique
latitude <i>lat</i>.</p>
<p style="margin-left:22%;"><b>−Js</b><i>lon0/lat0</i>[<i>/horizon</i>]<i>/scale</i>
or
<b>−JS</b><i>lon0/lat0</i>[<i>/horizon</i>]<i>/width</i>
<br>
(General Stereographic <b>[C]</b>).</p>
<p style="margin-left:32%;"><i>lon0/lat0</i> specifies the
projection center. <i>horizon</i> specifies the max distance
from projection center (in degrees, < 180, default 90).
Give <i>scale</i> as <b>1:</b><i>xxxx</i> (true at pole) or
<i>lat</i>/<b>1:</b><i>xxxx</i> (true at standard parallel
<i>lat</i>) or <i>radius/lat</i> (<i>radius</i> in UNIT from
origin to the oblique latitude <i>lat</i>). Note if
<b>1:</b><i>xxxx</i> is used then to specify <i>horizon</i>
you must also specify the <i>lat</i> as +-90 to avoid
ambiguity.</p>
<p style="margin-left:22%; margin-top: 1em"><b>MISCELLANEOUS
PROJECTIONS: <br>
−Jh</b>[<i>lon0/</i>]<i>scale</i> or
<b>−JH</b>[<i>lon0/</i>]<i>width</i> (Hammer
<b>[E]</b>).</p>
<p style="margin-left:32%;">Give the central meridian
<i>lon0</i> (optional) and <i>scale</i> along equator
(<b>1:</b><i>xxxx</i> or UNIT/degree).</p>
<p style="margin-left:22%;"><b>−Ji</b>[<i>lon0/</i>]<i>scale</i>
or <b>−JI</b>[<i>lon0/</i>]<i>width</i> (Sinusoidal
<b>[E]</b>).</p>
<p style="margin-left:32%;">Give the central meridian
<i>lon0</i> (optional) and <i>scale</i> along equator
(<b>1:</b><i>xxxx</i> or UNIT/degree).</p>
<p style="margin-left:22%;"><b>−Jkf</b>[<i>lon0/</i>]<i>scale</i>
or <b>−JKf</b>[<i>lon0/</i>]<i>width</i> (Eckert IV)
<b>[E]</b>).</p>
<p style="margin-left:32%;">Give the central meridian
<i>lon0</i> (optional) and <i>scale</i> along equator
(<b>1:</b><i>xxxx</i> or UNIT/degree).</p>
<p style="margin-left:22%;"><b>−Jk</b>[<b>s</b>][<i>lon0/</i>]<i>scale</i>
or <b>−JK</b>[<b>s</b>][<i>lon0/</i>]<i>width</i>
(Eckert VI) <b>[E]</b>).</p>
<p style="margin-left:32%;">Give the central meridian
<i>lon0</i> (optional) and <i>scale</i> along equator
(<b>1:</b><i>xxxx</i> or UNIT/degree).</p>
<p style="margin-left:22%;"><b>−Jn</b>[<i>lon0/</i>]<i>scale</i>
or <b>−JN</b>[<i>lon0/</i>]<i>width</i>
(Robinson).</p>
<p style="margin-left:32%;">Give the central meridian
<i>lon0</i> (optional) and <i>scale</i> along equator
(<b>1:</b><i>xxxx</i> or UNIT/degree).</p>
<p style="margin-left:22%;"><b>−Jr</b>[<i>lon0/</i>]<i>scale</i>
<b>−JR</b>[<i>lon0/</i>]<i>width</i> (Winkel
Tripel).</p>
<p style="margin-left:32%;">Give the central meridian
<i>lon0</i> (optional) and <i>scale</i> along equator
(<b>1:</b><i>xxxx</i> or UNIT/degree).</p>
<p style="margin-left:22%;"><b>−Jv</b>[<i>lon0/</i>]<i>scale</i>
or <b>−JV</b>[<i>lon0/</i>]<i>width</i> (Van der
Grinten).</p>
<p style="margin-left:32%;">Give the central meridian
<i>lon0</i> (optional) and <i>scale</i> along equator
(<b>1:</b><i>xxxx</i> or UNIT/degree).</p>
<p style="margin-left:22%;"><b>−Jw</b>[<i>lon0/</i>]<i>scale</i>
or <b>−JW</b>[<i>lon0/</i>]<i>width</i> (Mollweide
<b>[E]</b>).</p>
<p style="margin-left:32%;">Give the central meridian
<i>lon0</i> (optional) and <i>scale</i> along equator
(<b>1:</b><i>xxxx</i> or UNIT/degree).</p>
<p style="margin-left:22%; margin-top: 1em"><b>NON-GEOGRAPHICAL
PROJECTIONS: <br>
−Jp</b>[<b>a</b>]<i>scale</i>[<i>/origin</i>][<b>r</b>|<b>z</b>]
or
<b>−JP</b>[<b>a</b>]<i>width</i>[<i>/origin</i>][<b>r</b>|<b>z</b>]
(Polar <br>
coordinates (theta,r))</p>
<p style="margin-left:32%;">Optionally insert <b>a</b>
after <b>−Jp</b> [ or <b>−JP</b>] for azimuths
CW from North instead of directions CCW from East [Default].
Optionally append /<i>origin</i> in degrees to indicate an
angular offset [0]). Finally, append <b>r</b> if r is
elevations in degrees (requires s >= 0 and n <= 90) or
<b>z</b> if you want to annotate depth rather than radius
[Default]. Give <i>scale</i> in UNIT/r-unit.</p>
<p style="margin-left:22%;"><b>−Jx</b><i>x-scale</i>[<i>/y-scale</i>]
or <b>−JX</b><i>width</i>[<i>/height</i>] (Linear,
log, and <br>
power scaling)</p>
<p style="margin-left:32%;">Give <i>x-scale</i>
(<b>1:</b><i>xxxx</i> or UNIT/x-unit) and/or <i>y-scale</i>
(<b>1:</b><i>xxxx</i> or UNIT/y-unit); or specify
<i>width</i> and/or <i>height</i> in UNIT.
<i>y-scale</i>=<i>x-scale</i> if not specified separately
and using <b>1:</b><i>xxxx</i> implies that x-unit and
y-unit are in meters. Use negative scale(s) to reverse the
direction of an axis (e.g., to have y be positive down). Set
<i>height</i> or <i>width</i> to 0 to have it recomputed
based on the implied scale of the other axis. Optionally,
append to <i>x-scale</i>, <i>y-scale</i>, <i>width</i> or
<i>height</i> one of the following:</p>
<table width="100%" border="0" rules="none" frame="void"
cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="32%"></td>
<td width="10%">
<p><b>d</b></p></td>
<td width="1%"></td>
<td width="57%">
<p>Data are geographical coordinates (in degrees).</p></td></tr>
<tr valign="top" align="left">
<td width="32%"></td>
<td width="10%">
<p><b>l</b></p></td>
<td width="1%"></td>
<td width="57%">
<p>Take log10 of values before scaling.</p></td></tr>
<tr valign="top" align="left">
<td width="32%"></td>
<td width="10%">
<p><b>p</b><i>power</i></p></td>
<td width="1%"></td>
<td width="57%">
<p>Raise values to <i>power</i> before scaling.</p></td></tr>
<tr valign="top" align="left">
<td width="32%"></td>
<td width="10%">
<p><b>t</b></p></td>
<td width="1%"></td>
<td width="57%">
<p>Input coordinates are time relative to
<b><A HREF="gmtdefaults.html#TIME_EPOCH">TIME_EPOCH</A></b>.</p> </td></tr>
<tr valign="top" align="left">
<td width="32%"></td>
<td width="10%">
<p><b>T</b></p></td>
<td width="1%"></td>
<td width="57%">
<p>Input coordinates are absolute time.</p></td></tr>
</table>
<p style="margin-left:32%; margin-top: 1em">Default axis
lengths (see <b><A HREF="gmtdefaults.html">gmtdefaults</A></b>) can be invoked using
<b>−JXh</b> (for landscape); <b>−JXv</b> (for
portrait) will swap the x- and y-axis lengths. The default
unit for this installation is either cm or inch, as defined
in the file share/gmt_setup.conf. However, you may change
this by editing your .gmtdefaults4 file(s).</p>
<table width="100%" border="0" rules="none" frame="void"
cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="11%"></td>
<td width="3%">
<p style="margin-top: 1em"><b>−R</b></p></td>
<td width="8%"></td>
<td width="78%">
<p style="margin-top: 1em"><i>xmin</i>, <i>xmax</i>,
<i>ymin</i>, and <i>ymax</i> specify the Region of interest.
For geographic regions, these limits correspond to <i>west,
east, south,</i> and <i>north</i> and you may specify them
in decimal degrees or in [+-]dd:mm[:ss.xxx][W|E|S|N] format.
Append <b>r</b> if lower left and upper right map
coordinates are given instead of w/e/s/n. The two shorthands
<b>−Rg</b> and <b>−Rd</b> stand for global
domain (0/360 and -180/+180 in longitude respectively, with
-90/+90 in latitude). Alternatively, specify the name of an
existing grid file and the <b>−R</b> settings (and
grid spacing, if applicable) are copied from the grid. For
calendar time coordinates you may either give (a) relative
time (relative to the selected <b><A HREF="gmtdefaults.html#TIME_EPOCH">TIME_EPOCH</A></b> and in the
selected <b><A HREF="gmtdefaults.html#TIME_UNIT">TIME_UNIT</A></b>; append <b>t</b> to
<b>−JX</b>|<b>x</b>), or (b) absolute time of the form
[<i>date</i>]<b>T</b>[<i>clock</i>] (append <b>T</b> to
<b>−JX</b>|<b>x</b>). At least one of <i>date</i> and
<i>clock</i> must be present; the <b>T</b> is always
required. The <i>date</i> string must be of the form
[-]yyyy[-mm[-dd]] (Gregorian calendar) or yyyy[-Www[-d]]
(ISO week calendar), while the <i>clock</i> string must be
of the form hh:mm:ss[.xxx]. The use of delimiters and their
type and positions must be exactly as indicated (however,
input, output and plot formats are customizable; see
<b><A HREF="gmtdefaults.html">gmtdefaults</A></b>). Special case for the UTM projection: If
<b>−C</b> is used and <b>−R</b> is not given
then the region is set to coincide with the given UTM zone
so as to preserve the full ellipsoidal solution (See
RESTRICTIONS for more information).</p></td></tr>
</table>
<h2>OPTIONS
<a name="OPTIONS"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">No space
between the option flag and the associated arguments.
<i><br>
infile(s)</i></p>
<p style="margin-left:22%;">input file(s) with 2 or more
columns. If no file(s) is given, <b>mapproject</b> will read
the standard input.</p>
<p style="margin-left:11%;"><b>−A</b>[<b>f</b>|<b>b</b>]</p>
<p style="margin-left:22%;"><b>−A</b> calculates the
(forward) azimuth from fixed point <i>lon/lat</i> to each
data point. Use <b>−Ab</b> to get back-azimuth from
data points to fixed point. Upper case <b>F</b> or <b>B</b>
will convert from geodetic to geocentric latitudes and
estimate azimuth of geodesics (assuming the current
ellipsoid is not a sphere). If no fixed point is given then
we compute the azimuth (or back-azimuth) from the previous
point.</p>
<table width="100%" border="0" rules="none" frame="void"
cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p><b>−C</b></p></td>
<td width="7%"></td>
<td width="78%">
<p>Set center of projected coordinates to be at map
projection center [Default is lower left corner].
Optionally, add offsets in the projected units to be added
(or subtracted when <b>−I</b> is set) to (from) the
projected coordinates, such as false eastings and northings
for particular projection zones [0/0]. The unit used for the
offsets is the plot distance unit in effect (see
<b><A HREF="gmtdefaults.html#MEASURE_UNIT">MEASURE_UNIT</A></b>) unless <b>−F</b> is used, in
which case the offsets are always in meters.</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p><b>−D</b></p></td>
<td width="7%"></td>
<td width="78%">
<p>Temporarily override <b><A HREF="gmtdefaults.html#MEASURE_UNIT">MEASURE_UNIT</A></b> and use
<b>c</b> (cm), <b>i</b> (inch), <b>m</b> (meter), or
<b>p</b> (points) instead. Cannot be used with
<b>−F</b>.</p> </td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p><b>−E</b></p></td>
<td width="7%"></td>
<td width="78%">
<p>Convert from geodetic (lon, lat, height) to Earth
Centered Earth Fixed (ECEF) (x,y,z) coordinates (add
<b>−I</b> for the inverse conversion). Append datum ID
(see <b>−Qd</b>) or give
<i>ellipsoid</i>:<i>dx,dy,dz</i> where <i>ellipsoid</i> may
be an ellipsoid ID (see <b>−Qe</b>) or given as
<i>a</i>[,<i>inv_f</i>], where <i>a</i> is the semi-major
axis and <i>inv_f</i> is the inverse flattening (0 if
omitted). If <i>datum</i> is - or not given we assume
WGS-84.</p> </td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p><b>−F</b></p></td>
<td width="7%"></td>
<td width="78%">
<p>Force 1:1 scaling, i.e., output (or input, see
<b>−I</b>) data are in actual projected meters. To
specify other units, append <b>k</b> (km), <b>m</b> (mile),
<b>n</b> (nautical mile), <b>i</b> (inch), <b>c</b> (cm), or
<b>p</b> (points). Without <b>−F</b>, the output (or
input, see <b>−I</b>) are in the units specified by
<b><A HREF="gmtdefaults.html#MEASURE_UNIT">MEASURE_UNIT</A></b> (but see <b>−D</b>).</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p><b>−G</b></p></td>
<td width="7%"></td>
<td width="78%">
<p>Calculate distances along track OR to the optional point
set with <b>−G</b><i>x0/y0</i>. Append IT(unit), the
distance unit; choose among <b>e</b> (m), <b>k</b> (km),
<b>m</b> (mile), <b>n</b> (nautical mile), <b>d</b>
(spherical degree), <b>c</b> (Cartesian distance using input
coordinates) or <b>C</b> (Cartesian distance using projected
coordinates). The last unit requires <b>−R</b> and
<b>−J</b> to be set. Upper case <b>E</b>, <b>K</b>,
<b>M</b>, <b>N</b>, or <b>D</b> will use exact methods for
geodesic distances (Rudoe’s method for distances in
length units and employing geocentric latitudes in degree
calculations, assuming the current ellipsoid is not
spherical). With no fixed point we calculate cumulate
distances along track. To obtain incremental distance
between successive points, use <b>−G-</b>. To specify
the 2nd point via two extra columns in the input file,
choose <b>−G+</b>.</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p><b>−H</b></p></td>
<td width="7%"></td>
<td width="78%">
<p>Input file(s) has header record(s). If used, the default
number of header records is <b><A HREF="gmtdefaults.html#N_HEADER_RECS">N_HEADER_RECS</A></b>. Use
<b>−Hi</b> if only input data should have header
records [Default will write out header records if the input
data have them]. Blank lines and lines starting with # are
always skipped.</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p><b>−I</b></p></td>
<td width="7%"></td>
<td width="78%">
<p>Do the Inverse transformation, i.e., get
(longitude,latitude) from (x,y) data.</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p><b>−L</b></p></td>
<td width="7%"></td>
<td width="78%">
<p>Determine the shortest distance from the input data
points to the line(s) given in the ASCII multi-segment file
<i>line.xy</i>. The distance and the coordinates of the
nearest point will be appended to the output as three new
columns. Append the distance unit; choose among <b>e</b>
(m), <b>k</b> (km), <b>m</b> (mile), <b>n</b> (nautical
mile), <b>d</b> (spherical degree), <b>c</b> (Cartesian
distance using input coordinates) or <b>C</b> (Cartesian
distance using projected coordinates). The last unit
requires <b>−R</b> and <b>−J</b> to be set. A
spherical approximation is used for geographic data.
Finally, append <b>+</b> to report the line segment id and
the fractional point number instead of lon/lat of the
nearest point.</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p><b>−Q</b></p></td>
<td width="7%"></td>
<td width="78%">
<p>List all projection parameters. To only list datums, use
<b>−Qd</b>. To only list ellipsoids, use
<b>−Qe</b>.</p> </td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p><b>−S</b></p></td>
<td width="7%"></td>
<td width="78%">
<p>Suppress points that fall outside the region.</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p><b>−T</b></p></td>
<td width="7%"></td>
<td width="78%">
<p>Coordinate conversions between datums <i>from</i> and
<i>to</i> using the standard Molodensky transformation. Use
<b>−Th</b> if 3rd input column has height above
ellipsoid [Default assumes height = 0, i.e., on the
ellipsoid]. Specify datums using the datum ID (see
<b>−Qd</b>) or give <i>ellipsoid</i>:<i>dx,dy,dz</i>
where <i>ellipsoid</i> may be an ellipsoid ID (see
<b>−Qe</b>) or given as <i>a</i>[,<i>inv_f</i>], where
<i>a</i> is the semi-major axis and <i>inv_f</i> is the
inverse flattening (0 if omitted). If <i>datum</i> is - or
not given we assume WGS-84. <b>−T</b> may be used in
conjunction with <b>−R −J</b> to change the
datum before coordinate projection (add <b>−I</b> to
apply the datum conversion after the inverse projection).
Make sure that the <b><A HREF="gmtdefaults.html#ELLIPSOID">ELLIPSOID</A></b> setting is correct for
your case.</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p><b>−V</b></p></td>
<td width="7%"></td>
<td width="78%">
<p>Selects verbose mode, which will send progress reports
to stderr [Default runs "silently"].</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p><b>−:</b></p></td>
<td width="7%"></td>
<td width="78%">
<p>Toggles between (longitude,latitude) and
(latitude,longitude) input and/or output. [Default is
(longitude,latitude)]. Append <b>i</b> to select input only
or <b>o</b> to select output only. [Default affects
both].</p> </td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p><b>−bi</b></p></td>
<td width="7%"></td>
<td width="78%">
<p>Selects binary input. Append <b>s</b> for single
precision [Default is <b>d</b> (double)]. Uppercase <b>S</b>
or <b>D</b> will force byte-swapping. Optionally, append
<i>ncol</i>, the number of columns in your binary input file
if it exceeds the columns needed by the program. Or append
<b>c</b> if the input file is netCDF. Optionally, append
<i>var1</i><b>/</b><i>var2</i><b>/</b><i>...</i> to specify
the variables to be read. [Default is 2 input columns].</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p><b>−bo</b></p></td>
<td width="7%"></td>
<td width="78%">
<p>Selects binary output. Append <b>s</b> for single
precision [Default is <b>d</b> (double)]. Uppercase <b>S</b>
or <b>D</b> will force byte-swapping. Optionally, append
<i>ncol</i>, the number of desired columns in your binary
output file. [Default is same as input].</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p><b>−f</b></p></td>
<td width="7%"></td>
<td width="78%">
<p>Special formatting of input and/or output columns (time
or geographical data). Specify <b>i</b> or <b>o</b> to make
this apply only to input or output [Default applies to
both]. Give one or more columns (or column ranges) separated
by commas. Append <b>T</b> (absolute calendar time),
<b>t</b> (relative time in chosen <b><A HREF="gmtdefaults.html#TIME_UNIT">TIME_UNIT</A></b> since
<b><A HREF="gmtdefaults.html#TIME_EPOCH">TIME_EPOCH</A></b>), <b>x</b> (longitude), <b>y</b>
(latitude), or <b>f</b> (floating point) to each column or
column range item. Shorthand
<b>−f</b>[<b>i</b>|<b>o</b>]<b>g</b> means
<b>−f</b>[<b>i</b>|<b>o</b>]0<b>x</b>,1<b>y</b>
(geographic coordinates).</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p><b>−g</b></p></td>
<td width="7%"></td>
<td width="78%">
<p>Examine the spacing between consecutive data points in
order to impose breaks in the line. Append <b>x</b>|<b>X</b>
or <b>y</b>|<b>Y</b> to define a gap when there is a large
enough change in the x or y coordinates, respectively, or
<b>d</b>|<b>D</b> for distance gaps; use upper case to
calculate gaps from projected coordinates. For gap-testing
on other columns use [<i>col</i>]<b>z</b>; if <i>col</i> is
not prepended the it defaults to 2 (i.e., 3rd column).
Append [+|-]<i>gap</i> and optionally a unit <b>u</b>.
Regarding optional signs: -ve means previous minus current
column value must exceed |<i>gap</i> to be a gap, +ve means
current minus previous column value must exceed <i>gap</i>,
and no sign means the absolute value of the difference must
exceed <i>gap</i>. For geographic data
(<b>x</b>|<b>y</b>|<b>d</b>), the unit <b>u</b> may be
m<b>e</b>ter [Default], <b>k</b>ilometer, <b>m</b>iles, or
<b>n</b>autical miles. For projected data
(<b>X</b>|<b>Y</b>|<b>D</b>), choose from <b>i</b>nch,
<b>c</b>entimeter, <b>m</b>eter, or <b>p</b>oints [Default
unit set by MEASURE_UNIT]. Note: For
<b>x</b>|<b>y</b>|<b>z</b> with time data the unit is
instead controlled by TIME_UNIT. Repeat the option to
specify multiple criteria, of which any can be met to
produce a line break. Issue an additional <b>−ga</b>
to indicate that all criteria must be met instead.</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p><b>−m</b></p></td>
<td width="7%"></td>
<td width="78%">
<p>Multiple segment file(s). Segments are separated by a
special record. For ASCII files the first character must be
<i>flag</i> [Default is ’>’]. For binary
files all fields must be NaN and <b>−b</b> must set
the number of output columns explicitly. By default the
<b>−m</b> setting applies to both input and output.
Use <b>−mi</b> and <b>−mo</b> to give separate
settings to input and output.</p></td></tr>
</table>
<h2>ASCII FORMAT PRECISION
<a name="ASCII FORMAT PRECISION"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">The ASCII
output formats of numerical data are controlled by
parameters in your .gmtdefaults4 file. Longitude and
latitude are formatted according to
<b><A HREF="gmtdefaults.html#OUTPUT_DEGREE_FORMAT">OUTPUT_DEGREE_FORMAT</A></b>, whereas other values are
formatted according to <b><A HREF="gmtdefaults.html#D_FORMAT">D_FORMAT</A></b>. Be aware that the
format in effect can lead to loss of precision in the
output, which can lead to various problems downstream. If
you find the output is not written with enough precision,
consider switching to binary output (<b>−bo</b> if
available) or specify more decimals using the
<b><A HREF="gmtdefaults.html#D_FORMAT">D_FORMAT</A></b> setting.</p>
<h2>EXAMPLES
<a name="EXAMPLES"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">To transform a
file with (longitude,latitude) into (x,y) positions in cm on
a Mercator grid for a given scale of 0.5 cm per degree,
run</p>
<p style="margin-left:11%; margin-top: 1em"><b>mapproject</b>
lonlatfile <b>−R</b> 20/50/12/25 <b>−Jm</b>
0.5<b>c</b> > xyfile</p>
<p style="margin-left:11%; margin-top: 1em">To transform
several 2-column, binary, double precision files with
(latitude,longitude) into (x,y) positions in inch on a
Transverse Mercator grid (central longitude 75W) for scale =
1:500000 and suppress those points that would fall outside
the map area, run</p>
<p style="margin-left:11%; margin-top: 1em"><b>mapproject</b>
tracks.* <b>−R</b>-80/-70/20/40
<b>−Jt</b>-75/1:500000 <b>−: −S −Di
−bo −bi</b> 2 > tmfile.b</p>
<p style="margin-left:11%; margin-top: 1em">To convert the
geodetic coordinates (lon, lat, height) in the file old.dat
from the NAD27 CONUS datum (Datum ID 131 which uses the
Clarke-1866 ellipsoid) to WGS 84, run</p>
<p style="margin-left:11%; margin-top: 1em"><b>mapproject</b>
old.dat <b>−Th</b> 131 > new.dat</p>
<p style="margin-left:11%; margin-top: 1em">To compute the
closest distance (in km) between each point in the input
file quakes.dat and the line segments given in the
multi-segment ASCII file coastline.xy, run</p>
<p style="margin-left:11%; margin-top: 1em"><b>mapproject</b>
quakes.dat <b>−L</b> coastline.xy/k >
quake_dist.dat</p>
<h2>RESTRICTIONS
<a name="RESTRICTIONS"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">The rectangular
input region set with <b>−R</b> will in general be
mapped into a non-rectangular grid. Unless <b>−C</b>
is set, the leftmost point on this grid has xvalue = 0.0,
and the lowermost point will have yvalue = 0.0. Thus, before
you digitize a map, run the extreme map coordinates through
<b>mapproject</b> using the appropriate scale and see what
(x,y) values they are mapped onto. Use these values when
setting up for digitizing in order to have the inverse
transformation work correctly, or alternatively, use
<b>awk</b> to scale and shift the (x,y) values before
transforming. <br>
For some projections, a spherical solution may be used
despite the user having selected an ellipsoid. This occurs
when the users <b>−R</b> setting implies a region that
exceeds the domain in which the ellipsoidal series
expansions are valid. These are the conditions: (1) Lambert
Conformal Conic (<b>−JL</b>) and Albers Equal-Area
(<b>−JB</b>) will use the spherical solution when the
map scale exceeds 1.0E7. (2) Transverse Mercator
(<b>−JT</b>) and UTM (<b>−JU</b>) will will use
the spherical solution when either the west or east boundary
given in <b>−R</b> is more than 10 degrees from the
central meridian, and (3) same for Cassini
(<b>−JC</b>) but with a limit of only 4 degrees.</p>
<h2>ELLIPSOIDS AND SPHEROIDS
<a name="ELLIPSOIDS AND SPHEROIDS"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em"><b><A HREF="GMT.html">GMT</A></b> will
use ellipsoidal formulae if they are implemented and the
user have selected an ellipsoid as the reference shape (see
<b><A HREF="gmtdefaults.html#ELLIPSOID">ELLIPSOID</A></b> in <b><A HREF="gmtdefaults.html">gmtdefaults</A></b>). The user needs to
be aware of a few potential pitfalls: (1) For some
projections, such as Transverse Mercator, Albers, and
Lamberts conformal conic we use the ellipsoidal expressions
when the areas mapped are small, and switch to the spherical
expressions (and substituting the appropriate auxiliary
latitudes) for larger maps. The ellipsoidal formulae are
used as follows: (a) Transverse Mercator: When all points
are within 10 degrees of central meridian, (b) Conic
projections when longitudinal range is less than 90 degrees,
(c) Cassini projection when all points are within 4 degrees
of central meridian. (2) When you are trying to match some
historical data (e.g., coordinates obtained with a certain
projection and a certain reference ellipsoid) you may find
that <b><A HREF="GMT.html">GMT</A></b> gives results that are slightly different.
One likely source of this mismatch is that older
calculations often used less significant digits. For
instance, Snyder’s examples often use the Clarke 1866
ellipsoid (defined by him as having a flattening f =
1/294.98). From f we get the eccentricity squared to be
0.00676862818 (this is what <b><A HREF="GMT.html">GMT</A></b> uses), while Snyder
rounds off and uses 0.00676866. This difference can give
discrepancies of several tens of cm. If you need to
reproduce coordinates projected with this slightly different
eccentricity, you should specify your own ellipsoid with the
same parameters as Clarke 1866, but with f = 1/294.97861076.
Also, be aware that older data may be referenced to
different datums, and unless you know which datum was used
and convert all data to a common datum you may experience
mismatches of tens to hundreds of meters. (3) Finally, be
aware that <b><A HREF="gmtdefaults.html#MAP_SCALE_FACTOR">MAP_SCALE_FACTOR</A></b> have certain default
values for some projections so you may have to override the
setting in order to match results produced with other
settings.</p>
<h2>SEE ALSO
<a name="SEE ALSO"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em"><i><A HREF="gmtdefaults.html">gmtdefaults</A></i>(1),
<i><A HREF="GMT.html">GMT</A></i>(1), <i><A HREF="project.html">project</A></i>(1)</p>
<h2>REFERENCES
<a name="REFERENCES"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">Bomford, G.,
1952, Geodesy, Oxford U. Press. <br>
Snyder, J. P., 1987, Map Projections − A Working
Manual, U.S. Geological Survey Prof. Paper 1395. <br>
Vanicek, P. and Krakiwsky, E, 1982, Geodesy − The
Concepts, North-Holland Publ., ISBN: 0 444 86149 1.</p>
<hr>
</body>
</html>
|