Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing islands when using raster landmask #1297

Open
knutfrode opened this issue May 14, 2024 · 5 comments
Open

Missing islands when using raster landmask #1297

knutfrode opened this issue May 14, 2024 · 5 comments

Comments

@knutfrode
Copy link
Collaborator

The following codelines illustrate that the Island of Sula (among others) is missing on the raster plot (fast=True), but present when plotting the full GSHHG vector coastline.

from datetime import datetime, timedelta
from opendrift.models.oceandrift import OceanDrift
o = OceanDrift()
o.seed_elements(lon=6.17, lat=62.36, time=datetime.now(), number=100, radius=1000)
o.run(steps=1)
o.plot(fast=True, filename='landmask_sula_raster.png')
o.plot(fast=False, filename='landmask_sula_GSHHG.png')

landmask_sula_raster
landmask_sula_GSHHG

I am not sure what is the reason for this, but probably related to the area_thresh parameter that was available for Basemap:
matplotlib/basemap#158
Thus perhaps some similar threshold parameters could have been used when creating the global roaring landmask.

@gauteh
Copy link
Member

gauteh commented May 14, 2024

I suspect that maybe roaring-landmask was made with an old GSSHG?

@knutfrode
Copy link
Collaborator Author

I am not sure whether some islands were actually missing in older version of GSHHG (called then GSHHS), or if it was just some islands that did not show on plots (and maybe in the rasterization) unless some criteria parameter (like area_thresh) was set low enough (e.g. 0).

@gauteh
Copy link
Member

gauteh commented May 14, 2024

Ok. The mask is generated directly from the Shape-files, there is no parameters when opening them. I have to check.

@gauteh
Copy link
Member

gauteh commented May 14, 2024

Looks like it is missing in the shape-files used for roaring-landmask, could be an error in the generation of those..

@gauteh
Copy link
Member

gauteh commented May 14, 2024

Trying to fix this in roaring-landmask.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants