well consider this, MINX is different to BEGX.  for instance what if your
line goes from east to west?  this would mean BEGX is greater than MINX.

but yeah, i should have been more precise orignally and stated that FORMAT$
would only DISPLAY the data with the required decimal precision.  if your
variables are of FLOAT type, then even though "PRINT minlon" might only
display 3 decimal places, the variable has full accuracy for processing.

if however you are outputting to a text field, as it appears you are in the
final instance, that is when you need to format the output.

ps. you might wish to go for 6 decimals if you can.  it's been a fair while
now so i can't remember the real figures, but i did a lot of testing ages
ago with bus stop data and decimal accuracy (search through MI-L from a year
or so ago for rounding errors and such), and re-generating points with only
3 decimal places put the data up to about 100 metres off, and 4 decimal
places was up to say 30 or 40 metres away from original, with a seemingly
random dispersion.

-----Original Message-----
From: Scott Walsh [mailto:[EMAIL PROTECTED]
Sent: Thursday, 20 November 2003 3:15 AM
To: [EMAIL PROTECTED]
Cc: Simmonds, Ashley (PTB); [EMAIL PROTECTED]
Subject: Re: MI-L ObjectGeography


Thanks Ashley and Mark for your response!  Here is what I ended up doing:

            minlon = ObjectGeography(editbox.obj, OBJ_GEO_LINEBEGX)
            maxlon = ObjectGeography(editbox.obj, OBJ_GEO_LINEENDX)
            minlat = ObjectGeography(editbox.obj, OBJ_GEO_LINEBEGY)
            maxlat =ObjectGeography(editbox.obj, OBJ_GEO_LINEENDY)

  sendtext = "TB," + STR$(trigger_id) + "," + FORMAT$(minlat,"#.####") + 
"," + FORMAT$(minlon,"#.####") + "," + FORMAT$(maxlat,"#.####") + "," + 
            FORMAT$(maxlon,"#.####")

For whatever reason (mystery to me) using OBJ_GEO_MINX wasn't giving me 
my desired results. Instead I used OBJ_GEO_LINEBEGX...etc. and it gave me
the four digits after the decimal (which is what I wanted).

Thanks!
Scott

Simmonds, Ashley (PTB) wrote:

>use FORMAT to specify decimal accuracy:
>
>###################################
>minlon = format$(objectgeography(editbox.obj,OBJ_GEO_MINX),"0.000000")
>###################################
>
>ash
>
>-----Original Message-----
>From: Scott Walsh [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, 19 November 2003 11:58 AM
>To: [EMAIL PROTECTED]
>Subject: MI-L ObjectGeography
>
>
>List,
>
>I'm having a problem with the result I am getting using the below code. 
>When I am on the East Coast of the US I am getting precision to 4 
>decimals points for my minlon and maxlon, but when I'm using maps in 
>California I am only getting precision to 3 decimals points. This is all 
>on the same map so I'm confused why I am seeing this. Any help would be 
>greatly appreciated.
>
>            minlon = ObjectGeography(editbox.obj, OBJ_GEO_MINX)
>            maxlon = ObjectGeography(editbox.obj, OBJ_GEO_MAXX)
>            minlat = ObjectGeography(editbox.obj, OBJ_GEO_MINY)
>            maxlat = ObjectGeography(editbox.obj, OBJ_GEO_MAXY)
>
>THANKS!!!
>Scott Walsh
>State College, PA
>
>
>---------------------------------------------------------------------
>List hosting provided by Directions Magazine | www.directionsmag.com |
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>Message number: 9212
>
>---------------------------------------------------------------------
>List hosting provided by Directions Magazine | www.directionsmag.com |
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>Message number: 9213
>
>
>  
>


---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 9229

Reply via email to