GMT -J オプション †
はじめに †共通オプション -J は projection を指し,描画をするコマンドには必須のオプション. projection指定子の大文字・小文字の違い †J に続く英字で描く図法が決まるが,その英字が大文字か小文字かで,スケールの決定方法が異なる.
ここで,<width> は出力する図の幅,<scale> は比,</degree> は1度あたりの幅を示す. #!/bin/bash # output file output="JM.ps" # options proj=M16 region=125/150/25/50 axes="-Ba5f5g5 -B+t-JM<wid>,-R125/50/25/50" # GMT5 gmt pscoast -J$proj -R$region $axes -W -P -V > $output # output file output="Jmratio.ps" # options proj=m1:2.5e7 region=125/150/25/50 axes="-Ba5f5g5 -B+t-Jm1:2.5e7,-R125/150/25/50" # GMT5 gmt pscoast -J$proj -R$region $axes -W -P > $output # output file output="Jmperdeg.ps" # options proj=m0.5 region=125/150/25/50 axes="-Ba5f5g5 -B+t-Jm0.5,-R125/150/25/50" # GMT5 gmt pscoast -J$proj -R$region $axes -W -P > $output projection, 各図法の記述例 †以降では,projection ごとに pscoast または psbasemap を用いてそれぞれ描いてみる. -JM, Mercator, メルカトル図法 †見慣れたメルカトル図法.記法は下記の通り.
# output file output="JM.ps" # options proj=M16 region=125/150/25/50 axes="-Ba5f5g5 -B+t-JM<wid>,-R125/50/25/50" # GMT5 gmt pscoast -J$proj -R$region $axes -W -P -V > $output -JB, Albers conic equal area projection †Conic projection の一つ.
ここで,<lat1>,<lat2> は Alberts projection の two standard pallalels に相当する. # output file output="JB.ps" # options proj=B135/35/30/45/16 region=120/150/25/50 axes="-Ba5f5g5 -B+t-JB135/35/30/45/<wid>,-R120/150/25/50" # GMT5 gmt pscoast -J$proj -R$region $axes -W -P -V > $output -JU, UTM, ユニバーサル横メルカトル図法 †数値計算でよく UTM 座標を用いるため.計算結果に対して -JU で描くと変な隙間が出にくい.
ここで,<zone> は UTM のゾーン(1〜60の整数). # output file output="JU.ps" # options proj=U53/16 region=125/150/25/50 axes="-Ba5f5g5 -B+t-JU53/<wid>,-R125/150/25/50" # GMT5 gmt pscoast -J$proj -R$region $axes -W -P -V > $output -JC, Cylindrical projection, 円筒図法 †UTM に似ている.UTM でいう zone の基準点がないので,<lon0>,<lat0> で指定する.
# output file output="JC.ps" # options proj=C135/35/16 region=125/150/25/50 axes="-Ba5f5g5 -B+t-JC135/35/<wid>,-R125/150/25/50" # GMT5 gmt pscoast -J$proj -R$region $axes -W -P -V > $output -JA, Lambert Azimuthal projection, ランベルト正積方位図法 †ランベルト図法.図の特性上,描ける最大範囲は半球.
Rgは<lon0>,<lat0> を中心とする半球を描く. # output file output="JARg.ps" # options proj=A135/35/16 region=g axes="-Ba15f15g15 -B+t-JA135/35/<wid>,-Rg" # GMT5 gmt pscoast -J$proj -R$region $axes -W -P -V > $output # output file output="JARr.ps" # options proj=A120/30/16 region=90/5/180/65r axes="-Ba15f15g15 -B+t-JA120/30/<wid>,-R90/5/180/65r" # GMT5 gmt pscoast -J$proj -R$region $axes -W -P -V > $output -JG, Azimuthal orthographic projection, 正射図法 †地球表面を正射影して描かれる地図.オプションの表記方法は -JA に近い.
さらに詳細な指定もできるが,ここでは省略. # output file output="JG.ps" # options proj=G135/35/16 region=g axes="-Bf30g30 -B+t-JG135/35/<wid>,-Rg" # GMT5 gmt pscoast -J$proj -R$region $axes -W -P -V > $output -JX, Non-geographical projection (linear) †地図でない X-Y 座標には -JX を使う.
JX<width> の場合は,<height> は <width> と同じ値. # output file output="JXw.ps" # options proj=X16 region=0/100/0/50 axes="-Bxa20g20 -By10g10 -BSWne+t-JX<wid>,-R0/100/0/50" # GMT5 gmt psbasemap -J$proj -R$region $axes -P -V > $output # output file output="JXwh.ps" # options proj=X16/8 region=0/100/0/50 axes="-Bxa20g20 -By10g10 -BSWne+t-JX<wid>/<hei>,-R0/100/0/50" # GMT5 gmt psbasemap -J$proj -R$region $axes -P -V > $output -JXl, Non-geographical projection (log-log, semilog), 両対数,片対数図 †対数軸にしたい場合は,横軸なら <width> の後に,縦軸なら <height> の後にlを付す.
ここでは B オプションに記述する数値の意味が他と異なる点に注意. # output file output="JXl.ps" # options proj=X16l/8 egion=1e0/1e5/0/50 axes="-Bxa1pg3p -By10g10 -BSWne+t-JX<wid>l/<hei>,-R1e0/1e5/0/50" # GMT5 gmt psbasemap -J$proj -R$region $axes -P -V > $output -JX,-JZ, Non-geographical projection (3-dimensional) †3D図は,-JX と -JZ で2回 J オプションを使う.
ここで,<length> は水平平面で <width> と垂直な方向の長さ. # output file output="JXJZ.ps" # options proj=X10 projZ=Z10 pers=-120/25 region=0/10/0/10/0/10 axes="-Bxa2g2 -Bya2g2 -Bza2f2 -BSWZ+b+t-JX<wid>,-JZ<hei>,-R0/10/0/10/0/10" # GMT5 gmt psbasemap -J$proj -J$projZ -R$region $axes -p$pers -P -V > $output -JX, -Rd or -Rg, 地球全体図 †メルカトル図法 -JM では,R オプションで極の -90,90 を含めることはできず,エラーになる.
経度方向の中心は,Rd で本初子午線,Rg で日付変更線になる. # output file output="JXRd.ps" # options proj=X16/8 region=d axes="-Bxa60f60g60 -Bya30f30g30 -B+t-JX<wid>/<hei>,-Rd" # GMT5 gmt pscoast -J$proj -R$region $axes -W -P -V > $output # output file output="JXRg.ps" # options proj=X16/8 region=g-45/315/-90/90 axes="-Bxa60f60g60 -Bya30f30g30 -B+t-JX<wid>/<hei>,-Rg-45/315/-90/90" # GMT5 gmt pscoast -J$proj -R$region $axes -W -P -V > $output -JKf, -JKs, Eckert projection, エケルト図法 †地球全体図を描くのに向いていると思われる図法.
lon0 は経度方向の中心である.緯度の annotations を入れる場合は,緯度 -90 と 90 のラベルが埋もれるので,表示されないように範囲を調整する. # output file output="JKf.ps" # options proj=Kf180/16 region=d0/360/-89/89 axes="-Bxa60f60g60 -Ba30f30g30 -B+t-JKf180/<wid>,-Rd0/360/-89/89" # GMT5 gmt pscoast -J$proj -R$region $axes -W -P -V > $output # output file output="JKs.ps" # options proj=Ks180/16 region=d0/360/-89/89 axes="-Bxa60f60g60 -Bya30f30g30 -B+t-JKs180/<wid>,-Rd0/360/-89/89" # GMT5 gmt pscoast -J$proj -R$region $axes -W -P -V > $output |