Spatial tests and query