extract_coords function

Coordinates extraction