----- Original Message -----
From: "Jacques Paris" <[EMAIL PROTECTED]>
To: "MIL" <[EMAIL PROTECTED]>
Sent: Friday, September 14, 2001 2:58 PM
Subject: MI-L dimensions of an ellipse


> How could one retrieve the dimensions (main axes) of an ellipse object?
>
> If I use the MBR to obtain these values, they are noticeably larger that
> those given by the object info double click. Ex, object double click:
> 0.015812 - 0.015884 (radius*2) and from the MBR: 0,01708 - 0,01717 (height
> and width of rectangle). The ellipse is clearly smaller than the oversized
> MBR on the map
>
> MI 6.0 with a non projected map.
>
> With a MTM projection, the differences are less visible click: 1.9298 -
> 1.9354    MBR: 1.930 - 1.935.

Are your numbers in degrees or some distance unit?

The only success I've had for widths and heights of Rect, ellipse, text, and
other objects based upon an MBR has been to use the distance() function
to measure across the horizontal and vertical center exes of the object.
Even this method has its problems.

Thus:

sub ObjectDimensions (o as object, xw as float, yw as float, ByVal u as
string)

dim x1 as float
dim y1 as float
dim x2 as float
dim y2 as float

x1 = ObjectGeography (o, OBJ_GEO_MINX)
y1 = ObjectGeography (o, OBJ_GEO_MINY)
x2 = ObjectGeography (o, OBJ_GEO_MAXX)
y2 = ObjectGeography (o, OBJ_GEO_MAXY)
xw = distance (x1, (y1+y2)/2, x2, (y1+y2)/2, u)
yw = distance ((x1+x2)/2, y1, (x1+x2)/2, y2, u)
end sub

HTH
Spencer



_______________________________________________________________________
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