From France – driving – an hour and a half from Perpignan. There is a mainline station too. There is also a bus for just one euro ! Website - Courriers Catalans.
From Spain – driving one hour from Figueras. There are two train stations in Figueras. Vilafant is the high speed train one and has a large car park. This station is a 15 minute train journey from Girona and 50 minutes from Barcelona.