-
Notifications
You must be signed in to change notification settings - Fork 228
DOC: Add gallery example for using EPSG codes #3973
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
yvonnefroehlich
wants to merge
24
commits into
main
Choose a base branch
from
add-gallery-epsg
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 22 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
b888b90
Add first version for gallery example epsg_codes
yvonnefroehlich c4bd999
Add docs and comments
yvonnefroehlich 9f0fccd
Remove execution permission
yvonnefroehlich 1ddb693
Add code block seperator
yvonnefroehlich 2737204
Shorten URL
yvonnefroehlich 11cef0a
Remove blank line
yvonnefroehlich dd72248
Use float data type
yvonnefroehlich 1a55f59
Mention EPSG codes in projection files
yvonnefroehlich 7696838
Set link in markdown
yvonnefroehlich 9fce5ca
Use correct URL
yvonnefroehlich a70141e
Improve formulation
yvonnefroehlich 1c89722
Move to projection gallery
yvonnefroehlich 55feaa7
Remove file
yvonnefroehlich b10bc32
Use no hypen
yvonnefroehlich bb571ff
Add blank line at the end
yvonnefroehlich c762997
Remove execution permission
yvonnefroehlich b4a7f05
Add subfolder to conf file
yvonnefroehlich 5a20339
Update links to projection gallery
yvonnefroehlich ea896b2
Color land
yvonnefroehlich af727f1
Update links to projection gallery
yvonnefroehlich 7d43c72
Shorten link
yvonnefroehlich 5f28e60
Add second url
yvonnefroehlich c337d10
Fix typo
yvonnefroehlich 1a889e9
Merge branch 'main' into add-gallery-epsg
yvonnefroehlich File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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,2 @@ | ||
EPSG codes | ||
---------- |
This file contains hidden or 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,23 @@ | ||
""" | ||
EPSG codes | ||
========== | ||
|
||
Besides one of the :doc:`31 projections supported by GMT </techref/projections>`, users | ||
can pass an EPSG (European Petroleum Survey Group) code to the ``projection`` parameter | ||
of the methods :meth:`Figure.basemap` and :meth:`Figure.coast`. A commonly used EPSG | ||
code is ``EPSG:3857``, that refers to the Web Mercator projection WGS84. More | ||
information on the EPSG dataset can be found at https://epsg.org and | ||
https://spatialreference.org/. | ||
""" | ||
|
||
# %% | ||
import pygmt | ||
|
||
fig = pygmt.Figure() | ||
|
||
# Pass the desired EPSG code and the width of the map, here 10 centimeters, to the | ||
# projection parameter | ||
fig.basemap(region=[-180, 180, -60, 60], projection="EPSG:3857/10c", frame=30) | ||
fig.coast(land="gray", shorelines="1/0.1p,gray10") | ||
|
||
fig.show() |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.