The paper is focused on the analysis of immigrant population with particular reference to their spatial distribution and the tendency to cluster in some parts of a city, with the risk of generating ethnic enclaves or ghettoes. Methods used in the past to measure segregation and other characteristics of immigrants have long been aspatial, therefore not considering relationships between people within a city. In this paper the attention is dedicated to methods to analyse the immigrant residential distribution spatially, with particular reference to density-based method. The analysis is focused on the Municipality of Trieste (Italy) as a case study to test different methods for the analysis of immigration, and particularly to compare traditional indices, as Location Quotients and the Index of Segregation, to different, spatial ones, both based on Kernel Density Estimation functions, as the S index and the first version of an Index of Diversity.