How can I increase coastal resolution with M_map?

22 ビュー (過去 30 日間)
Jonathan Demmer
Jonathan Demmer 2022 年 3 月 11 日
回答済み: Aleksei 2022 年 12 月 9 日
Hi all,
I am using the code provided as an example to get familair with M_map (see below). However when I ran it, an error(ish) message appeared (see below) which doesn't allowed me to have a full resolution of the coastal are. I already double checked and m_gshhs_f (and all others) are included in the folder. Can anyone help me please?
Warning: Coastline file C:\Matlab_download\m_map1.4\m_map/data/gshhs_f.b not found \n(Have you installed it? See the M_Map
User's Guide for details)\n ---Using default coastline instead
> In mu_coast>get_coasts (line 476)
In mu_coast (line 101)
In m_gshhs (line 118)
In m_gshhs_f (line 28)
In untitled (line 9)
close all
clear all
clc
% add path to TelemacTolls functions (i.e. to read in telemac files into MATLAB):
addpath ('C:\Matlab_download\m_map1.4\m_map\');
m_proj('UTM','long',[-72 -68],'lat',[40 44]);
m_gshhs_i('color','k');
m_grid('box','fancy','tickdir','in');
m_ruler(1.2,[.5 .8]);
% fake up a trackline
lons=[-71:.1:-67];
lats=60*cos((lons+115)*pi/180);
dates=datenum(1997,10,23,15,1:41,zeros(1,41));
m_track(lons,lats,dates,'ticks',0,'times',4,'dates',8,...
'clip','off','color','r','orient','upright');
m_northarrow(-68.5,43.4,.4,'type',2);
  1 件のコメント
jorge
jorge 2022 年 8 月 22 日
I have the same problem, and I haven't been able to fix it
Help please

サインインしてコメントする。

回答 (1 件)

Aleksei
Aleksei 2022 年 12 月 9 日
The first solution I see is:
1) add folder with subfolders: addpath(genpath('C:\Matlab_download\m_map1.4\m_map\'));
your gshhs files are located in the subfolder 'data', but by addpath you add only files in the folder m_map
2) if you want your 'addpath' having permanent effect - don't forget the 'savepath' command

カテゴリ

Help Center および File ExchangeCoastal Engineering についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by