A whole lot less to do with
heroin than you might think.
This phrase is primarily used to refer to those with an unhealthy obsession with the minutiae of a rather single-minded (and often boring to others) interest or hobby.
Use of the term "trainspotter" these days tends to be restricted to record collectors, as it is almost possible to appear normal to others despite such a crippling affliction as obsessive record collecting.