I posted a request in august 2010 about moving the centroid. I got the answer and that solved my problem. Now, I have used gridmaker to slice up some files. My grids are 1/100 degree grids of certain states. So this has created hundreds of little triangles (not all right triangles do this, but all of the objects that are wrong are right triangles)whose centroids are outside of the object (barely out). So when I update column, I am getting incorrect results. I have tried restore centroid (J Paris MBX), but it does not seem to work on such small objects. I also converted the objects to polylines and back to regions and that failed to move the centroid inside the triangle objects. I tried to look up calculations for center of mass of an object instead of centroid or to replace the centroid returned by MapInfo, but I am apparently not smart enough to follow and code the formula. I also tried to edit the center point of the object, but that moved the entire object, not the centroid dot.
Since the right triangle object issue has been known for some time (Schmiez talked about the right triangle pitfalls in 2010), my question is this: Is there a formula I can use to calculate the center of mass of certain objects better than MapInfo does and actually change the location of the stored centroid?
If I don't like where MapInfo Pro places the centroid, why can't I easily change it? Is there a simple solution that I am just not seeing?
Mike Hankins
COUNTRY(r) Financial
Good afternoon,
Mike Hankins
COUNTRY(r) Financial
--
You received this message because you are subscribed to the
Google Groups "MapInfo-L" group.To post a message to this group, send
email to mapi...@googlegroups.com
To unsubscribe from this group, go to:
http://groups.google.com/group/mapinfo-l/subscribe?hl=en
For more options, information and links to MapInfo resources (searching
archives, feature requests, to visit our Wiki, visit the Welcome page at
http://groups.google.com/group/mapinfo-l?hl=en
-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2012.0.1873 / Virus Database: 2101/4644 - Release Date: 11/28/11
Buffer: -100 would give you an "inward" buffer of 100 units"
You can then extract the new centroid.
From the file menu: [Object] "Buffer"
Or
Right click context menu: [Edit Objects]: "Buffer"
This would be a nice time to be able to buffer by percentage instead of
static values, but maybe newer versions of MI allow this.
Thank you for helping me on this
Mike
Why put the centroid on the hypotenuse of the right triangle if the centroid is supposed to be INSIDE the object? Please put it INSIDE the object. End users update using objects ALL the time, which can return incorrect answers IF the centroid falls on the edge of the object. Please consider trying to fix this little issue for me.
Michael Hankins--MI Pro user since 1998
Mike, good
morning
I've
built a little code, it's only a testing part for another tool (oriented to
shape recognition). The code I attach can recognize multipolygon
regions: relation among polygons, area, perimeters and centroids
calculated with nodes of polygons, and totals for region. In the secction
'-----calcs Area & perimeters, cartesian method by nodes---- you can learn
the calculus to get centroids as mass-center. At the end this code prints, and you can
compare, calculated centroid and MapInfo centroid, which is restricted to
be within region.
Please, ignore the secction '---------Radii index (Boyle & ClarK) ------------, because is still under development and it's not relevant at all for you. When I finish my investigation about the right radii index I'll post here.
Hope this
helps
Sergi Gamiz
Ribelles
-----Mensaje original-----
De: mapi...@googlegroups.com [mailto:mapi...@googlegroups.com]
En nombre de Hankins, Michael D.
Enviado el: dilluns, 28 / novembre / 2011
19:45
Para: 'mapi...@googlegroups.com'
Asunto: [MI-L] Moving a
centroid-new problems