[ANN] GeoStats.jl - Geospatial Data Science and Geostatistical Modeling in Julia

A few tweaks here and there, and we are now able to visualize moderately large “raster” data stored in GeoTIFF files with any CRS in native Julia.

To illustrate the feature, consider the following example with data from the NaturalEarth project:

using GeoStats
using GeoIO

import GLMakie as Mke

# https://www.naturalearthdata.com/downloads/50m-raster-data/50m-gray-earth
raster = GeoIO.load("GRAY_50M_SR_OB.tif") |> Coerce(Continuous)

# upscale for 3D mesh visualization
coarse = raster |> Upscale(10, 10) # needs to be optimized

# send coarse scale to viewer
coarse |> viewer

Let’s add additional geometries to the visualization:

# https://www.naturalearthdata.com/downloads/50m-cultural-vectors
bounds = GeoIO.load("ne_50m_admin_0_boundary_lines_land.shp").geometry

viz!(bounds, color="cyan")

Now let’s add a random set of points with LatLon coordinates:

points = rand(Point, 100, crs=LatLon)

viz!(points, color="yellow")

Now let’s demonstrate the real benefit of native Julia CRS as opposed to “raw” numbers with the PROJ library. Let’s project our data to a Robinson CRS and visualize again:

projcoarse = coarse |> Proj(Robinson)
projbounds = bounds |> Proj(Robinson)
projpoints = points |> Proj(Robinson)

projcoarse |> viewer
viz!(projbounds, color="cyan")
viz!(projpoints, color="yellow")

Let’s do the same with another favorite of mine, the WinkelTripel:

projcoarse = coarse |> Proj(WinkelTripel)
projbounds = bounds |> Proj(WinkelTripel)
projpoints = points |> Proj(WinkelTripel)

projcoarse |> viewer
viz!(projbounds, color="cyan")
viz!(projpoints, color="yellow")

Notice how the visualization automatically chooses a 2D axis for the Projected CRS types using Julia’s multiple-dispatch. It is very easy to build advanced geographic maps in a few lines of code, and to parallelize things with multiple threads.

Of course there are tons of optimizations pending to make this experience more interactive and fast. We are working on it, and welcome pull requests with performance improvements.

You can reproduce the example above with the latest stable release of the stack.

13 Likes