shapeQuery space function