File Exchange

image thumbnail

plot_openstreetmap

version 0.1 (419 KB) by Alex Voronov
MATLAB function for plotting maps from OpenStreetMap and OpenSeaMap on the background of a figure

27 Downloads

Updated 11 May 2020

From GitHub

View license on GitHub

MATLAB function for plotting maps from OpenStreetMap and OpenSeaMap on the background of a figure.

Example:
Plotting several points on a map in Gothenburg archipelago and adding base map from OpenStreetMap (water and land) and overlaying with sea markings from OpenSeaMap.

x = [11.6639 11.7078 11.7754 11.8063 11.8797];
y = [57.6078 57.6473 57.6607 57.6804 57.6886];
figure; plot(x, y, 'o-', 'LineWidth', 2);
hBase = plot_openstreetmap('Alpha', 0.4, 'Scale', 2); % Basemap.
hSea = plot_openstreetmap('Alpha', 0.5, 'Scale', 2, 'BaseUrl', "http://tiles.openseamap.org/seamark"); % Sea marks.

Cite As

Alexey Voronov (2019). plot_openstreetmap (https://www.github.com/alexvoronov/plot_openstreetmap), GitHub. Retrieved July 1, 2019.

Comments and Ratings (2)

PL.R

Easy to understand, works great. Some functions missing (refresh on zoom for instance) but great base to work on.
Thank you.

Marcel Geers

Alexey, please be aware that the usage of that base url in your code is undesired by OpenStreetMaps:
https://operations.osmfoundation.org/policies/tiles/

MATLAB Release Compatibility
Created with R2019a
Compatible with R2014b and later releases
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!