Cameron The MapInfo functions CentroidX(obj_expr ) and CentroidY(obj_expr ) are not as "transparent" as, say, the trig function Sin(theta).
Although both CentroidX/Y() and Sin() have a single input value and return a single numeric output value, the Centroid functions also have a second, implicit, parameter know as the "MapBasic coordinate system". By default, this parameter is set to "Unprojected Longitude/Latitude". The WGS84 table (new_table) that you created certainly contains point objects in the "Long/Lat WGS 84" coord system. Before using the Centroid functions to expose the numeric coordinate values in WGS 84 you must set the MapBasic coord system to "Long/Lat WGS 84" using the Mapbasic statement "set coordsys..." Try this in the MB window: set coordsys table new_table update new_table set Lat84 = centroidy(new_table.obj), Lon84 = centroidx(new_table.obj) Regards David M Haycraft Information Analysis Associates Pty Ltd ABN 47 085 516 105 1 Cumming Place, Wanniassa, 2903 Aust Capital Territory, Australia Phone/Fax: 61 + 2 + 6231 8104 Mobile: 0412 001 134 Email: [EMAIL PROTECTED] Web : www.acslink.aone.net.au/actaa/iaa.htm A MapInfo Technology Partner ----- Original Message ----- From: "Cameron Crum" <[EMAIL PROTECTED]> To: "MapInfo List" <[EMAIL PROTECTED]> Sent: Thursday, 13 June 2002 04:10 Subject: MI-L Coordinate conversions > > I must have done this a hundred times in the past so > I think I might be going crazy, but here it is. I > have a file of data points collected in Nad27. I need > to convert them to WGS84. I open the original file > and create points using the NAD27 projection. I then > save a copy of the file specifying the WGS84 > projection to the new file. I then close the Nad27 > table and open the WGS84 table. I then add two new > columns Lat84 and Lon84 to the WGS84 table. I then > open an MB window and type: > > update new_table set Lat84 = centroidy > (new_table.obj),Lon84 = centroidx(new_table.obj) > > The cloumns update, but with exactly the same numbers > as the original Nad27 coordiantes. How can this be? > I'm confused. I've done this a hundred times between > Nad83 and Nad27 and it always works. What Am I doing > wrong? > > Cameron > > --------------------------------------------------------------------- > List hosting provided by Directions Magazine | www.directionsmag.com | > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
