forked from GenericMappingTools/pygmt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add examples for the oblique mercator projection (GenericMappingTools…
…#1251) Co-authored-by: Will Schlitzer <[email protected]> Co-authored-by: Michael Grund <[email protected]> Co-authored-by: Dongdong Tian <[email protected]>
- Loading branch information
1 parent
b3e8b1a
commit 6455f0c
Showing
4 changed files
with
98 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
""" | ||
Oblique Mercator | ||
================ | ||
Oblique configurations of the cylinder give rise to the oblique Mercator | ||
projection. It is particularly useful when mapping regions of large lateral | ||
extent in an oblique direction. Both parallels and meridians are complex | ||
curves. The projection was developed in the early 1900s by several workers. | ||
**oa**\|\ **oA**\ *lon0/lat0/azimuth/scale*\[**+v**] or | ||
**Oa**\|\ **OA**\ *lon0/lat0/azimuth/width*\[**+v**] | ||
The projection is set with **o** or **O**. The pole is set in the | ||
northern hemisphere with **a** or the southern hemisphere | ||
with **A**. The central meridian is set by *lon0/lat0*. The oblique equator | ||
is set by *azimuth*. Align the y-axis | ||
with the optional **+v**. The figure size is set with *scale* or *width*. | ||
""" | ||
import pygmt | ||
|
||
fig = pygmt.Figure() | ||
# Using the origin and azimuth | ||
fig.coast( | ||
projection="Oa-120/25/-30/6c+v", | ||
# Set bottom left and top right coordinates of the figure with "+r" | ||
region="-122/35/-107/22+r", | ||
frame="afg", | ||
land="gray", | ||
shorelines="1/thin", | ||
water="lightblue", | ||
) | ||
fig.show() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
""" | ||
Oblique Mercator | ||
================ | ||
Oblique configurations of the cylinder give rise to the oblique Mercator | ||
projection. It is particularly useful when mapping regions of large lateral | ||
extent in an oblique direction. Both parallels and meridians are complex | ||
curves. The projection was developed in the early 1900s by several workers. | ||
**ob**\|\ **oB**\ *lon0/lat0/lon1/lat1/scale*\ [**+v**] or | ||
**Ob**\|\ **OB**\ *lon0/lat0/lon1/lat1/width*\ [**+v**] | ||
The projection is set with **o** or **O**. The pole is set in the | ||
northern hemisphere with **b** or the southern hemisphere | ||
with **B**. The central meridian is set by *lon0/lat0*. The oblique | ||
equator is set by *lon1/lat1*. Align the y-axis | ||
with the optional **+v**. The figure size is set with *scale* or *width*. | ||
""" | ||
import pygmt | ||
|
||
fig = pygmt.Figure() | ||
# Using the origin and two points | ||
fig.coast( | ||
projection="Ob130/35/25/35/6c", | ||
# Set bottom left and top right coordinates of the figure with "+r" | ||
region="130/35/145/40+r", | ||
frame="afg", | ||
land="gray", | ||
shorelines="1/thin", | ||
water="lightblue", | ||
) | ||
fig.show() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
""" | ||
Oblique Mercator | ||
================ | ||
Oblique configurations of the cylinder give rise to the oblique Mercator | ||
projection. It is particularly useful when mapping regions of large lateral | ||
extent in an oblique direction. Both parallels and meridians are complex | ||
curves. The projection was developed in the early 1900s by several workers. | ||
**oc**\|\ **oC**\ *lon0/lat0/lonp/latp/scale*\ [**+v**] or | ||
**Oc**\|\ **OC**\ *lon0/lat0/lonp/latp/width*\ [**+v**] | ||
The projection is set with **o** or **O**. The central meridian is set | ||
by *lon0/lat0*. The projection pole is set by *lonp/latp* in option three. | ||
Align the y-axis with the optional **+v**. The figure size is set | ||
with *scale* or *width*. | ||
""" | ||
import pygmt | ||
|
||
fig = pygmt.Figure() | ||
# Using the origin projection pole | ||
fig.coast( | ||
projection="Oc280/25.5/22/69/12c", | ||
# Set bottom left and top right coordinates of the figure with "+r" | ||
region="270/20/305/25+r", | ||
frame="afg", | ||
land="gray", | ||
shorelines="1/thin", | ||
water="lightblue", | ||
) | ||
fig.show() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters