I think Jacques' solution is the simplest option but I don't think it
matters which projection you are using, as the table is already in the
original projection (being a copy of the original table).

Has anyone had problems with createpoint without setting the projection
first?  

One point to note with Jacques' solution is it may be necessary to pack the
table first otherwise the update will fail when it tries to get the
coordinate of a non-object record.  Alternatively you could select the
objects first before running the update command with

select * from your_copy where object into To_Change
update To_Change set obj=createpoint(centroidx(obj),centroidy(obj))

Cheers

Martin
==================================
Martin Roundill
GIS Manager
Waitakere City Council
Private Bag 93109
Henderson
Waitakere City
New Zealand

-----Original Message-----
From: Jacques Paris [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 17 February 2000 11:06
To: Rodolphe Devillers; [EMAIL PROTECTED]
Subject: RE: MI Batch - Polygons to centroids


Simply make a copy of your file then run from the MapBasicWindow :

update your_copy set obj=createpoint(centroidx(obj),centroidy(obj))

Make sure that you are working in the proper coordsys by running before

set coordsys table your_copy

I hope I am not too late!

Good luck

Jacques Paris

e-mail                alternate
     [EMAIL PROTECTED]   [EMAIL PROTECTED]

paris PC Consult (mainly MapInfo app.)
     www.total.net/~rparis/gisproducts.htm

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Rodolphe Devillers
Sent: February 16, 2000 10:56 AM
To: [EMAIL PROTECTED]
Subject: MI Batch - Polygons to centroids


Hi everyone,

I want to transform a MapInfo file which contain 12 000 of polygones
(buildings)
in a file which would include only the centroids of theses polygons
(points).
Do you know if there is a macro which could do that kind of action?

thanks a lot,

Rodolphe







********************************************************************
Rodolphe Devillers


 Centre de recherche en Géomatique (CRG)
Université Laval
0722 Pavillon Louis-Jacques-Casault
Québec (Québec),  G1K 7P4 Canada
Canada
Tel: (418) 656-2131 #3203
Fax: (418) 656-3607
[EMAIL PROTECTED]
Site Web CRG: http://www.crg.ulaval.ca/
Page Web: http://www.marinegis.com/
**********************************************************************
----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]

----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]
----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]

Reply via email to