Description
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 to earth_data.py
first, and then separate the re-usable chunk of code into a function called _load_earth_data
or something and have load_earth_relief
/load_earth_day
/load_earth_night
call that. This is similar to what we did for blockmean
and blockmedian
at #1092. Less breakages for users already using load_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 existing load_earth_relief
function though it will need to be renamed to load_earth_data
I guess. This would involve a deprecation notice for users using load_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.