Working spatial queries