The simplest method would probably be in a SQL query.

You can use the Avg or WtAvg functions built in to MapInfo's SQL to
calculate the averages or weighted averages of the points' X and Y
coordinates.

You can either build a where clause for a particular value of a particular
column, or group by the column to get a centroid for each value.

For example:

SELECT Avg(CENTRoidX(obj)), avg (CENTROIDY(obj)) from PROD wherE obj and
(OYSTERBAR='Mill Creek 3')

Or:

SELECT WtAvg(CentroidX(obj),OYSTERS),WtAvg(CentroidY(obj),Oysters) from PROD
where obj group by OYSTERBAR

Afterwards, you would simply save the query results to a permanent table and
create points for the new table.

Hope this helps
Spencer




-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Andrew
Tracey
Sent: Monday, February 27, 2006 10:09 AM
To: [email protected]
Subject: [MI-L] Creating Points

Can anyone help?

I have a series of points in a MapInfo tab file, some of which share the
same attributes, I can query to select all of these but does any know of a
way of creating a centroid based on all of the points which share the same
attribute?

Thanks
Andrew Tracey
Information Support Officer
Corporate Information
Corporate Development
South Tyneside Council
Westoe Road
South Shields
NE33 2RL

Tel: 0191 4247561
E-Mail : [EMAIL PROTECTED]


****************************************************************************
********************
****************************************************************************
********************
Please do not print this e-mail if you can help it - and help protect the
environment.
****************************************************************************
********************
This Message may contain confidential information and is protected by
copyright.
If you receive it in error please notify us and delete it without making use
of or copying it.
The addressee and other employees within the Council may read and copy any
e-mail reply to this message and other e-mails you send to us.
Whilst we use virus checking procedures we accept no liability for viruses
and recipients must rely on their own virus checking procedures.
****************************************************************************
********************
The Council's web site address is www.southtyneside.info

_______________________________________________
MapInfo-L mailing list
[email protected]
http://www.directionsmag.com/mailman/listinfo/mapinfo-l



_______________________________________________
MapInfo-L mailing list
[email protected]
http://www.directionsmag.com/mailman/listinfo/mapinfo-l

Reply via email to