Uh oh!
There was an error while loading. Please reload this page.
DOC: Add gallery example for using EPSG codes - #3973
Conversation
yvonnefroehlich
commented
Jun 13, 2025
Recently building the Docs for windows started failing with: embedding documentation hyperlinks for projections... [ 97%] polar.html
embedding documentation hyperlinks for projections... [100%] sg_execution_times.html
build succeeded.
The HTML pages are in _build\html.
make: *** [Makefile:35: html] Error 2816
make: Leaving directory 'D:/a/pygmt/pygmt/doc'
Error: Process completed with exit code 2. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
seisman
commented
Jun 14, 2025
Yes, looking at the CI build history at https://github.com/GenericMappingTools/pygmt/actions/workflows/ci_docs.yml?query=branch%3Amain, it started to fail since #3932 |
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
seisman
commented
Jun 14, 2025
What about mentioning EPSG codes on the following two pages: https://pygmt-dev--3973.org.readthedocs.build/en/3973/projections/index.html and https://pygmt-dev--3973.org.readthedocs.build/en/3973/techref/projections.html |
yvonnefroehlich
commented
Jun 15, 2025
/format |
yvonnefroehlich
commented
Jun 15, 2025
/format |
yvonnefroehlich
commented
Jun 15, 2025
Now I moved the EPSG example to the end of the projection gallery, and mention using EPSG codes a the beginning of both projection files. |
yvonnefroehlich
commented
Jun 17, 2025
Agree, this should be clear to the users. No worries, we can move this PR to a later release. Probably we also have to update the upstream GMt docs first. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
seisman
commented
Jul 26, 2025
Above is the GMT function that deals with EPSG codes. As I understand it, it relies on GDAL to convert EPSG codes to a proj string, then GMT converts the proj string into a projection that GMT can support (e.g., In other words, do people use EPSG codes very often? Do we need to document this feature? |
yvonnefroehlich
commented
Aug 7, 2025
I personally never used EPSG codes until now. This is actually why I started working on this gallery example - to learn more about these codes 🙂. What is the experience of the others @GenericMappingTools/pygmt-maintainers? How widely EPSG codes are used? Hm. As only a subset of EPSG codes is actually supported, it can be a bit misleading (and disappointing) for users seeing the gallery example and then realizing that the code they need for their own work is not supported... |
I used EPSG codes heavily in business projects which focused on specific regions e.g. in Germany. This means EPSG codes can be very region-dependent and therefore they are partly only "valid" for a defined sub-region of a single country (e.g. see here for Germany and neighboring states). ![]() They are often used in standard GIS analysis on a regional scale by authorities and state departments. So we definitely should mention that PyGMT/GMT does not support all available EPSG codes, especially since we support map tiles which make it easy to visualize geographical content e.g. on small scales like cities etc. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
seisman
commented
Aug 9, 2025
@yvonnefroehlich I guess this PR is ready for review. |
yvonnefroehlich
commented
Aug 9, 2025
Thanks @michaelgrund for this information! |
yvonnefroehlich
commented
Aug 9, 2025
Yes 🙂. Converted it back to a normal gallery example. Currently the EPSG codes are not mentioned anymore on the projection table and Technical Reference page. |
Uh oh!
There was an error while loading. Please reload this page.

Description of proposed changes
This PR aims to add a gallery example showing the usage of EPSG codes with the
projectionparameter.At the moment the example is listed in the gallery under "Maps and map elements"; Edit "Projections".
Fixes#2004
Preview: https://pygmt-dev--3973.org.readthedocs.build/en/3973/gallery/maps/epsg_codes.html
Reminders
make formatandmake checkto make sure the code follows the style guide.doc/api/index.rst.Slash Commands
You can write slash commands (
/command) in the first line of a comment to performspecific operations. Supported slash command is:
/format: automatically format and lint the code