How can I create a land mask to remove data points that are located on land?
13 views (last 30 days)
Show older comments
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.
0 Comments
Answers (1)
Vidip
on 23 Nov 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:
0 Comments
See Also
Categories
Find more on Function Approximation, Clustering, and Control in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!