As a house rule, we use sniper rifle ranges for spellcasting, since they're the longest intervals (Range Table, SR5 p.185). Normal environmental modifiers for visibility, light conditions, and range apply (Environmental Modifiers Table, SR5 p.175), and you can reduce the range penalty by one category with optical magnification (Environmental Compensation Table, SR5 p.175).