Hi Uffe, Well, you into deep water here, but I'm sure you are aware of this fact ;-)
A easy way of delaign wit this problem would this: 1. Create a line from the point o the centroid() of the polygon 2. Erase the part of the line that is inside the polygon 3. Calculate the lenght of the polgon I'm sure this will not satisfy you, but as I said it's a easy - and quite quick - way of calcualting the distance. Now, If you really want to calculate the distance to a polygon, you need to find the shortest distance from the point to any boundary of the polygon, by offsetting the point onto each boundary of the polygon, like this:` .... ..... ..... ........... ................... ............................... Hey, you know what ? I was just browsing through my source code, and there is no fucking - excuse my languge - do you think I'm now expelled from MapInfo-L? - easy way of doing this. I have the code, but I'm not sure I want to actually share it in public as it is pretty large and comprehensive. Maybe I'll see you at the Danish User Conference, and I'll fill you in on the details! What do you say ? Best wishes from Trinidad and Tobago, where I'm working on a project - Great place by the way !!! Peter Horsb�ll M�ller GIS Developer Geographical Information & IT COWI A/S Odensevej 95 DK-5260 Odense S. Denmark Tel +45 6311 4900 Direct +45 6311 4908 Mob +45 5156 1045 Fax +45 6311 4949 E-mail [EMAIL PROTECTED] http://www.cowi.dk/gis Sidste frist for tilmelding til MapInfo Konferencen er den 25. august 2004. Tilmelding samt yderligere information kan ses p�: http://www.cowi.dk/GIS -----Original Message----- From: Uffe Kousgaard [mailto:[EMAIL PROTECTED] Sent: Saturday, August 14, 2004 6:18 AM To: [EMAIL PROTECTED] Subject: MI-L Point-2-Region distance I want to find the distance from a point to a region (likely with holes). Is it correct, that mapbasic doesn't have an function for that? And it is not the distance to the centroid that I'm looking for :-) Regards Uffe --------------------------------------------------------------------- List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Message number: 12961
