0

I have a set of points in 2 dimension plan : A(x1,y1), B(x2,y2), C(x3,y3) ....

How can I know which point of these points (A,B,C, ...) is the centroid of the other points

Vince
  • 20,017
  • 15
  • 45
  • 64
  • 1
    Using what GIS software? What have you tried? – BERA Apr 01 '20 at 15:21
  • 1
    Here's a workflow from Andy Eschbacher that we've used: https://carto.com/blog/center-of-points/ – DPSSpatial_BoycottingGISSE Apr 01 '20 at 15:23
  • @DPSSpatial the center is one of those points, I only want to know which one of them is the centroid, the points are are in GIS format (lat, lon) but it is not a problem I can consider the earth as flat plan. (This is for a program that is going to help reducing the spread of covid virus) – Mehdi Souregi Apr 01 '20 at 15:38
  • I would use numpy, see https://stackoverflow.com/questions/23020659/fastest-way-to-calculate-the-centroid-of-a-set-of-coordinate-tuples-in-python-wi. Iterate over each coordinate, exclude it from the Array of coordinates, calculate centroid, check if the excluded coordinate match the returned value from function. I would add an answer if the question was not closed. – BERA Apr 01 '20 at 15:40
  • one last question, if i do compute the centroid of all the points (centroid included) Will it be equal to the centroid itself ? – Mehdi Souregi Apr 01 '20 at 16:40
  • 1
    @BERA to get question re-opened it should be edited to describe why it is different to the duplicate and the review queue convinced that to be the case. – PolyGeo Apr 01 '20 at 22:27
  • 2
    I can not edit it since I am a new member, thats what I don't like in stackoverflow, sometimes you get your question closed just because people did not try to read the question carefully, and sometimes you get downvotes without any comments explaining why – Mehdi Souregi Apr 01 '20 at 22:36
  • @PolyGeo: From what i understand it is not a duplicate since it is not about calculating centroid for all Points but to find if anyone is the centroid. Then each Point need to be excluded from the calculation (I Think..), then calc centroids for all but the excluded one, then check if they match. But anyway OP is showing no own effort (hence the downvote from me) and the question is a bit broad without any software tag so it should probably be closed anyway. Maybe it is on-topic for https://math.stackexchange.com/ – BERA Apr 02 '20 at 06:45
  • @MehdiSouregi why are you unable to edit your own question? You should be able to edit that, and to suggest edits to the question of anybody else too. – PolyGeo Apr 02 '20 at 07:51
  • 1
    @BERA I thought calculating the centroid would be the first step (hence the duplicate) and the other being to look for it in the list of points (with number of decimals to check specified). – PolyGeo Apr 02 '20 at 07:55
  • @PolyGeo I can edit the question but no chance to reopen it again and I have a question : if i do compute the centroid of all the points (centroid included) will it be equal to the centroid itself? – Mehdi Souregi Apr 02 '20 at 11:07
  • Without editing I don’t think your question will re-open. With editing it will be up to the review queue unless the edit convinces one of our eight moderators to vote for it. – PolyGeo Apr 02 '20 at 12:18

0 Answers0