It used to be simple. The further the food is away from you, the more ecologically unsound it is as it would have emitted lots more carbon dioxide via transportation (trucks, planes, trucks etc).
Of course nothing is ever simple in ecology, where you get a myriad of inputs influencing the outcomes. So transportation is only one factor contributing to total emissions in food production.
This article from Guardian sums it up nicely.