# Spatially constrained geospatial similarity

What's the current methodology for clustering geospatial data by features?

Example: I have some demographic dataset. Let's say this contains average home price and population density.

So, an example correlation here would be home price vs population density. But, the trick is how the clustering gets pulled. For example, an affluent area with high population density isn't the same as one with low population density. Applying a basic distance metric wouldn't take this into account since low vs highs could offset each other giving similar distances. This leads me to possibly some form of weighted clustering to pull centroids.

Not sure what methodology takes this into account.

• I’m not sure I understand your example of differences in one feature offsetting distances in another feature. Assuming your features are relatively orthogonal, this shouldn’t be possible. Could you please let us know what tour of clustering you have tried and why you don’t think it’s working? Jun 27 '20 at 21:57

L1(a, b) = sum_x |x_a - x_b|