Closed haakon-e closed 1 year ago
I wouldn't mind spinning this out to a NaturalEarth.jl
, which downloads on request then caches using Artifacts, and we could depend on that from GeoMakie. What's your take on this idea @haakon-e? It could probably live in JuliaGeo.
I wouldn't mind spinning this out to a
NaturalEarth.jl
, which downloads on request then caches using Artifacts, and we could depend on that from GeoMakie. What's your take on this idea @haakon-e? It could probably live in JuliaGeo.
Yes, I think a separate repo makes more sense. I'll have to learn how to conditionally cache with Artifacts, but I think that'll be a really nice contribution to the ecosystem. I'll see if I get time to think more about this in the next few weeks. Thanks for your feedback!
Yeah the Artifacts bit shouldn't be too bad - you just have to mark the artifact which you don't want to pre-download as lazy
. Presumably we could also specify some to be auto-downloaded.
Natural Earth has a github repo with all their vector files up as GeoJSON or Shapefile...theoretically, we should be able to retrieve that GeoJSON by downloading the raw files from Github, which would be a pretty clean solution to our artifact problem. People could retrieve the dataset they want by name directly (artifact"ne_10m_coastline"
) or by some easy accessor function in the same vein as what you wrote in this PR.
Thanks @asinghvi17 I added some initial commits here: https://github.com/asinghvi17/NaturalEarth.jl/
WIP on support for plotting various datasetes from naturalearthdata.com.
The website provides a plethora of datasets that are very nice to use as background images / overlays on Earth-themed plots.
Some comments:
Shapefile
package.Downloads
(or a similar package) to download these files upon request. This is already done for certain examples in this repo.GeoMakie
/Makie
can interface with.Personally, I'm most interested in plotting more accurate coastlines and ocean bottom, so will probably not work on too much support beyond this.
Note: Just before posting I saw that they may actually have
.geojson
-type data available for download via github [link], so theShapefile
support may not be needed (at least for these datasets). If the maintainers prefer people to individually download any datasets they may need, I may be happy with adding some info about this to the docs, for others to enjoy.1. Higher-resolution
coastlines()
For this example, I assume the relevant data exists in
~/Downloads/ne_10m_coastline/ne_10m_coastline.shp
(download here)2. Bathymetry contours
Assumes you have the folder
~/Downloads/ne_10m_bathymetry_all/
(download all here)(Note: I'm not sure if the long straight-ish lines are due to one-off indexing errors on my part in how I read the raw data or if they're actually a part of the dataset).
3. Detailed ocean bottom
Assumes you have the file
~/Downloads/OB_50M/OB_50M.tif
(download here)Here the combination of detailed bathymetry and detailed coastplot really shines, and it becomes apparent the regions where the bathymetry permeates the ocean surface as islands.