Skip to content

Commit 666ded2

Browse files
Add conic projections to the projection gallery (#721)
* Add equidistant conic projection * Add Lambert conic projection * Add polyconic.py Co-authored-by: Dongdong Tian <[email protected]>
1 parent 6146a0f commit 666ded2

File tree

3 files changed

+59
-0
lines changed

3 files changed

+59
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
"""
2+
Equidistant conic
3+
=================
4+
5+
``Dlon0/lat0/lat1/lat2/width``: Give projection center ``lon0/lat0``, two standard
6+
parallels ``lat1/lat2``, and the map width.
7+
"""
8+
import pygmt
9+
10+
fig = pygmt.Figure()
11+
fig.coast(
12+
shorelines="1/0.5p",
13+
region=[-88, -70, 18, 24],
14+
projection="D-79/21/19/23/12c",
15+
land="lightgreen",
16+
water="lightblue",
17+
frame="afg",
18+
)
19+
20+
fig.show()
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
"""
2+
Lambert Conic Conformal Projection
3+
==================================
4+
5+
``Llon0/lat0/lat1/lat2/width``: Give projection center ``lon0/lat0``, two standard
6+
parallels ``lat1/lat2``, and the map width.
7+
"""
8+
import pygmt
9+
10+
fig = pygmt.Figure()
11+
fig.coast(
12+
shorelines="1/0.5p",
13+
region=[-130, -70, 24, 52],
14+
projection="L-100/35/33/45/12c",
15+
land="gray",
16+
borders=["1/thick,black", "2/thin,black"],
17+
frame="afg",
18+
)
19+
20+
fig.show()
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
"""
2+
Polyconic Projection
3+
====================
4+
5+
``Poly/width``: The only additional argument for the projection is the map width.
6+
"""
7+
import pygmt
8+
9+
fig = pygmt.Figure()
10+
fig.coast(
11+
shorelines="1/0.5p",
12+
region=[-180, -20, 0, 90],
13+
projection="Poly/12c",
14+
land="gray",
15+
borders="1/thick,black",
16+
frame="afg10",
17+
)
18+
19+
fig.show()

0 commit comments

Comments
 (0)