EGU24-12024, updated on 09 Mar 2024
https://doi.org/10.5194/egusphere-egu24-12024
EGU General Assembly 2024
© Author(s) 2024. This work is distributed under
the Creative Commons Attribution 4.0 License.

Generic geodesy in the browser? Recent developments in Rust Geodesy

Thomas Knudsen
Thomas Knudsen
  • Danish Agency for Data Supply and Infrastructure (thokn@sdfi.dk)
Rust Geodesy (RG) is an open source library, written in Rust [1], for experiments with geodetic transformations, software, and standards [2], [3]. RG originated from attempts to demonstrate architectural innovations for potential improvement of the ubiquitous transformation system PROJ, with which it consequentially shares many characteristics.
In parallel, however, RG has also evolved into a quite capable geodetic tool in its own right. And over the last few releases it has expanded from the "geometrical geodesy" background of PROJ, into supporting a number of operations from the realm of physical geodesy (deflections of the vertical, normal gravity models, gravity reduction, etc.), while still maintaining the key architectural feature of run time construction of complex operations from pipelines of simpler operators.
But in particular, the RG design has been nudged towards supporting the development and maintenance of geodetic transformations, as reflected by these characteristics:
  • A clear and compact syntax for specification of processing pipelines
  • ...but also syntactical backward compatibility and interoperability, through additional support for PROJ's older and more verbose syntax
  • Extensibility through straightforward, tight integration betwwen system supplied and user written operators
  • ..but also support for loose integration with arbitrary ancillary software, through support of plain text operator definitions and grid files
  • ...and ad-hoc abstractions through support for run-time defined user macros
  • Seamless interoperability with arbitrarily complex application program data structures, i.e. integrating with the user program, rather than forcing the use of library provided data structures, and
  • Support of roundtrip consistency checks
The RG data flow architecture is based on the foundational concept of "coordinate sets" from the OGC/ISO geospatial standards series [4]. Hence, in contrast to PROJ operators, which operate on a single coordinate tuple, RG operators operate on an entire set of coordinate tuples at a time. While this may seem immaterial at the source code level, it gives the compiler a wider context for introducing vectorisation, leveraging the SIMD instruction sets of modern computers to transform more than one coordinate tuple at a time.
Recently, SIMD-support has also arrived in the Web Assembly (Wasm) implementations of the major web platforms [5], and when compiled to Wasm, RG has shown to be a compact, lightweight and practical library for use on the web [6], [7]. So with RG's combined forays into the realms of Wasm and physical geodesy, the vista of "generic geodesy in the browser" is now more than just a mirage.
 
[1] Steve Klabnik and Carol Nichols, 2022: The Rust Programming Language, 2nd edition, 560 pp., San Francisco, CA, USA: No Starch Press
[2] Thomas Knudsen, 2021: Ruminations on Rust Geodesy: Overall architecture and philosophy.
URL: https://github.com/busstoptaktik/geodesy/blob/main/ruminations/000-rumination.md
[3] Thomas Knudsen: Geodesy. URL https://github.com/busstoptaktik/geodesy
[4] Roger Lott (ed), 2019: OGC Abstract Specification Topic 2: Referencing by coordinates.
URL https://docs.ogc.org/as/18-005r4/18-005r4.html
[5] WebAssembly Feature Extensions. URL: https://webassembly.org/features/
[6] Kyle Barron, 2023: Prototyping GeoRust + GeoArrow in WebAssembly. Efficient, vectorized geospatial operations in the browser,
URL https://observablehq.com/@kylebarron/prototyping-georust-geoarrow-in-webassembly
[7] Sean Rennie, 2023: Testing geodesy-wasm,
URL https://observablehq.com/d/3ff9d9b8f0b5168a

How to cite: Knudsen, T.: Generic geodesy in the browser? Recent developments in Rust Geodesy, EGU General Assembly 2024, Vienna, Austria, 14–19 Apr 2024, EGU24-12024, https://doi.org/10.5194/egusphere-egu24-12024, 2024.