Interview with Martha Wells
I use different methods for different types of book. For the Ile-Rien books, where the locations are based more on real-world places, I did a lot of research into cities in similar cultures, climates, environments as my imaginary city. For the Raksura books, I tried to think of a neat setting for a city, then tried to make it as weird and extreme as possible. Like the Turning City, Keres-gedon, which started out as just a camp in the mountains.
Basically it's a process of coming up with an element you want in your city, like canals. You look at cities with canals, like Venice, and maybe Angkor Wat. What are the canals used for? Transportation, a reservoir, entertainment, defense, etc. You think about how the environment and climate of your city is going to affect your canals. Can they freeze over? Are they affected by drought? Sewage? Plant growth? Underwater monster issues? Etc. Why or why not are they affected by these things? Once you make all those decisions, you decide how they affect the inhabitants of the city, their culture, their everyday life. It can be simple or complicated, and ideally, it leads to ideas that can further characterization and plot. And the big thing to remember is that the reader doesn't need to know everything you know about your canal system. They'll be able to infer a lot from the bits and pieces they see as your characters move through the story, and the sense that the city is operating by a logical system is more important than knowing the exact details.
I also don't usually figure out too many of the details of my settings in advance, since I'm going to concentrate mainly on the parts my characters are interacting with. Like most of the city may be sketched in, but the characters are going to need this little train system and this temple hospital, so those bits are going to get more attention and development. Also keep in mind that cities change over time, with new buildings, new roads, and what stays in place and what gets built over or torn down all say things about the people who live there.
It also helps not to set too many boundaries. You never want to tell readers that there's nothing over the mountains, because it's going to make the world feel closed in, like a puddle instead of a huge mysterious ocean. And if you keep writing in this setting, you may eventually need those empty places to put things in.