Changed to do spatial queries using the Query framework