In the video game series Witcher, the protagonist is called Geralt of Rivia

by Player276

Rivia is both a country and a city(Capital). There are multiple cities in Rivia.

Was there any precedence of having a city/country as "part of your name" in medieval times for individuals that did not directly rule over the said city/region? If so, how would one go about getting this title?

BRIStoneman

The most obvious example that springs to mind is the legion of medieval clerics, academics and writers who adopt that naming convention; individuals like Alcuin of York, William of Malmesbury, Regino of PrĂ¼m, Geoffrey of Monmouth, Gerald of Wales etc. Gerald is technically Gerald de Barri, which is a titled name, but he adopted the pseudonym Giraldus Cambrensis for his writings.