Clustering is an important task in spatial data mining and spatial analysis. We propose a clustering algorithm P-DBSCAN to cluster polygons in space. PDBSCAN is based on the well established density-based clustering algorithm DBSCAN. In order to cluster polygons, we incorporate their topological and spatial properties in the process of clustering by using a distance function customized for the polygon space. The objective of our clustering algorithm is to produce spatially compact clusters. We measure the compactness of the clusters produced using P-DBSCAN and compare it with the clusters formed using DBSCAN, using the Schwartzberg Index. We measure the effectiveness and robustness of our algorithm using a synthetic dataset and two real datasets. Results show that the clusters produced using P-DBSCAN have a lower compactness index (hence more compact) than DBSCAN.