Okay, Terry, I can see your point about not going down the ODBC road.
Jon, has the right answer, you just need to add the Set CoordSys to specify
which coordsys you want the coordsys in.
Function UpdateColumnsFromOBJ
Set CoordSys STOPS
Update STOPS
Set X = CentroidX(OBJ),
Y = CentroidY(OBJ)
Commit Table STOPS
End Function
HTH,
Peter Horsb�ll M�ller
GIS Developer
Geographical Information & IT
COWI A/S
Odensevej 95
DK-5260 Odense S.
Denmark
Tel +45 6311 4900
Direct +45 6311 4908
Mob +45 5156 1045
Fax +45 6311 4949
E-mail [EMAIL PROTECTED]
http://www.cowi.dk/gis
-----Original Message-----
From: Terry McDonnell [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 08, 2005 6:38 PM
To: [EMAIL PROTECTED]; [email protected]
Subject: RE: MI-L Simpleton's Question Re: Lat/Long and Object
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: 16734