Introducing Stripy

Geodynamicists from Sydney and Australian National universities have developed Stripy, a software module that allows scientists to efficiently place GIS ‘wrapping paper’ around the spherical Earth ‘present’. This is the first module to be built for a common scientific programming language like Python, that supports such ‘wrapping’, or mapping features. Here, developer Dr Ben Mather explains Stripy’s key functions for the AuScope Earth modelling community.

Stripy is a Python module for (constrained) triangulation in Cartesian coordinates and on a sphere. Here we show how ocean age data can be triangulated on the sphere with no need for points on land using Stripy. Once Stripy ingests your data points, you can do lots of cool things like sample another data set to your grid (bathymetry in the right image), smoothing, finding the derivatives of your data, or interpolating to another set of points. Image: Prof Louis Moresi.

Article originally published by Auscope.

Do these questions apply to you?

Have you ever been given a dataset with random points distributed all over the globe that you need to interpolate to a grid? Has somebody sent you a seismic tomography file defined on a seven-times refined icosahedral triangulation and you need to make a global map? Ever needed to fit a smooth surface through a set of points in the plane or on the globe?

The triangulation of scattered points is a common problem in geospatial applications where longitudinal and latitudinal data need to be meshed. Typical applications include the calculation of neighbour relationships, interpolate, smooth, or find the derivatives of a surface. Until now, there have been no packages available for a prevalent scientific programming language, such as Python, that support these features.

The Stripy solution

Introducing Stripy: a lightweight object-oriented Python package for building meshes from unstructured data on the sphere. A series of example meshes are provided including such classics as icosahedral, octahedral, and soccer ball meshes.

Stripy includes the following functionality:

  • Spherical and Cartesian triangulation of scattered points.
  • Construction of Cartesian and Spherical meshes.
  • Nearest-neighbour, linear, and hermite cubic interpolation.
  • Evaluation of derivatives.
  • Smoothing operations.
  • Mesh refinement on line segments / triangle centroids.
  • Fast point location with k-d tree interface with angular separation metric on the sphere.

In case you weren’t already sold, all these features are also available in Cartesian coordinates. Stripy is bundled with a linked collection of Jupyter notebooks that can act as a user guide and an introduction to the package. The notebooks are split into matching sets for spherical and Cartesian triangulations.

Download Stripy, or make it better

Stripy is a member of the Underworld family of open-source software packages, and is freely available for download by multiple installation methods on GitHub. If you get stuck and need assistance, please open a GitHub issue. If you want to contribute in some way to the project, please see our contributions guide.