Both large-eddy simulations (LES) and water-tunnel experiments, using simultaneous stereoscopic particle image velocimetry and laser-induced fluorescence, have been used to investigate pollutant dispersion mechanisms in regions where the surface changes from rural to urban roughness. The urban roughness was characterized by an array of rectangular obstacles in an in-line arrangement. The streamwise length scale of the roughness was kept constant, while the spanwise length scale was varied by varying the obstacle aspect ratio l/ h between 1 and 8, where l is the spanwise dimension of the obstacles and h is the height of the obstacles. Additionally, the case of two-dimensional roughness (riblets) was considered in LES. A smooth-wall turbulent boundary layer of depth 10h was used as the approaching flow, and a line source of passive tracer was placed 2h upstream of the urban canopy. The experimental and numerical results show good agreement, while minor discrepancies are readily explained. It is found that for l/ h = 2 the drag induced by the urban canopy is largest of all considered cases, and is caused by a large-scale secondary flow. In addition, due to the roughness transition the vertical advective pollutant flux is the main ventilation mechanism in the first three streets. Furthermore, by means of linear stochastic estimation the mean flow structure is identified that is responsible for street-canyon ventilation for the sixth street and onwards. Moreover, it is shown that the vertical length scale of this structure increases with increasing aspect ratio of the obstacles in the canopy, while the streamwise length scale does not show a similar trend.