# MaxCount Spatiotemporal Aggregate Operator

**DOI:**https://doi.org/10.1007/978-3-319-17885-1_1597

## Synonyms

## Definition

Spatiotemporal aggregation operators answer summary questions about spatiotemporal data maintained in spatiotemporal databases. Aggregation over the two distinctly different domains of time and space requires unique index structures and algorithms. MaxCount finds the largest number of objects intersecting a dynamic query space and the time at which this maximum occurs. Formally we define MaxCount as follows: Let *S* be a set of moving objects. Given a dynamic query space *R* defined by two moving points *Q*_{1} and *Q*_{2} as the lower-left and upper-right corners of *R*, and a time interval *T*, the MaxCount operator finds the time *t*_{max} and maximum number of points *M*_{max} in *S* that *R* can contain at any time instance within *T*. Dynamic query space is defined by a continuous time interval *T*, and a *d*-dimensional space that can move, and change size or shape over the query time interval (Anderson and Revesz 2009). In the index a dual transform (Kollios et al. 2005), represents the linear motion as a point consisting of a starting position and velocity in each dimension of motion. In *three*-dimensional space, the query space would then occupy *six* dimensions. Changes to any one of the six parameters to a moving object in *three*-dimensional space represent an update to the object and cause an update to the index structure. Buckets contain density functions based on dual transforms and allow extremely efficient approximate calculations of MaxCount based on complex integrals over the query space.

## MaxCount and Other Spatiotemporal Aggregation Operators

### Background

Research into MaxCount originated in the exploration of aggregation in spatiotemporal domains by Revesz and Chen (2003) and Chen and Revesz (2004) as a natural extension to spatiotemporal indexing. Spatiotemporal aggregation running times led to the examination of estimation methods first by expanding the previous work into *two*-dimensional space (Anderson 2006) and then expanding to *d*-dimensional space (Anderson and Revesz 2009). Interest in spatiotemporal indexing and aggregation drove the original work to examine safety for air travel and for large numbers of moving objects within a space. This research led to a family of spatiotemporal, threshold, aggregate operators including MaxCount (MinCount), ThresholdRange, ThresholdCount, ThreshouldSum, ThresholdAverage, and CountRange (Anderson 2007). A new spatiotemporal indexing method that allows inserts and deletes to occur in *O*(1) time (Anderson 2007) supports efficient running times for these operators.

### Exact and Approximation Algorithms

Two variations of the MaxCount operator exist: the exact and estimate methods. The estimate algorithm runs in *O*(*B*) time and space where the parameter *B* represents the number of buckets in the index (Anderson 2007). For the exact algorithm, time is *O*(*N*) and space is *O*(1). In comparing the exact and estimate algorithms, running times for the exact algorithm varied widely depending on the size of the query space and the number of objects intersecting it. The estimate algorithm was designed to give accuracy at or above 95% in a short predictable time. Note that *B* does not depend on the number of objects *N*. Instead the number of buckets must be chosen high enough to represent the density patterns in the *d*-dimensional query space. In practice, 20 buckets was enough to achieve better than 95% accuracy even with millions of moving objects (Anderson 2007). MaxCount and the family of threshold aggregate operators now represent a mature set of aggregate operators for spatiotemporal data.

## References

- Anderson S (2006) Aggregation estimation for 2D moving points. In: Thirteenth international symposium on temporal representation and reasoning, Piscataway. IEEE Computer Society Press, pp 137–144CrossRefGoogle Scholar
- Anderson S (2007) Software verification and spatiotemporal aggregation in constraint databases. PhD thesis, University of Nebraska, LincolnGoogle Scholar
- Anderson S, Revesz P (2009) Efficient maxcount and threshold operators of moving objects. Geoinformatica 13(4):355–396CrossRefGoogle Scholar
- Chen Y, Revesz P (2004) Max-count aggregation estimation for moving points. In: Proceedings of the 11th international symposium on temporal representation and reasoning, Tatihou, pp 103–108Google Scholar
- Kollios G, Papadopoulos D, Gunopulos D, Tsotras J (2005) Indexing mobile objects using dual transformations. VLDB J 14(2):238–256CrossRefGoogle Scholar
- Revesz P, Chen Y (2003) Efficient aggregation over moving objects. In: Proceedings of the 10th international symposium on temporal representation and reasoning, fourth international conference on temporal logic, Cairns, pp 118–127Google Scholar