Hi Chris I'm not aware of any short cuts MapBasic can help you with.
You need to consider if you want the great circle (spherical) distance or straight line (cartesian) distance. Also do you want to take into account any known Z values ie slope distance. I hope there is a shorter way for you, but the only way I can think of at present is a bit longwinded. This would be first to write a function to get the distance between two lines. Having done this then write a routine to compare every line within one polyline with every line within the second polyline. The function to compare one line with another line would need to first check if they intersect ( ie distance = 0 ), then if not calculate distances from each end of one line with each end of other, and finally drop a perpendicular from each end of one line to the other line ( and check if the perpendicular position lies on the line, or an extension of the line - if an extension leave it out). You could use the MapBasic Distance command for point to point, particularly if you want spherical distance, but I don't think MapBasic offers much more than this. You could use an iterative solution using "buffer", but I think the direct method would be better. Its probably a couple of hours work, so worth waiting to see if any other listers know of any short cuts over this longwinded way!! Regards Bob @www.MapsByDesign.co.uk In message <[EMAIL PROTECTED]>, Christophe Brabant <[EMAIL PROTECTED]> writes > Hi everyone > > How could I compute, with Mapbasic language, the lowest distance > between two polylines ? > > Thank you > > Chris >_______________________________________________ >MapInfo-L mailing list >MapInfo-L@lists.directionsmag.com >http://www.directionsmag.com/mailman/listinfo/mapinfo-l -- bob young _______________________________________________ MapInfo-L mailing list MapInfo-L@lists.directionsmag.com http://www.directionsmag.com/mailman/listinfo/mapinfo-l