This problem just shows an inherent limitation of MapInfo. Mike sent me a
copy of this polygon, and it comes down to MapInfo's precision.

Yes, the centroid is outside the region, when you zoom in far enough to this
skinny spike its on. However, the grid-style precision that MapInfo has only
allows points to be placed at certain intervals. That's why it is important
to set your bounds to the minimum area of the object collection -- because
the number of invisible tic marks in the grid is fixed. So if you use
extents of the world, you spread those tic marks across the globe. If you
set your bounds at one state, county, etc, you get those same number of tics
compressed into a smaller area, thus more precision.

Change your bounds clause for the table you are working on (there is a tool
for this -- "Check and Set Coordsys Bounds"). Then change all your polygons
to polylines, then back again. This will re-calculate the centroids.

The fundamental problem in this case was really not the centroid calculation
so much as it was that MapInfo's "Check Regions" command needs to look for
spikes as well as self-intersections, overlaps and gaps.

Steve Wallace

----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Friday, March 30, 2001 04:33 AM
Subject: Vedr.: Re: MI-L Centroids of objects


>
> Hi Mike,
>
> If MapInfo Pro calculates the centroid, it's always inside the polygon(s).
> It might use the MBR mid point as 1st choice, but it'll move it inside the
> polygon if it has to. Try draw a "moon shaped" polygon to verify this.
>
> But you can "work around" that by exporting your table to MIF, change the
> "center" coordinates, and re-import. If a REGION in MIF has a centroid
> (center clause), it'll import that without error-checking it. Which off
> course will corrupt your data in some respects. Only if a "center" clause
> is absent, will MI Pro calculate one for you during import.
>
> You can use that to rectify your data. I.e.: export to MIF, remove all
> "center" clauses, and re-import. That's should get the data back on track.
>
> Best regards
> Lars Nielsen
>
> **********************************************************
> Lars Nielsen                                [EMAIL PROTECTED]
> Senior Programmer, MapXtreme iGIS Specialist
> Kampsax/MapInfo, Odense              http://www.mapinfo.dk
> Authorized MapInfo Distributor in Denmark & Norway
> Address: Rugaardsvej 55, DK-5000 Odense C
> Telephone: +45 6313-5000           Facsimile +45 6313-5090
> **********************************************************
>
>
>
>
>                     C & K Townsend
>                     <[EMAIL PROTECTED]>                Til:    Steve
Wallace <[EMAIL PROTECTED]>
>                     Sendt af:                            cc:     Mike
Hankins <[EMAIL PROTECTED]>,
>                     [EMAIL PROTECTED]
[EMAIL PROTECTED]
>                     onsmag.com                           Vedr.:  Re: MI-L
Centroids of objects
>
>
>                     30-03-01 09:02
>                     Besvar venligst til C & K
>                     Townsend
>
>
>
>
>
> Mike
> I'm a little inexperienced but I believe that Mapinfo creates a centroid
> by using something called a minimum bounding rectangle(MBR). In this
> scenario it is quite possible for Mapinfo to return a centroid position
> outside of the polygon in question. I know of no way around this.
> Regards
> Craig Townsend
> Guyra Shire Council
> NSW AUSTRALIA
>
> Steve Wallace wrote:
> >
> > Sounds like you have some spatial errors in this table. I've never seen
a
> > centroid outside an object. Even if you try and move a centroid outside
> an
> > object by hand, MapInfo will give you an error.
> >
> > Use MapCheck (for older MapInfo versions), or Objects > Check Regions
(in
> > newer) to see if there are any problems with these regions.
> >
> > To re-cast all the centroids in a table, you can make the layer
editable,
> > select all regions, convert all to polylines, then convert all back to
> > regions.
> >
> > Steve Wallace
> >
> > ----- Original Message -----
> > From: "Mike Hankins" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Thursday, March 29, 2001 12:01 PM
> > Subject: MI-L Centroids of objects
> >
> > > Hello,
> > >       I ran into a problem while updating a column.  The wrong
> territory
> > > value was being assigned to the object and I have figured it out that
> the
> > > centroid is outside of the polygon.  Is there a way to check a file to
> see
> > > if the centroid of a object is outside of the polygon for that object?
> I
> > > will have over 50 tables with as many as 3000 polygons in each table.
> Is
> > > there a way to update the columns without using a centroid based
> solution?
> > >
> > > Thanks to All,
> > >
> > > Mike Hankins
> > > COUNTRY Insurance and Finacial Services
> > >
> > >
> > >
> > >
_______________________________________________________________________
> > > List hosting provided by Directions Magazine | www.directionsmag.com |
> > > To unsubscribe, send e-mail to [EMAIL PROTECTED] and
> > > put "unsubscribe MapInfo-L" in the message body.
> >
> > _______________________________________________________________________
> > List hosting provided by Directions Magazine | www.directionsmag.com |
> > To unsubscribe, send e-mail to [EMAIL PROTECTED] and
> > put "unsubscribe MapInfo-L" in the message body.
>
>
>
> _______________________________________________________________________
> List hosting provided by Directions Magazine | www.directionsmag.com |
> To unsubscribe, send e-mail to [EMAIL PROTECTED] and
> put "unsubscribe MapInfo-L" in the message body.
>
>
>
>
>
>
> _______________________________________________________________________
> List hosting provided by Directions Magazine | www.directionsmag.com |
> To unsubscribe, send e-mail to [EMAIL PROTECTED] and
> put "unsubscribe MapInfo-L" in the message body.



_______________________________________________________________________
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, send e-mail to [EMAIL PROTECTED] and
put "unsubscribe MapInfo-L" in the message body.

Reply via email to