In 1788 Raleigh was chosen as the site of the new capital, as its central location protected it from attacks from the coast