Just a thought for consideration but what if you stuck it in a loop. Before the loop have a variable that captures the lines length. Then Count the number of nodes. Lets say your line has five nodes to start with. Insert the point at position 2 test and see if the line is longer than it's original length if it is remove the node and try position 3 and so on. When you hit the position at which the line length is equal to it's original length then you know you have it in the correct segment so exit the loop. If your line segments have less than a few hundred nodes that should run fairly quick. This was the first solution that jumped at me so I figured no harm in trying. Also you will want to run the loop for an integer = 2 to ((the number of nodes) - 1) using the integer as the position to insert at and test, as you don't want it in the first or last node position because that wouldn't have given you an intersection to start with.
-----Original Message----- From: Witte, Ulrike [mailto:[EMAIL PROTECTED]] Sent: Monday, February 03, 2003 5:13 AM To: '[EMAIL PROTECTED]' Subject: MI-L calculate intersections and insert them in polylines Hello list, I want to write a programm that calculates the points of intersection between polylines and insert those calculated crossing points into both lines. The mapinfo function IntersectNodes() returns a polyline object that contains those specified points of intersection. I thought afterwards I could use the mapinfo statement AlterObject to include those points in the original polyline. But how do I get to know the position (one or more) in the polyline where the crossing points must be added ? Any ideas ? Thanks for any help Mit freundlichen Gr��en microm Micromarketing-Systeme und Consult GmbH Ulrike Witte Hellersbergstr. 14 41460 Neuss Phone: 02131-10 97 51 Fax: 02131-10 97 77 mailto:[EMAIL PROTECTED] Aktuelles: Immer am Ball? Einmal pro Quartal erscheint der microm eNewsletter, der Sie aktuell ueber die neuesten Entwicklungen bei microm rund um unsere Daten, Systeme und Dienstleistungen informiert. Einfach eine kurze E-Mail mit Name und E-Mail Adresse an <mailto:[EMAIL PROTECTED]?subject=Newsletterabo> senden! Die naechste Ausgabe erhalten Sie dann Anfang Maerz. ____________________________________________________________________________ __ Diese Nachricht wurde elektronisch versandt und ist daher auch ohne Unterschrift rechtsg�ltig. Der Inhalt dieser E-Mail enth�lt vertrauliche Informationen. Das Kopieren und die Weitergabe an Dritte ist nicht gestattet. Sollten Sie diese E-Mail irrt�mlich von uns erhalten haben, bitten wir Sie, diese zu vernichten und uns dar�ber zu informieren. Im Voraus vielen Dank. ____________________________________________________________________________ ____ --------------------------------------------------------------------- List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Message number: 5315 --------------------------------------------------------------------- List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Message number: 5325
