I'm calculating the centroids for a polygon (the city of Morelia in Mexico), but the coordinates that I'm getting are not inside the polygon and are way off from where the polygon is. What could be happening? Are the coordinates from the centroid given in a different forma? (The ones I'm getting are x= 2575360 and y=852065.8)
I used Stata to double check and I'm getting the same result.
Thanks!
A centroid need not be within a polygon, Consider a C or U shaped object we just expect it to be, but mathematically that need not be the case.
If you have an advanced licence you can calculate 'centroid' features one the standard and the other that does some fiddling (label point) that makes the centerish point inside
Thanks Dan, I'll check what kind of license we have and try and use the feature to point. However, I still don't understand how the centroid of a closed polygon (a city in this case) could lie outside of it and seem to be so far off. My guess is that the coordinates I'm getting are in some other format and that that's why I'm getting such an odd result.
well the other way... consider two perfect similar circles on opposite sides of a river. The two parts could form a multipart polygon, called your city. Multipart features consist of seemingly separate geometry where in actual fact they form a whole and occupy only one record in the table. I would venture that the centroid is now wet since it would reside in the middle of the river
Add two new fields to your polygon file and calculate the centroid coordinates, using calculate geometry. You can control what CRS the coordinates use.