Andrew,
There is probably a procedural/manual way of doing this via a series of
manual selections using geographic functions in your selections. A
better was is via mapbasic.  Here is some mapbasic to get you started if
mapbasic is an option for you.
Disclaimer:I just typed it out and have not run it so its probably full
of bugs.



'begin code
'Make sure you have packed the squared_regions table
'The following will get all the values you want into an array.  From
there you can push them into another table

Type matrix
        bottomleftx as float
        bottomlefty as float
        toprightx as float
        toprighty as float
        thecentroid as float
        id as integer
End Type

Dim squaresarray(1) as matrix
Dim i as integer
Dim thisobj as object

Select * from squared_regions
Fetch First from Selection      
For i = 1 to SelectionInfo(Sel_info_Nrows)
        thisobj = Selection.obj
        redim squaresarray(i)           
        squaresarray(i).bottomleftx = ObjectGeography(thisobj,Geo_Min_X)
        squaresarray(i).bottomlefty = ObjectGeography(thisobj,Geo_Min_Y)
        squaresarray(i).toprightx = ObjectGeography(thisobj,Geo_Max_X)
        squaresarray(i).toprighty = ObjectGeography(thisobj,Geo_Max_Y)
        squaresarray(i).thecentroid = Centroid(thisobj)
        squaresarray(i).id = Selection.A        'assuming A is the id
column in your squared_regions table
        Fetch next from Selection       
Next  

' at this point you would create a new table and extract the values from
the array into it
' optionally you could directly populate another table by altering the
code above to do so
'end code


'good luck,
' Steve





-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Andrew
Tracey
Sent: Tuesday, May 02, 2006 4:24 AM
To: MapInfo-L@lists.directionsmag.com
Subject: [MI-L] SQL Querying

Dear All

I have a MapInfo table, which consists of 200+ squared regions. I want
to query to find out the bottom left X,Y coordinate and the top Right
X,Y coordinate, plus a centroid and the id number from column A, does
anyone know if this is possible.

Thanks in advance

Andrew Tracey
Information Support Officer
Information Team
Chief Executive Office
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 email and any files transmitted with it are confidential and
intended solely for the named recipient.  If you have received this
e-mail in error, please immediately notify the sender by e-mail and
delete from your system, you are not permitted to disseminate, store,
disclose or copy.  E-mail transmission cannot be guaranteed to be secure
or error-free as they could be intercepted, corrupted, lost, destroyed,
arrive late or incomplete, or contain viruses and therefore the Council
accept no liability for any such errors or omissions.  Views or opinions
expressed in this email are solely those of the author and do not
necessarily represent those of the Council.South Tyneside Council, Town
Hall & Civic Offices, Westoe Road, South Shields, Tyne & Wear, NE33 2RL,
Tel: 0191 427 1717, Website: www.southtyneside.info
************************************************************************
************************
The Council's web site address is www.southtyneside.info 

_______________________________________________
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l

______________________________________________________________________
This e-mail has been scanned by Verizon/MessageLabs Managed Email
Service.



______________________________________________________________________
This e-mail has been scanned by Verizon/MessageLabs Managed Email Service.

_______________________________________________
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l

Reply via email to