IBM Cloud Docs
Working with the spatio-temporal library

Working with the spatio-temporal library

You can use the spatio-temporal library to expand your data science analysis in Python notebooks to include location analytics by gathering, manipulating and displaying imagery, GPS, satellite photography and historical data.

You can use the spatio-temporal lib for applications that run in a standalone IBM Analytics Engine cluster, which you create for your data analysis processing, or in solutions that use IBM Analytics Engine, for example in the Spark environments available in IBM Watson® Studio.

Key functions

The geospatial library includes functions to read and write data, topological functions, geohashing, indexing, ellipsoidal and routing functions.

Key aspects of the library include:

  • All calculated geometries are accurate without the need for projections.
  • The geospatial functions, when run in IBM Analytics Engine standalone or in a solution that uses IBM Analytics Engine take advantage of the distributed processing capabilities provided by Spark.
  • The library includes native geohashing support for geometries used in simple aggregations and in IBM Cloud Object Storage indexing, whereby improving storage retrieval considerably.
  • The library supports extensions of Spark distributed joins.
  • The library supports the SQL/MM extensions to Spark SQL.

Getting started with the library

Before you can start using the library in a notebook, you must register STContext in your notebook to access the st functions.

To register STContext:

from pyst import STContext
stc = STContext(spark.sparkContext._gateway)

Next steps

After you have registered STContext in your notebook, you can begin exploring the spatio-temporal library for:

Learn more

Check out the following Python notebooks to learn how to use the spacio-temporal library functions in Python notebooks. To access these notebooks, you need an IBM Watson® Studio instance. See Provisioning an IBM Watson® Studio instance.