added consistent centroid IDs (no gaps in numbering).