/STARE

SpatioTemporal Adaptive Resolution Encoding

Primary LanguageC++OtherNOASSERTION

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.

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.

GITHUB

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

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

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
44 - 62 19 Year (0..*)
40 - 43 4 Month (0..13)
38 - 39 2 Week (0..4)
35 - 37 3 Day (0..7)
30 - 34 5 Hour (0..23)
24 - 29 6 Minute (0..59)
18 - 23 6 Second (0..59)
8 - 17 10 Millisecond (0..999)
2 - 7 6 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 -262143 and 262143 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 54 corresponds to the finest resolution, 1 ms (bit position 8). These are for the default encoding, type = 2.


HISTORY

2018-2020 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