Research Article

A Novel Query Method for Spatial Data in Mobile Cloud Computing Environment

Algorithm 1

Range query.
Input: query range
Output: all data in the range
(0) Result set
(1) Calculate  the grid block group corresponding to
the query range
(2) for  each task of spark  do
(3) Reading KeyValueStore to form RDDs based
on the grid block group
(4) end for
(5) for  each Partition of RDDs  do
(6) Determine the relationship between the
query range and thin-MBR/fat-MBR
(7)if  the range contains the thin-MBR  then
(8) Add all data of this grid to  
(9) else
(10) if the range don’t intersect with fat-MBR
then
(11) Discard this grid
(12) else
(13) Traverse the data of this grid and
add eligible data to  
(14) end if
(15) end if
(16) end for
(17) return