1. A computer-implemented method of spatial query processing, comprising: receiving, by at least one computer processor, a spatial query on spatial data that specifies a query window, where the spatial data has an associated spatial data index, and where the spatial data index includes a plurality of spatial data index elements; constructing, by the at least one computer processor, a query window index structure describing a geometry of the query window, where the query window index structure includes a plurality of query window index structure elements; and comparing, by the at least one computer processor, the query window index structure to the spatial data index to determine a spatial relationship between the query window and the spatial data by: identifying a spatial data index element; searching the query window index structure to determine if the spatial data index element intersects a query window index structure element; if the spatial data index element intersects the query window index structure element, accessing a spatial data store that stores the spatial data to determine if spatial data represented by the spatial data index element intersects the query window; if the spatial data index element does not intersect the query window index structure element, determining whether a selected data point lying in the spatial data index element is contained within the query window; and if the selected data point is contained within the query window, determining that the spatial data represented by the spatial data index element is contained within the query window.
1. A computer-implemented method of spatial query processing, comprising: receiving, by at least one computer processor, a spatial query on spatial data that specifies a query window, where the spatial data has an associated spatial data index, and where the spatial data index includes a plurality of spatial data index elements; constructing, by the at least one computer processor, a query window index structure describing a geometry of the query window, where the query window index structure includes a plurality of query window index structure elements; and comparing, by the at least one computer processor, the query window index structure to the spatial data index to determine a spatial relationship between the query window and the spatial data by: identifying a spatial data index element; searching the query window index structure to determine if the spatial data index element intersects a query window index structure element; if the spatial data index element intersects the query window index structure element, accessing a spatial data store that stores the spatial data to determine if spatial data represented by the spatial data index element intersects the query window; if the spatial data index element does not intersect the query window index structure element, determining whether a selected data point lying in the spatial data index element is contained within the query window; and if the selected data point is contained within the query window, determining that the spatial data represented by the spatial data index element is contained within the query window. 5. The computer-implemented method of claim 1 , wherein determining if the selected data point is contained within the query window is performed by: finding a nearest point to the selected data point on a query window boundary; identifying one or more query window boundary edges that include a nearest point; traversing the query window index structure associated with the identified boundary edges to determine if the selected data point is within the query window; and if the data point is within the query window, determining that the spatial data index element is contained within the query window.