Hello Duncan,

Unfortunately MapInfo/MapBasic only has CreateCircle(), CreatePoint(),
CreateLine() and CreateText() as object creation functions - the rest are
done with MapBasic statements which cannot be directly included in a SQL
query. However, there is a trick you can use to create a rectangle using the
Minimum Bounding Rectangle function. MBR() returns an object with the
smallest rectangle that contains another object. So, you can use
CreateLine() to make a line from one corner to the diagonal opposite and
then feed that to MBR().

First, make sure your MapInfo session is set to the coordinate system you
wish to work with. If that is British NGR, you can use the following in the
MapBasic window to adopt the coordinate system from an existing open table.

set coordsys table [AnOpenTable]

Replace [AnOpenTable] with the name of one of your open table that is in the
coordinate system you require.

Then, issue the command to build the rectangles:

update [YourTable] set obj = MBR(createline(x1, y1, x2, y2))

Replace [YourTable] with the table you wish to update and x1,y1,x2,y2 with
the field names for your rectangle coordinates.

Regards,
Warren Vick
Europa Technologies Ltd.
http://www.europa-tech.com

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Duncan
Sent: Monday, December 03, 2001 10:28 AM
To: MapInfo-L
Subject: MI-L Create Rect




Listers,

I have a table with a set of co-ordinates for a rectangle, HighX, Lowx, =
Highy, Lowy. Is there a function or some utility for creating these =
objects from this data in this table (eg Createrect???)

duncan

--------------------------
Duncan Elder
IBI Group
4 Lynedoch Place
Glasgow  G3 6AB
Tel.:  +44 (0)141 331 2525
Fax.:  +44 (0)141 333 1033
Email: [EMAIL PROTECTED]


IBI Group do not accept legal responsibility for the contents of this
message unless confirmed in writing by an authorised signatory.  Any =
views
or opinions presented are solely those of the author and do not =
necessarily
represent those of IBI. Access by the intended recipient only is
authorised. Any review, retransmission, dissemination or other use of, =
or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited.

NOTE: This e-mail message and attachments may contain privileged and
confidential information.  If you have received this message in error,
please immediately notify the sender and delete this e-mail message.





_______________________________________________________________________
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, send e-mail to [EMAIL PROTECTED] and
put "unsubscribe MapInfo-L" in the message body.



_______________________________________________________________________
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, send e-mail to [EMAIL PROTECTED] and
put "unsubscribe MapInfo-L" in the message body.

Reply via email to