Data
In general, geographic data is classified into two types - vector data and raster data.
Vector data uses points and line segments to identify locations on the earth, and collects those into "feature collections" with associated values, while raster data uses a series of cells to represent locations on the earth.[1]
Vector data are usually plotted by lines
, scatter
, or poly
, and raster data are usually plotted by surface
, meshimage
, or heatmap
.
GeoMakie sources
GeoMakie.jl provides three functions to get plottable data for your map. These methods provide data from Natural Earth. You can pass the output straight to Makie plotting functions like lines
, poly
or image
(for earth
).
GeoMakie.coastlines Function
coastlines([scale::Int = 110])
Loads Natural Earth [2] coastline data as GeometryBasics.jl geometries. scale
may be one of 110
, 50
, or 10
.
By default, a scale of 110m is used, for which data is shipped with GeoMakie. To use other scales, NaturalEarth.jl requires an Internet connection to download the relevant data.
coastlines(ga::GeoAxis)
Split coastline contours when ga.dest includes a "+lon_0" specification.
GeoMakie.land Function
land()
Loads Natural Earth [2:1] land polygon data as GeometryBasics.jl geometries. scale
may be one of 110
, 50
, or 10
.
By default, a scale of 110m is used, for which data is shipped with GeoMakie. To use other scales, NaturalEarth.jl requires an Internet connection to download the relevant data.
GeoMakie.earth Function
earth()
Loads the Natural Earth [2:2] 50m raster illustration of Earth as an image. Doesn't support scale
as of yet, but that's coming soon!
External sources
The Julia package ecosystem has several sources which provide geographic data from various sources.
NaturalEarth.jl - get data from Natural Earth.
GADM.jl - get data from GADM, a database of political borders for countries, down to state and even province-equivalent level.
GeoDatasets.jl - currently provides access to GSHHG.
GMT.jl - provides access to the GMT library, which has quite a bit of data as well as being another geographic plotting library!
RasterDataSources.jl - provides access to various raster datasets via Rasters.jl. See their documentation for the full list!
Loading data yourself
Vector data loaders:
Native Julia: GeoJSON.jl, Shapefile.jl, GeoParquet.jl, WellKnownGeometry.jl
GeoDatasets.jl, which wraps ArchGDAL.jl to return a DataFrame.
ArchGDAL.jl, and the more primitive GDAL.jl, which wraps the GDAL library (used by R's
sf
).
Raster data loaders
ArchGDAL.jl (used by Rasters.jl as well)
https://www.esri.com/content/dam/esrisites/en-us/media/pdf/teach-with-gis/raster-faster.pdf ↩︎
Made with Natural Earth. Free vector and raster map data at naturalearthdata.com. ↩︎ ↩︎ ↩︎