MyNixOS website logo
Description

Use 'GeoArrow' to Add 'Deck.gl' Layers to a 'maplibregl'/'mapboxgl' Map.

Leverages the high-performance 'GeoArrow' memory layout to render potentially very large 'Deck.gl' data layers on a 'maplibregl'/'mapboxgl' map created with R package 'mapgl'. The heavy lifting is done on the 'JavaScript' side in the browser using 'deck.gl-geoarrow' (<https://github.com/geoarrow/deck.gl-geoarrow/>). Currently provides functions for adding Scatterplot (points), Path (lines) and Polygon (polygons) layers. Has support for data classes from R packages 'wk' and 'sf'. In addition, convenience functions for styling data, tooltips and popups, as well as layer management are provided. Furthermore, remotely hosted 'GeoParquet' and 'GeoArrow' files can be visualised directly in the browser, without the need to first read them into R memory. Only the styling instructions are prepared by the user in R and are then transferred to and applied in the browser as the data arrives.

deckglgeoarrow

R-CMD-check

About

Easy and efficient rendering of very large geospatial data in the browser.

deckglgeoarrow provides functionality to efficiently visualise potentially very large geospatial data as Deck.gl layers on top of a maplibre/mapbox map created with package mapgl.

For very quick and efficient data transfer from R memory to the browser, geoarrowWidget is used. Layer creation is done in ‘JavaScript’ using geoarrow/deck.gl-geoarrow (see Features section for details on how and why layer creation is efficient).

Features

Currently, (MULTI)POINT, (MULTI)LINESTRING and (MULTI)POLYGON features are supported by the following layer functions:

Support for other layers, such as discrete global grid layers (S2, A5, H3), origin-destination layers (Arc, trips) and point-cloud layers, among others, will follow.

Supported data sources

R

Spatial classes from the following R packages are supported (via data argument):

Others

The following local or remotely hosted files types are supported (via file/url argument):

Note, that due to a restriction in the upstream JavaScript dependency, only files with native GeoArrow geometry encoding are supported. WKB encoded geometries will not render!

In addition, nanoarrowarray_streams (as files) are supported.

Installation

The development version of deckglgeoarrow can be installed from GitHub with:

# install.packages("pak")
pak::pak("r-spatial/deckglgeoarrow")

Example

To showcase what the package can do, consider this example.

Here, we visualise

  • 1M random points with random sizes and colors +
  • ~11k polygons colored by river basin +
  • ~155k lines colored and sized according to their Strahler number

in one map.

Here’s how quickly this renders:

More examples can be found here

Acknowledgment

This project has been realized with financial support from the.

Metadata

Version

0.0.2

License

Unknown

Platforms (79)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    uefi
    wasip1
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-uefi
  • aarch64-windows
  • aarch64_be-none
  • arc-linux
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-linux
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • sh4-linux
  • vc4-none
  • wasm32-wasip1
  • wasm64-wasip1
  • x86_64-cygwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-uefi
  • x86_64-windows