@Vader: Iodjini_dk and sekio are both right with their answers. To determine the global origin of a heroin sample the following methods are used:
a) Profiling of accompanying alkaloids (as suggested by Sekio), because these very between different strains and not all cultivating countries use the same cultivar. Due to the very long history of traditional poppy-cultivation, the more recent breeding attempts, which aimed at producing poppy variations with preferentially only or few enriched alkaloids, and finally the cultivation of the plant for decorational purposes does the number of poppy-cultivars/-races goes into the hundreds (at least). Obviously, this method is only useful if you know which variation is currently grown in a certain area. This is usually investigated by police raids, taking field samples and checking either the alkaloid spectrum (eg. with GC-MS) or the genotype (more expensive).
b) Profiling of impurities coming from the synthesis (as Iodjini_dk suggested). In the particular case of heroin, this is a bit tricky, because its preparation consists apart from the isolation procedure usually only a single synthesis step. This single step can furthermore be accomplished with a very small range of avaible reagents. I don't think that I spill the beans when naming the most obvious choices: Acetic anhydride and acetyl chloride. For impurity profiling, forensic scientists usually rely on the analysis of residual traces of solvents, auxiliary bases and acids (used for the conversion of the freebase form into salts and vice versa).
In some regions (eg. NZ) certain methods for heroin preparation emerged that facilitate analysis due to their somewhat 'exotic' character. A keyword in this respect is the so-called 'homebake'-method.
c) Profiling of adulterants. The source of a drug is not necessarily limited to its place of cultivation (from the governmental point of view), but also includes trafficking routes. Because adulterants are usually not added at the first level of the production-distribution-chain, adulterant-profiling can help to identify shipping routes or the participation of a certain drug cartel. As a related example, think of the recent rise of levamisole as cutting agent in coke. Adulterant-profiling also helps to distinguish between home-made vs. clandestine-made (ie. large scale) heroin, because for the former readily manufactured preparations are frequently used (pills!). These contain either very specific adulterants (sometimes so specific that one can even name the specific brand, which was employed) or, which is quite suspicious on its own, next to no impurities at all (indicating pharmaceutically pure morphine as source).
Further details are kindly provided by the United Nations:
http://www.unodc.org/pdf/publications/report_st-nar-35.pdf