Abstract
With the increasing applications based on location, research on spatiotemporal data, especially queries of spatiotemporal data have attracted a lot of attention. XML, as a standard language of information exchange over the Web, has the ability to query spatiotemporal data. In this chapter, the authors propose an algorithm, TwigStackSP, for matching a spatiotemporal XML query twig pattern. They represent spatiotemporal data by adding spatial and temporal attributes in general data and extending region coding scheme to filter the nodes in P-C relationship. This technique uses a chain of linked stacks to compactly represent partial results to root-to-leaf query paths, which are then composed to obtain matches for the twig pattern. It can be proved that TwigStackSP is I/O and CPU optimal when there are no text nodes in P-C relationship of twig pattern.