Convert coordinates to double