필터 지우기
필터 지우기

How can I create a land mask to remove data points that are located on land?

조회 수: 17 (최근 30일)
Meg Carr
Meg Carr 2022년 4월 8일
답변: Vidip 2023년 11월 23일
Hello,
I am plotting kilometers of aerial traffic in 0.05 degree squared grid cells. My dataset contains values over land and over the ocean, but I am only interested in data points located over the ocean.
x = longitude of upper left corner of grid cell
y = latitude of upper left corner of grid cell
z = number of kilometers of aerial effort in grid cell
How can I create a land mask to remove datapoints located over land?
I attempted using the 'landmask' function, which worked, but the land resolution was much too low.
Is there a way to use the high resolution gshhs land database to create my own landmask-style function? Or perhaps another method that is higher resolution?
Thank you for your help.

답변 (1개)

Vidip
Vidip 2023년 11월 23일
I understand you want to create a land mask with higher resolution using the GSHHS database in MATLAB, you can use the ‘gshhs’function.
To load GSHHS data use the ‘gshhs’ function to load the GSHHS data into MATLAB. Adjust the file path based on the location where you saved the GSHHS dataset.
Then to create Land Mask use the ‘inpolygon’ function to create a land mask based on your grid cell coordinates (x and y) and use the land mask to filter out data points over land.
For further information, refer to the documentation links below:

카테고리

Help CenterFile Exchange에서 Function Approximation, Clustering, and Control에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by