https://github.com/chadagreene/plot_basemap
Plot a basemap image in Matlab
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (6.4%) to scientific vocabulary
Repository
Plot a basemap image in Matlab
Basic Info
- Host: GitHub
- Owner: chadagreene
- License: mit
- Language: MATLAB
- Default Branch: main
- Size: 839 KB
Statistics
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
plot_basemap
A simple function to plot a basemap image in MATLAB. Requires MATLAB's Mapping Toolbox.
This function uses the Mapping Toolbox function readBasemapImage to download a satellite or street map image, then reprojects the image a specified projection, using the extents of any current map that might be open.
Syntax
matlab
plot_basemap(authority,code)
plot_basemap(authority,code,'basemap',basemap)
[h,Im,x,y,attrib] = plot_basemap(...)
Description
plot_basemap(authority,code) fills the current extents of a map with a satellite image basemap. The current map must already be open and in the projection defined by authority,code. The authority can be 'EPSG' or 'ESRI' and the code is numeric.
plot_basemap(authority,code,basemap) specifies the type of basemap called by readBasemapImage. Default is "satellite", and can be changed to "streets", "streets-light", or "streets-dark".
[h,Im,x,y,attrib] = plot_basemap(...) returns the handle h of the plotted image, and image data Im, its coordinates, and attrib given by readBasemapImage.
But why?
I frequently work in projections that are not directly supported by MATLAB's readBasemapImage function. To work in polar stereographic, for example, we need to transform the native output of readBasemapImage into EPSG:3413, and this function does all the work.
Example
In the example below, we open a new figure, set the axis limits in north polar stereographic meters, then plot a basemap.
```matlab % Open a figure: figure
% Set map axis limits around Jakobshavn Glacier: axis([-196980 -171290 -2285131 -2256724])
% Download and plot a basemap:
plot_basemap('EPSG',3413)
```

Author Info
Chad Greene of NASA/Jet Propulsion Laboratory, July 2024.
Owner
- Name: Chad A. Greene
- Login: chadagreene
- Kind: user
- Location: Tucson, AZ
- Company: NASA: Jet Propulsion Laboratory
- Website: http://www.chadagreene.com
- Twitter: chadagreene
- Repositories: 23
- Profile: https://github.com/chadagreene
NASA/JPL researcher using data collected from satellites and airplanes to understand glacier sensitivity to climate change.
GitHub Events
Total
- Watch event: 2
- Push event: 3
- Fork event: 1
Last Year
- Watch event: 2
- Push event: 3
- Fork event: 1
Committers
Last synced: over 1 year ago
Top Committers
| Name | Commits | |
|---|---|---|
| Chad A. Greene | c****d@c****m | 4 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: over 1 year ago
All Time
- Total issues: 0
- Total pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 0
- Total pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0