How to create a land/sea mask based on an XYZ bathymetry database?

5 ビュー (過去 30 日間)
Leon
Leon 2021 年 8 月 30 日
コメント済み: Leon 2021 年 8 月 30 日
I have a gridded global bathymetric database with X, Y, and E. X is longitude, Y is latitude, and E is the elevation. E can be positive numbers (elevation of land, mountains, etc.), or negative numbers (depth of the ocean). They all share the same size of 8640 x 4320.
How do I use this database to create a land/sea mask, i.e., a value of 1 (land) or 0 (sea) for each point on a global grid like the below:
[X, Y] = ndgrid([-180:0.125:180], [-90:0.125:90]);
Any ideas would be greatly appreciated!
Many thanks.

採用された回答

Chunru
Chunru 2021 年 8 月 30 日
% Assume the elevation data is E
Mask = E>0;
  1 件のコメント
Leon
Leon 2021 年 8 月 30 日
Thanks. Glad to know it is as simple as that.

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

その他の回答 (0 件)

カテゴリ

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

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by