Hi Martin Thanks very much. Set coordsys table STOPS works! Before - Centroix() e.g. was returning 1.26075; now it returns 624176.62! So simple!
Typical of MI/MB Help in that you need someone to point you to the correct section (I'd been fishing for ages!). I don't think I would have come across that - CoordSys Clause, Syntax 4 I'm still a bit baffled by it though. Help says: "Use syntax 4 (CoordSys Table) to refer to the coordinate system in which a table has been saved. " So I'd've thought just that: it refers to it - nothing more. It doesn't say that it actually changes it. Furthermore, I issued the command again and assumed it would toggle the proj'n back to long'de, but it's stayed at 624176.62. But who cares now? Thanks again Terry -----Original Message----- From: Martin A Spiers [mailto:[EMAIL PROTECTED] Sent: 09 June 2005 08:46 To: Terry McDonnell Subject: RE: MI-L Simpleton's Question Re: Lat/Long and Object 62460 sounds like a OS national grid easting. 1.2607 sounds like a longitude value. You need to specify the coordinate system in order for the centroid(x) /(y) functions to return values in the correct projection. assuming your STOPS table has the correct projection this can be done from the MapBasic window by typing set coordsys table STOPS Britihs National Grid and Ordnance Survey coordinates should be the same. "Terry McDonnell" <[EMAIL PROTECTED] To: <[EMAIL PROTECTED]>, <[email protected]> .com> cc: Subject: RE: MI-L Simpleton's Question Re: Lat/Long and Object 08/06/2005 17:38 Thanks, Jon. That's the sort of func. I'm looking for. However, if you read my original message then you may have seen that I'd already ascertained what x and y were: 1.2607 and 51.9248. I didn't get those values via Centroidx/y() (can't remember how now!) but they are the vals that the funcs return. OK, I can use SQL Update to set my E & N vals (that was well understood) BUT what do I do about the fact that they are in different units, e.g E = 624640 (integer val in my table) whilst centroid X = 1.2607 (float)? My table is set up with co-ord system of British National Grid (BNG). I'm not sure how the British Ordnance Survey (OS) 6-digit X & Y co-ords fit in with E & Northings, and/or BNG I don't know if there is another func. to convert from one co-ord system to another. Take care Terry ________________________________ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 08 June 2005 16:16 To: Terry McDonnell Subject: Re: MI-L Simpleton's Question Re: Lat/Long and Object Terry, Set Easting (Centroidx obj) Set Northing (Centroidx obj) Update Selection Set Easting = (Centroidx (obj)) ,Northing = (Centroidy (obj)) Where RowID = cntr Or Something like that. Look in the Help for Centroids and Updating Tables. I don't know the exact code, and can't find it in the myriad of programs that I have written, but I have used this or something similar in several programs. Take Care, Jon --------------------------------------------------------------------- List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Message number: 16748
