This palace has an area of 218,400 sq. metres and is surrounded
by walls built in 1783. The length of the four walls totals 1900
metres. Within these walls are situated government offices and
the Chapel Royal of the Emerald Buddha besides the royal residences.
When Siam restored law and order after the fall of Ayutthaya the
monarch lived in Thonburi on the other side of the river. Rama
I, immediately on ascending the throne, moved the centre of administration
to this side of the Chao Phraya; and, after erecting public monuments
such as fortifications and monasteries, built a palace to serve
not only as his residence but also his offices - the various ministries,
only one of which remains in the palace walls. This palace came
to be known as the Grand Palace, in which the earliest edifices
contemporary with the foundation of Bangkok were the two groups
of residences named the Dusit-Mahaprasard and the Mahamontien.
Source - http://www.thaistudents.com/guidebook/palace1.html