Dear Qiaomei You may be interested in our free MapBasic app called MINDIST that tries to solve problems like yours.
MINDIST works with two input tables "Clients" (which must contain point objects) and "Services" (which must contain either point objects exclusively or a mix of line/polyline/region objects). For each "Client" point MINDIST executes an expanding radial search until it finds at least one nearby "Service" then searches all the candidate Services for the nearest point or the nearest location on the nearest edge. Output is a third table containing the names (from col 1) of the Client-Service pair, the distance between them and a 2-node line object connecting the Client to the Service MINDIST works with any Long/Lat or UTM projection, but both Client and Service table should have identical projections. Limitations: 1. MINDIST wont work correctly if your services are multi-section polylines, like divided highways or multi-section polygons like lakes with island in the middle. (MINDIST only examines the first section of candidate polylines/polygons) 2. MINDIST is slow to execute if your "services" are multi-thousand node polygons or polylines such as detailed rivers and lakes . Thinning them first can save hours! Attached is a screen shot showing the output of a test run with "Sporting Ovals" as the client and "Lake boundary" as the service. If you'd like to try MINDIST and you have a MapBasic compiler then just ask and I'll send you the source code file. Regards David M Haycraft Information Analysis Associates Pty Ltd Aust Capital Territory, Australia Email: [EMAIL PROTECTED] Web : www.acslink.aone.net.au/actaa/iaa.htm ----- Original Message ----- From: "Fu, Qiaomei" <[EMAIL PROTECTED]> To: "'MI-List'" <[EMAIL PROTECTED]> Sent: Tuesday, 17 September 2002 23:54 Subject: MI-L the shortest distance from a point to polygon > Hello, All, > > Does anyone know that MapInfo/MapBasic provide the function of calculating > the shortest distance from a point to a polygon? > > The problem is that we have a geocoded point table associtated with street > address, zipcode, longitude & latitude, etc attributes, and Q3 data > (including the flood zone polygons) for the same area. We try to find out > the shortest distance from each point to the flood zone. Any suggestions or > clues? Thanks. > > > Qiaomei > > > > --------------------------------------------------------------------- > List hosting provided by Directions Magazine | www.directionsmag.com | > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > Message number: 3078 >
--------------------------------------------------------------------- List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Message number: 3090
