-
Notifications
You must be signed in to change notification settings - Fork 224
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
Function to load NASA Blue and Black marble mosaic images #1442
Comments
There are many differences between earth_relief and earth_day/earth_night datasets:
I think these differences mean that very few code in the |
@seisman and @weiji14 I think I have made a fix for problems of no registration or region passed to |
Kinda. The tricky part is that Blue/Black Marble are RGB images with 3 bands, whereas the other datasets you've been working on are 1 band datasets. So you would need to use Now one complication is that these GeoTIFF files store the RGB data in a colormap attribute, and there's no standardized way on how to read these into an |
Description of the desired feature
Provide access to cloud-free colour images of the Earth! Specifically, the
@earth_day_
and@earth_night_
GMT remote data files (see https://docs.generic-mapping-tools.org/6.2/datasets/remote-data.html#global-earth-day-night-images).Context is that I'm using it at #1437, and it would be good to have some sample RGB images. We might as well have a proper function similar to
pygmt.datasets.load_earth_relief
, but for the Blue and Black Marble images instead.Note that there is a lot of logic from the
load_earth_relief
function that could be reused:pygmt/pygmt/datasets/earth_relief.py
Lines 92 to 140 in ebbb0cc
These are some ways I'm considering:
Option 1 - rename the
earth_relief.py
file toearth_data.py
first, and then separate the re-usable chunk of code into a function called_load_earth_data
or something and haveload_earth_relief
/load_earth_day
/load_earth_night
call that. This is similar to what we did forblockmean
andblockmedian
at #1092. Less breakages for users already usingload_earth_relief
, but maybe more work for the devs.Option 2 - have a single function called
load_earth_data
which accepts a parameter called 'type' that accepts arguments like 'relief'/'day'/'night'. We could then pretty much re-use the existingload_earth_relief
function though it will need to be renamed toload_earth_data
I guess. This would involve a deprecation notice for users usingload_earth_relief
, but less work for the devs in terms of not needing to write a new function?Option 3 - any other ideas?
Are you willing to help implement and maintain this feature? Best to discuss first.
The text was updated successfully, but these errors were encountered: