Skip to content

Commit

Permalink
Merge branch 'main' into datatypes/gmtimage
Browse files Browse the repository at this point in the history
  • Loading branch information
seisman committed Sep 28, 2024
2 parents d49afed + cf48764 commit f70bec0
Show file tree
Hide file tree
Showing 42 changed files with 220 additions and 250 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/ci_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,23 @@ jobs:
include:
- python-version: '3.10'
numpy-version: '1.24'
pandas-version: '=1.5'
xarray-version: '=2022.09'
pandas-version: '=2.0'
xarray-version: '=2023.04'
optional-packages: ''
- python-version: '3.12'
numpy-version: '2.1'
pandas-version: ''
xarray-version: ''
optional-packages: ' contextily geopandas ipython pyarrow rioxarray sphinx-gallery'
# The job below is for testing geopandas v0.x on Ubuntu.
# The python-version here can't be the versions in the matrix.python-version
# defined above. Otherwise, other jobs will be overridden by this one.
- os: 'ubuntu-latest'
python-version: '3.11' # Can't be 3.10 or 3.12.
numpy-version: '1.24'
pandas-version: ''
xarray-version: ''
optional-packages: ' geopandas<1'

timeout-minutes: 30
defaults:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci_tests_legacy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ jobs:
create-args: >-
python=3.10
gmt=${{ matrix.gmt_version }}
ghostscript<10
numpy
pandas<2
xarray
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ jobs:
ls -lh dist/
- name: Publish to Test PyPI
uses: pypa/[email protected].1
uses: pypa/[email protected].2
with:
repository-url: https://test.pypi.org/legacy/

- name: Publish to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/[email protected].1
uses: pypa/[email protected].2
51 changes: 0 additions & 51 deletions doc/_static/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -48,38 +48,6 @@ p {
font-size: 4em;
}

.api-module {
margin-bottom: 80px;
}

.youtube-embed {
max-width: 600px;
margin-bottom: 24px;
}

.video-container {
position:relative;
padding-bottom:56.25%;
padding-top:30px;
height:0;
overflow:hidden;
}

.video-container iframe, .video-container object, .video-container embed {
position:absolute;
top:0;
left:0;
width:100%;
height:100%;
}

/*.wy-menu-vertical header, .wy-menu-vertical p.caption {*/
/*font-size: 90%;*/
/*font-weight: bold;*/
/*color: #eeeeee;*/
/*letter-spacing: 0.12em;*/
/*}*/

.wy-nav-content {
max-width: 1000px;
}
Expand Down Expand Up @@ -137,22 +105,6 @@ html.writer-html5 .rst-content dl.field-list {
}
}

/* Style for the copy button */
/* Safe to remove for sphinx-copybutton>0.3.1
* https://github.com/executablebooks/sphinx-copybutton/pull/107
*/
a.copybtn {
position: absolute;
top: .2em;
right: .2em;
width: 1.3em;
height: 1.3em;
opacity: .3;
transition: opacity 0.5s;
border: none;
user-select: none;
}

