Just as there are conventions about putting real people in fiction -- you can't ignore the historical record by changing known biographical facts such as death and birthdates -- there are unwritten rules about how you use geographical locations. Writers who violate them risk destroying their imaginary pact with readers. A writer such as Rankin has Rebus drinking in an actual pub and walking down real streets so that readers who know Edinburgh can identify landmarks and visualize themselves in the same setting. Then, based on that reality, the writer creates a fictitious but convincing crime scene.