Skip to content

Commit

Permalink
Remove the old PROJ-style syntax (#1089)
Browse files Browse the repository at this point in the history
Co-authored-by: Mao Zhou <[email protected]>
  • Loading branch information
seisman and ZMAlt authored Jul 21, 2023
1 parent 13ebf7a commit 7f33e3f
Showing 1 changed file with 2 additions and 92 deletions.
94 changes: 2 additions & 92 deletions source/option/J.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@

**-J** 选项用于指定坐标变换方式或地图投影方式,即将数据投影到画布上所采用的函数。

**-J** 选项后接投影代码以及投影参数。GMT 目前支持三种不同的方式指定投影代码和投影方式
**-J** 选项后接投影代码以及投影参数。GMT 目前支持两种不同的方式指定投影代码和投影方式

- GMT 投影代码
- PROJ 投影代码
- GMT + PROJ 投影代码

GMT 投影代码
Expand Down Expand Up @@ -56,95 +55,6 @@ GMT 投影代码

.. include:: projection-codes.rst_

PROJ 投影代码
-------------

GMT 用单个字母指定投影方式,但英文字母只有 26 个,而投影方式却不止 26 个,因而,
从 GMT 4.3.0 开始,GMT 开始支持 PROJ 包的投影代码。
PROJ 包不是使用单个字符指定投影方式,而是通过一个单词指定。
比如墨卡托投影既可以用 **-Jm** 指定也可以用 **-Jmerc** 指定。

其语法为:

**-J**\ *abbrev*/[*parameters*/]\ *scale*

**-J**\ *Abbrev*/[*parameters*/]\ *width*

类似的,若投影代码的首字母为大写,则最后一个参数表示底图宽度;若投影代码为小写,
则最后一个参数表述底图比例尺。

.. table:: PROJ 投影代码
:align: center

+------------------------------------------------------------+-------------------------------------------------------+
| 代码 | 说明 |
+============================================================+=======================================================+
| **-Jaea/**\ |lon0|/|lat0|/|lat1|/|lat2|/\ *scale* | Albers conic equal area |
+------------------------------------------------------------+-------------------------------------------------------+
| **-Jaeqd/**\ |lon0|/|lat0|\ [/\ *horizon*]/\ *scale* | Azimuthal equidistant |
+------------------------------------------------------------+-------------------------------------------------------+
| **-Jcass/**\ |lon0|/|lat0|/\ *scale* | Cassini cylindrical |
+------------------------------------------------------------+-------------------------------------------------------+
| **-Jcea/**\ |lon0|/|lat0|/\ *scale* | Cylindrical equal area |
+------------------------------------------------------------+-------------------------------------------------------+
| **-Jcyl_stere/**\ [|lon0|\ [/|lat0|/]]\ *scale* | Cylindrical stereographic |
+------------------------------------------------------------+-------------------------------------------------------+
| **-Jeqc/**\ [|lon0|\ [/|lat0|/]]\ *scale* | Equidistant cylindrical |
+------------------------------------------------------------+-------------------------------------------------------+
| **-Jeqdc/**\ |lon0|/|lat0|/|lat1|/|lat2|/\ *scale* | Equidistant conic |
+------------------------------------------------------------+-------------------------------------------------------+
| **-Jgnom/**\ |lon0|/|lat0|\ [/\ *horizon*]/\ *scale* | Azimuthal gnomonic |
+------------------------------------------------------------+-------------------------------------------------------+
| **-Jhammer/**\ |lon0|/\ *scale* | Hammer equal area |
+------------------------------------------------------------+-------------------------------------------------------+
| **-Jeck4/**\ |lon0|/\ *scale* | Eckert IV equal area |
+------------------------------------------------------------+-------------------------------------------------------+
| **-Jeck6/**\ |lon0|/\ *scale* | Eckert VI equal area |
+------------------------------------------------------------+-------------------------------------------------------+
| **-Jlaea/**\ |lon0|/|lat0|\ [/\ *horizon*]/\ *scale* | Lambert azimuthal equal area |
+------------------------------------------------------------+-------------------------------------------------------+
| **-Jlcc/**\ |lon0|/|lat0|/|lat1|/|lat2|/\ *scale* | Lambert conic conformal |
+------------------------------------------------------------+-------------------------------------------------------+
| **-Jmerc/**\ [|lon0|\ [/|lat0|/]]\ *scale* | Mercator cylindrical |
+------------------------------------------------------------+-------------------------------------------------------+
| **-Jmill/**\ |lon0|/\ *scale* | Miller cylindrical |
+------------------------------------------------------------+-------------------------------------------------------+
| **-Jmoll/**\ [|lon0|/]\ *scale* | Mollweide |
+------------------------------------------------------------+-------------------------------------------------------+
| **-Jnsper/**\ |lon0|/|lat0|\ | |
| *alt/azim/tilt/twist/W/H/scale* | General perspective |
+------------------------------------------------------------+-------------------------------------------------------+
| **-Jomerc/**\ |lon0|/|lat0|\ *azim*/*scale* | Oblique Mercator, 1: origin and azimuth |
+------------------------------------------------------------+-------------------------------------------------------+
| **-Jomerc/**\ |lon0|/|lat0|/|lon1|/|lat1|/\ *scale* | Oblique Mercator, 2: two points |
+------------------------------------------------------------+-------------------------------------------------------+
| **-Jomercp/**\ :|lon0|/|lat0|/|lonp|/|latp|/\ *scale* | Oblique Mercator, 3: origin and pole |
+------------------------------------------------------------+-------------------------------------------------------+
| **-Jortho/**\ |lon0|/|lat0|\ [/\ *horizon*]/\ *scale* | Azimuthal orthographic |
+------------------------------------------------------------+-------------------------------------------------------+
| **-Jpolar/**\ [**a**]\ *scale*\ [/*origin*] | Polar [azimuthal] (:math:`\theta, r`) (or cylindrical)|
+------------------------------------------------------------+-------------------------------------------------------+
| **-Jpoly/**\ [|lon0|\ [/|lat0|/]]\ *scale* | (American) polyconic |
+------------------------------------------------------------+-------------------------------------------------------+
| **-Jrobin/**\ [|lon0|/]\ *scale* | Robinson |
+------------------------------------------------------------+-------------------------------------------------------+
| **-Jsinu/**\ |lat0|/\ *scale* | Sinusoidal equal area |
+------------------------------------------------------------+-------------------------------------------------------+
| **-Jstere/**\ |lon0|/|lat0|\ [/\ *horizon*]/\ *scale* | General stereographic |
+------------------------------------------------------------+-------------------------------------------------------+
| **-Jtmerc/**\ [|lon0|\ [/|lat0|/]]\ *scale* | Transverse Mercator |
+------------------------------------------------------------+-------------------------------------------------------+
| **-Jutm/**\ *zone*/*scale* | Universal Transverse Mercator (UTM) |
+------------------------------------------------------------+-------------------------------------------------------+
| **-Jvandg/**\ [|lon0|/]\ *scale* | Van der Grinten |
+------------------------------------------------------------+-------------------------------------------------------+
| **-Jwintri/**\ [|lon0|/]\ *scale* | Winkel Tripel |
+------------------------------------------------------------+-------------------------------------------------------+
| **-Jxy**\ *xscale*\ [**l**\|\ **p**\ *exp*\|\ | |
| **T**\|\ **t**][/\ *yscale*\ [**l**\|\ **p**\ | |
| *exp*\|\ **T**\|\ **t**]][**d**] | Linear, log\ :math:`_{10}`, :math:`x^a-y^b`, and time |
+------------------------------------------------------------+-------------------------------------------------------+

GMT + PROJ
----------

Expand Down Expand Up @@ -199,7 +109,7 @@ GMT + PROJ
纬度为 0 度,位于赤道上,其纵坐标也为 0。在上述 EPSG 代码查询中,同时可获得其 PROJ 投影
语法为 ``+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=29500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs``,
因此,将有下面的等价语句::

$ echo 87 0 | gmt mapproject -J"+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=29500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs"
29500000 0

Expand Down

0 comments on commit 7f33e3f

Please sign in to comment.