The following MB code uses an ever increasing circular buffer to look for 5
nearest objects in BaseTable. BaseTable is a non-earth projection in metres.


If the buffer centroid is (5,20) it works fine. If its (4.5,19.5) the search
doesnt find any objects and gets stuck in a continuous loop. Any ideas
why?!!

Many thanks..

Phil
--------------------------------------------------


        Set Coordsys Table BaseTable
        Set distance units "m"

        Create Point (4.5,19.5)
        o_pnt = CreatePoint(4.5,19.5)

        f_bandopt = 5

        Do
                o_buffer = Buffer(CreatePoint(4.5,19.5), 20, f_bandopt, "m")

                Select centroidx(obj), centroidy(obj)
                        from BaseTable
                        where (o_buffer contains object) 
                        into SearchResults

                i_foundpnts = SelectionInfo(SEL_INFO_NROWS)


                f_bandopt = f_bandopt * 2


        Loop until i_foundpnts >= 5



_______________________________________________________________________
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