Skip to content

SpatioTemporal Adaptive Resolution Encoding, a unifying index for geo-located data.

License

Notifications You must be signed in to change notification settings

SpatioTemporal/STARE

Repository files navigation

Provisos

This release is being made in the hope it may be useful for early users wishing to experiment with STARE functions.


STARE SpatioTemporal Adaptive Resolution Encoding

An encoding for high-performance search and subsetting of geospatial data.

Copyrights and licenses as asserted in individual files. Legacy HTM distributed under GNU/GPLv2.

Default copyrights are asserted.

Michael Lee Rilee, RSTLLC, mike@rilee.net, 240-481-3254


Important features, files, directories

VERSION

Contains the current version number.

INSTALL

Please see the INSTALL file for more information about dependences and installation.

STARE is available on https://Conda-Forge.org, installable as follows (starting with linux).

conda install -c conda-forge stare

GITHUB

STARE is made available at https://github.com/SpatioTemporal/STARE

A Python API is at https://github.com/SpatioTemporal/pystare

STAREPandas is a pandas DataFrame pendant to GeoPandas at https://github.com/SpatioTemporal/STAREPandas

A growing number of examples are available at https://github.com/SpatioTemporal/STARE-Cookbooks

Please visit https://github.com/SpatioTemporal for more STARE-related resources.


ENCODING HIGHLIGHTS

SPATIAL

The spatial encoding encodes the traversal through a recursive partitioning (quadfurcation) of spherical triangles to find points located on the unit sphere.

STARE API's expects input latitudes and longitudes to be compatible with WGS84, i.e. geocentric.

BITS USAGE
63 - 62 Not used
59 - 61 Root octahedron index
5 - 58 Tree traversal (2 bits to partition each triangle, 27 levels of partitions)
0 - 4 Resolution indicator, also Terminator indicator if all bits are set

See src/EmbeddedLevelNameEncoding.C, EmbeddedLevelNameEncoding::getSciDBLeftJustifiedFormat.

TEMPORAL

The temporal encoding assigns fields of bits to encode calendrical values, e.g. year, month, day, etc., in a 64-bit Hierarchical Calendrical Encoding (HCE). Temporal resolution and encoding type information is also included. A signed 64-bit integer (int64_t) is used for the array index values generated by the library.

The recommended way to set the STARE temporal index is via International Atomic Time (TAI) or Coordinated Universal Time (UTC). STARE uses the Essential Routines for Fundamental Astronomy (ERFA) translation of the International Astronomical Union's Standards of Fundamental Astronomy (IAU/SOFA), http://www.iausofa.org/. ERFA is found at https://github.com/liberfa/erfa.

Internally, STARE uses ERFA to translate UTC to TAI, and constructs the native temporal array index values using TAI. ERFA does not follow the BCE/CE distinction for calendar years, i.e. for ERFA there is a year zero. The STARE API calls for UTC and TAI follow this ERFA convention.

The native fields can be set directly, in which case the user assumes responsibility for the correctness of the date encoded.

The default partitioning of an HCE word follows. See TemporalIndex for more information.

BITS WIDTH USAGE
63 Set by the sign (2-s complement), also called the Before/After bit
50 - 62 13 Year (0..*)
46 - 49 4 Month (0..13)
44 - 45 2 Week (0..4)
41 - 43 3 Day (0..7)
36 - 40 5 Hour (0..23)
30 - 35 6 Minute (0..59)
24 - 29 6 Second (0..59)
14 - 23 10 Millisecond (0..999)
8 - 13 6 Forward Resolution indicates a time scale associated with a bit position**
2 - 7 6 Reverse Resolution indicates a time scale associated with a bit position**
0 - 1 2 Type indicator (default = 2)

*The default STARE temporal index can range between year -8191 and 8191 in the internal native format. Year zero and negative years are set by setting a positive number in the year field and setting the Before/After bit to 0. Year=0 and Before/After=1 is an error. See TemporalIndex for more detail.

**A resolution of zero corresponds to the coarsest bit, e.g. the top of the year field (bit position 62). A resolution of 48 corresponds to the finest resolution, 1 ms (bit position 14). These are for the default encoding, type = 1. Forward and reverse resolution indicate direction in time away from encoded temporal position.


HISTORY

2018-2021 Development supported by NASA/ACCESS-17.

The spatial indexing is a fork of version 2 of the Hierarchical Triangular Mesh (HTM) developed for the Sloan Digital Sky Survey.

HTM Version 2 is the legacy version: http://www.skyserver.org/HTM/Old_default.aspx

Seminal work on the HTM for indexing the sphere was done by P.Z. Kunszt, A.S. Szalay, I. Csabai, A.R. Thakar, with extended development by J. Gray and G. Fekete (http://www.skyserver.org/HTM/doc/). See also Kondor et al., 2014, "http://arxiv.org/pdf/1410.0709.pdf".

For more information about SDSS/HTM please visit: http://www.skyserver.org//default.aspx

2015-10-30 Initial development supported by via NASA/ESTO DERECHOS. http://esto.nasa.gov/files/solicitations/AIST_14/ROSES2014_AIST_A41_awards.html#clune

About

SpatioTemporal Adaptive Resolution Encoding, a unifying index for geo-located data.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages