The community of Catalonia is autonomous from the Spanish government .
Barcelona ( , ) is the capital and largest city of Catalonia ( an autonomous community of Spain ) with a population of 1.6 million within city limits .