To extract start and end points of polylines you should use the 
ObjectNodeX(obj, segment, node) and ObjectNodeY(obj, segment, node) functions

This will only work for single segment polylines as there is no (easy) way you 
can tell which is the start/end point on multi segment polylines:

Update MYTABLE 
        Set     STARTX = ObjectNodeX(obj, 1, 1),
                STARTY = ObjectNodeY(obj, 1, 1),
                ENDX = ObjectNodeX(obj, 1, ObjectInfo(obj, 20)),
                ENDY = ObjectNodeY(obj, 1, ObjectInfo(obj, 20))

HTH,
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


-----Original Message-----
From: Matt Carlson [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 15, 2005 3:26 PM
To: MapInfo-L ([email protected])
Subject: MI-L Extracting Start and End Co-ordinates from polylines


Hello,

I'm trying to extract Start and End Co-ordinates from polylines.

I know Jaromir Svasta's p2p.mbx will extract all vertices from polylines, but I 
only want start and end points of the polyline (there is no way of establishing 
which are start/end and which are intermediate points...)

I have tried extracting ObjectGeography, but I keep getting the MBR 
co-ordinates of the polyline, not the start and end...

Anyone got any ideas?

Cheers,
Matt __________________________________________________________________________
Matt Carlson
Senior Transport Planner

Arup
13 Fitzroy Street, London, W1T 4BQ, UK
Tel: +44 (0)20 7755 4114
Fax: +44 (0)20 7755 2451
mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 
http://www.arup.com <http://www.arup.com> 
http://www.arup.com/transportplanning/
<http://www.arup.com/transportplanning/> 
__________________________________________________________________________


___________________________________________________________________
Electronic mail messages entering and leaving Arup business systems are scanned 
for acceptability of content and viruses.

---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 15228

Reply via email to