coords function

Extract coordinates from an object