The picture shows the early city in 1800.
Was D.C. built on a swamp? The best short answer is: No. The original site of the City of Washington, which encompasses all the lettered streets and extends from Rock Creek to the Anacostia, is best described as old farmers‘ fields and forests well watered with springs, two creeks and two rivers. Both the creeks and rivers experienced tidal fluctuations and seasonal flooding. In the early development of the city the draining of lowlands was not a priority. After deforestation and the cessation of farming, as the city developed the danger of inadequate drainage, especially around poorly executed building projects, became more apparent. However, the development of extensive mud flats and marshes came later in the 19th century caused primarily by the increased sediment carried by the Potomac and Anacostia Rivers due to increased settlement and farming upstream.
It is true that some visitors and residents of the city circa 1800 described parts of the city as a swamp, and that some memoirs of the city recalled a swamp especially along Pennsylvania Avenue. However, this was more of a characterization of parts of the city arising from the varied terrain, rather than a statement of geographical fact. A walk through the city today can still help one get a sense of the lay of the land in 1800. Apart from the obvious vantage points establishing the height of the city: the north lawn of the White, the F Street ridge and Capitol Hill, it is important to note the rise in land south of Constitution Avenue, and to look west on G Street from its interection with 20th Street NW. Recalling that in 1800, Tiber or Goose Creek flowed where Constitution Avenue runs, and that looking west on G Street revealed a wider Potomac River well below, you can sense that in 1800 the general impression of the city was its command of all its waterways, not any sense of innundation by them.