Constrained optimization for addressing spatial heterogeneity in principal component analysis: an application to composite indicators