/* Atkinson Hyperlegible regular */
@font-face {
font-family: "Atkinson Hyperlegible";
Expand Down Expand Up @@ -189,9 +141,6 @@ a.copybtn {
.sphx-glr-thumbcontainer {
border: solid #d6d6d6 1px!important;
text-align: center!important;
}

.sphx-glr-thumbcontainer {
min-height: 240px!important;
min-width: 180px!important;
}
Expand Down
1 change: 1 addition & 0 deletions doc/changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@

### Enhancements

* **Breaking**: (Unneeded) extra double quotes around text strings (containing whitespaces) are now considered as part of the text string ([#3132](https://github.com/GenericMappingTools/pygmt/pull/3132), [#3457](https://github.com/GenericMappingTools/pygmt/issues/3457))
* pygmt.project: Add 'output_type' parameter for output in pandas/numpy/file formats ([#3110](https://github.com/GenericMappingTools/pygmt/pull/3110))
* pygmt.grdtrack: Add 'output_type' parameter for output in pandas/numpy/file formats ([#3106](https://github.com/GenericMappingTools/pygmt/pull/3106))
* pygmt.blockm*: Add 'output_type' parameter for output in pandas/numpy/file formats ([#3103](https://github.com/GenericMappingTools/pygmt/pull/3103))
Expand Down
62 changes: 31 additions & 31 deletions doc/techref/projections.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,34 +16,34 @@ The table below shows the projection codes for the 31 GMT map projections:

| PyGMT Projection Argument | Projection Name |
| --- | --- |
| **A**{{ lon0 }}/{{ lat0 }}[/*horizon*]/*width* | {doc}`Lambert azimuthal equal area </projections/azim/azim_lambert>` |
| **B**{{ lon0 }}/{{ lat0 }}/{{ lat1 }}/{{ lat2 }}/*width* | {doc}`Albers conic equal area </projections/conic/conic_albers>` |
| **C**{{ lon0 }}/{{ lat0 }}/*width* | {doc}`Cassini cylindrical </projections/cyl/cyl_cassini>` |
| **Cyl_stere**/[{{ lon0 }}/[{{ lat0 }}/]]*width* | {doc}`Cylindrical stereographic </projections/cyl/cyl_stereographic>` |
| **D**{{ lon0 }}/{{ lat0 }}/{{ lat1 }}/{{ lat2 }}/*width* | {doc}`Equidistant conic </projections/conic/conic_equidistant>` |
| **E**{{ lon0 }}/{{ lat0 }}[/*horizon*]/*width* | {doc}`Azimuthal equidistant </projections/azim/azim_equidistant>` |
| **F**{{ lon0 }}/{{ lat0 }}[/*horizon*]/*width* | {doc}`Azimuthal gnomonic </projections/azim/azim_gnomonic>` |
| **G**{{ lon0 }}/{{ lat0 }}[/*horizon*]/*width* | {doc}`Azimuthal orthographic </projections/azim/azim_orthographic>` |
| **G**{{ lon0 }}/{{ lat0 }}/*width*[**+a***azimuth*][**+t***tilt*][**+v***vwidth*/*vheight*][**+w***twist*][**+z***altitude*] | {doc}`General perspective </projections/azim/azim_general_perspective>` |
| **H**[{{ lon0 }}/]*width* | {doc}`Hammer equal area </projections/misc/misc_hammer>` |
| **I**[{{ lon0 }}/]*width* | {doc}`Sinusoidal equal area </projections/misc/misc_sinusoidal>` |
| **J**[{{ lon0 }}/]*width* | {doc}`Miller cylindrical </projections/cyl/cyl_miller>` |
| **Kf**[{{ lon0 }}/]*width* | {doc}`Eckert IV equal area </projections/misc/misc_eckertIV>` |
| **Ks**[{{ lon0 }}/]*width* | {doc}`Eckert VI equal area </projections/misc/misc_eckertVI>` |
| **L**{{ lon0 }}/{{ lat0 }}/{{ lat1 }}/{{ lat2 }}/*width* | {doc}`Lambert conic conformal </projections/conic/conic_lambert>` |
| **M**[{{ lon0 }}/[{{ lat0 }}/]]*width* | {doc}`Mercator cylindrical </projections/cyl/cyl_mercator>` |
| **N**[{{ lon0 }}/]*width* | {doc}`Robinson </projections/misc/misc_robinson>` |
| **Oa**{{ lon0 }}/{{ lat0 }}/*azimuth*/*width*[**+v**] | {doc}`Oblique Mercator, 1: origin and azimuth </projections/cyl/cyl_oblique_mercator_1>` |
| **Ob**{{ lon0 }}/{{ lat0 }}/{{ lon1 }}/{{ lat1 }}/*width*[**+v**] | {doc}`Oblique Mercator, 2: two points </projections/cyl/cyl_oblique_mercator_2>` |
| **Oc**{{ lon0 }}/{{ lat0 }}/{{ lonp }}/{{ latp }}/*width*[**+v**] | {doc}`Oblique Mercator, 3: origin and pole </projections/cyl/cyl_oblique_mercator_3>` |
| **P***width*[**+a**][**+f**[**e**\|**p**\|*radius*]][**+r***offset*][**+t***origin*][**+z**[**p**\|*radius*]] | {doc}`Polar </projections/nongeo/polar>` [azimuthal] ({math}`\theta, r`) (or cylindrical) |
| **Poly**/[{{ lon0 }}/[{{ lat0 }}/]]*width* | {doc}`Polyconic </projections/conic/polyconic>` |
| **Q**[{{ lon0 }}/[{{ lat0 }}/]]*width* | {doc}`Equidistant cylindrica </projections/cyl/cyl_equidistant>` |
| **R**[{{ lon0 }}/]*width* | {doc}`Winkel Tripel </projections/misc/misc_winkel_tripel>` |
| **S**{{ lon0 }}/{{ lat0 }}[/*horizon*]/*width* | {doc}`General stereographic </projections/azim/azim_general_stereographic>` |
| **T**{{ lon0 }}[/{{ lat0 }}]/*width* | {doc}`Transverse Mercator </projections/cyl/cyl_transverse_mercator>` |
| **U***zone*/*width* | {doc}`Universal Transverse Mercator (UTM) </projections/cyl/cyl_universal_transverse_mercator>` |
| **V**[{{ lon0 }}/]*width* | {doc}`Van der Grinten </projections/misc/misc_van_der_grinten>` |
| **W**[{{ lon0 }}/]*width* | {doc}`Mollweide </projections/misc/misc_mollweide>` |
| **X***width*[**l**\|**p***exp*\|**T**\|**t**][/*height*[**l**\|**p***exp*\|**T**\|**t**]][**d**] | {doc}`Linear </projections/nongeo/cartesian_linear>`, {doc}`logarithmic </projections/nongeo/cartesian_logarithmic>`, {doc}`power </projections/nongeo/cartesian_power>`, and time |
| **Y**{{ lon0 }}/{{ lat0 }}/*width* | {doc}`Cylindrical equal area </projections/cyl/cyl_equal_area>` |
| **A**{{ lon0 }}/{{ lat0 }}[/*horizon*]/*width* | {doc}`/projections/azim/azim_lambert` |
| **B**{{ lon0 }}/{{ lat0 }}/{{ lat1 }}/{{ lat2 }}/*width* | {doc}`/projections/conic/conic_albers` |
| **C**{{ lon0 }}/{{ lat0 }}/*width* | {doc}`/projections/cyl/cyl_cassini` |
| **Cyl_stere**/[{{ lon0 }}/[{{ lat0 }}/]]*width* | {doc}`/projections/cyl/cyl_stereographic` |
| **D**{{ lon0 }}/{{ lat0 }}/{{ lat1 }}/{{ lat2 }}/*width* | {doc}`/projections/conic/conic_equidistant` |
| **E**{{ lon0 }}/{{ lat0 }}[/*horizon*]/*width* | {doc}`/projections/azim/azim_equidistant` |
| **F**{{ lon0 }}/{{ lat0 }}[/*horizon*]/*width* | {doc}`/projections/azim/azim_gnomonic` |
| **G**{{ lon0 }}/{{ lat0 }}[/*horizon*]/*width* | {doc}`/projections/azim/azim_orthographic` |
| **G**{{ lon0 }}/{{ lat0 }}/*width*[**+a***azimuth*][**+t***tilt*][**+v***vwidth*/*vheight*][**+w***twist*][**+z***altitude*] | {doc}`/projections/azim/azim_general_perspective` |
| **H**[{{ lon0 }}/]*width* | {doc}`/projections/misc/misc_hammer` |
| **I**[{{ lon0 }}/]*width* | {doc}`/projections/misc/misc_sinusoidal` |
| **J**[{{ lon0 }}/]*width* | {doc}`/projections/cyl/cyl_miller` |
| **Kf**[{{ lon0 }}/]*width* | {doc}`/projections/misc/misc_eckertIV` |
| **Ks**[{{ lon0 }}/]*width* | {doc}`/projections/misc/misc_eckertVI` |
| **L**{{ lon0 }}/{{ lat0 }}/{{ lat1 }}/{{ lat2 }}/*width* | {doc}`/projections/conic/conic_lambert` |
| **M**[{{ lon0 }}/[{{ lat0 }}/]]*width* | {doc}`/projections/cyl/cyl_mercator` |
| **N**[{{ lon0 }}/]*width* | {doc}`/projections/misc/misc_robinson` |
| **Oa**{{ lon0 }}/{{ lat0 }}/*azimuth*/*width*[**+v**] | Oblique Mercator projection: {doc}`1. origin and azimuth </projections/cyl/cyl_oblique_mercator>` |
| **Ob**{{ lon0 }}/{{ lat0 }}/{{ lon1 }}/{{ lat1 }}/*width*[**+v**] | Oblique Mercator projection: {doc}`2. two points </projections/cyl/cyl_oblique_mercator>` |
| **Oc**{{ lon0 }}/{{ lat0 }}/{{ lonp }}/{{ latp }}/*width*[**+v**] | Oblique Mercator projection: {doc}`3. origin and projection pole </projections/cyl/cyl_oblique_mercator>` |
| **P***width*[**+a**][**+f**[**e**\|**p**\|*radius*]][**+r***offset*][**+t***origin*][**+z**[**p**\|*radius*]] | Polar {doc}`azimuthal </projections/nongeo/polar>` ({math}`\theta, r`) or cylindrical |
| **Poly**/[{{ lon0 }}/[{{ lat0 }}/]]*width* | {doc}`/projections/conic/polyconic` |
| **Q**[{{ lon0 }}/[{{ lat0 }}/]]*width* | {doc}`/projections/cyl/cyl_equidistant` |
| **R**[{{ lon0 }}/]*width* | {doc}`/projections/misc/misc_winkel_tripel` |
| **S**{{ lon0 }}/{{ lat0 }}[/*horizon*]/*width* | {doc}`/projections/azim/azim_general_stereographic` |
| **T**{{ lon0 }}[/{{ lat0 }}]/*width* | {doc}`/projections/cyl/cyl_transverse_mercator` |
| **U***zone*/*width* | {doc}`/projections/cyl/cyl_universal_transverse_mercator` |
| **V**[{{ lon0 }}/]*width* | {doc}`/projections/misc/misc_van_der_grinten` |
| **W**[{{ lon0 }}/]*width* | {doc}`/projections/misc/misc_mollweide` |
| **X***width*[**l**\|**p***exp*\|**T**\|**t**][/*height*[**l**\|**p***exp*\|**T**\|**t**]][**d**] | Cartesian {doc}`linear </projections/nongeo/cartesian_linear>`, {doc}`logarithmic </projections/nongeo/cartesian_logarithmic>`, {doc}`power </projections/nongeo/cartesian_power>`, and time |
| **Y**{{ lon0 }}/{{ lat0 }}/*width* | {doc}`/projections/cyl/cyl_equal_area` |
4 changes: 2 additions & 2 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ dependencies:
- gmt=6.5.0
- ghostscript=10.04.0
- numpy>=1.24
- pandas>=1.5
- xarray>=2022.09
- pandas>=2.0
- xarray>=2023.04
- netCDF4
- packaging
# Optional dependencies
Expand Down
4 changes: 2 additions & 2 deletions examples/projections/azim/azim_equidistant.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
r"""
Azimuthal Equidistant
=====================
Azimuthal equidistant projection
================================
The main advantage of this projection is that distances from the projection
center are displayed in correct proportions. Also directions measured from the
Expand Down
6 changes: 3 additions & 3 deletions examples/projections/azim/azim_general_perspective.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
r"""
General Perspective
===================
Perspective projection
======================
The general perspective projection imitates the view of the Earth from a finite
The perspective projection imitates the view of the Earth from a finite
point in space. In a full view of the earth one third of its surface area can
be seen.
Expand Down
4 changes: 2 additions & 2 deletions examples/projections/azim/azim_general_stereographic.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
r"""
General Stereographic
=====================
General stereographic projection
================================
This map projection is a conformal, azimuthal projection. It is mainly used
with a projection center in one of the poles. Then meridians appear as straight
Expand Down
4 changes: 2 additions & 2 deletions examples/projections/azim/azim_gnomonic.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
r"""
Gnomonic
========
Gnomonic projection
===================
The point of perspective of the gnomonic projection lies at the center of the
Earth. As a consequence great circles (orthodromes) on the surface of the Earth
Expand Down
4 changes: 2 additions & 2 deletions examples/projections/azim/azim_lambert.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
r"""
Lambert Azimuthal Equal Area
============================
Lambert azimuthal equal-area projection
=======================================
This projection was developed by Johann Heinrich Lambert in 1772 and is
typically used for mapping large regions like continents and hemispheres. It is
Expand Down
4 changes: 2 additions & 2 deletions examples/projections/azim/azim_orthographic.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
r"""
Orthographic
============
Orthographic projection
=======================
This is a perspective projection like the general perspective, but with the
difference that the point of perspective lies in infinite distance.
Expand Down
4 changes: 2 additions & 2 deletions examples/projections/conic/conic_albers.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
r"""
Albers Conic Equal Area
=======================
Albers conic equal-area projection
==================================
This projection, developed by Heinrich C. Albers in 1805, is predominantly used
to map regions of large east-west extent, in particular the United States. It
Expand Down
4 changes: 2 additions & 2 deletions examples/projections/conic/conic_equidistant.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
r"""
Equidistant conic
=================
Equidistant conic projection
============================
The equidistant conic projection was described by the Greek philosopher
Claudius Ptolemy about A.D. 150. It is neither conformal or equal-area, but
Expand Down
2 changes: 1 addition & 1 deletion examples/projections/conic/conic_lambert.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
r"""
Lambert Conic Conformal Projection
Lambert conic conformal projection
==================================
This conic projection was designed by the Alsatian mathematician Johann
Expand Down
2 changes: 1 addition & 1 deletion examples/projections/conic/polyconic.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
r"""
Polyconic Projection
Polyconic projection
====================
The polyconic projection, in Europe usually referred to as the American
Expand Down
4 changes: 2 additions & 2 deletions examples/projections/cyl/cyl_cassini.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
r"""
Cassini Cylindrical
============================
Cassini cylindrical projection
==============================
This cylindrical projection was developed in 1745 by César-François Cassini de
Thury for the survey of France. It is occasionally called Cassini-Soldner since
Expand Down
4 changes: 2 additions & 2 deletions examples/projections/cyl/cyl_equal_area.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
r"""
Cylindrical equal-area
======================
Cylindrical equal-area projection
=================================
This cylindrical projection is actually several projections, depending on what
latitude is selected as the standard parallel. However, they are all equal area
Expand Down
4 changes: 2 additions & 2 deletions examples/projections/cyl/cyl_equidistant.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
r"""
Cylindrical equidistant
=======================
Cylindrical equidistant projection
==================================
This simple cylindrical projection is really a linear scaling of longitudes and
latitudes. The most common form is the Plate Carrée projection, where the
Expand Down
4 changes: 2 additions & 2 deletions examples/projections/cyl/cyl_mercator.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
r"""
Mercator
========
Mercator projection
===================
The Mercator projection takes its name from the Flemish cartographer Gheert
Cremer, better known as Gerardus Mercator, who presented it in 1569. The
Expand Down
4 changes: 2 additions & 2 deletions examples/projections/cyl/cyl_miller.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
r"""
Miller cylindrical
==================
Miller cylindrical projection
=============================
This cylindrical projection, presented by Osborn Maitland Miller of the
American Geographic Society in 1942, is neither equal nor conformal. All
Expand Down
Loading

0 comments on commit f70bec0

Please sign in to comment.