spatial_filter function

Prepare JSON for use as a spatial filter based on feature geometry or bounding box input