Origins of medieval towns in temperate Europe