Borrar filtros
Borrar filtros

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

17 visualizaciones (últimos 30 días)
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.

Respuestas (1)

Vidip
Vidip el 23 de Nov. de 2023
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:

Categorías

Más información sobre Function Approximation, Clustering, and Control en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by