12. A non-transitory computer-readable medium storing computer-executable instructions executed by a computer causing the computer to perform a method of spatial query processing, the method comprising: receiving 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 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 the query window index structure to the spatial data index and to the spatial data 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.
12. A non-transitory computer-readable medium storing computer-executable instructions executed by a computer causing the computer to perform a method of spatial query processing, the method comprising: receiving 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 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 the query window index structure to the spatial data index and to the spatial data 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. 14. The non-transitory computer-readable medium of claim 12 , wherein the instructions for determining if the selected data point is contained within the query window comprise: describing a line segment between the selected data point and a query window index boundary point lying on an outer boundary of the query window index structure element; determining if the line segment intersects a query window boundary; and if the line segment intersects the query window boundary an odd number of times, determining that the spatial data index element is contained within the query window.