Skip to content

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.coastlinesFunction.
julia
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.

source

julia
coastlines(ga::GeoAxis)

Split coastline contours when ga.dest includes a "+lon_0" specification.

source


# GeoMakie.landFunction.
julia
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.

source


# GeoMakie.earthFunction.
julia
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!

source


External sources

The Julia package ecosystem has several sources which provide geographic data from various sources.

Loading data yourself


  1. https://www.esri.com/content/dam/esrisites/en-us/media/pdf/teach-with-gis/raster-faster.pdf ↩︎

  2. Made with Natural Earth. Free vector and raster map data at naturalearthdata.com. ↩︎ ↩︎ ↩︎