Hi Peter,
As Bill Thoen says, a "curved" polyline is made up of straight segments, so
to determine if it is curved, you need to work out if segments run in the
same direction as each other.
You should be able to knock something together using mapbasic. Objectnodex()
and Objectnodey() will return coordinates for the nodes on a polyline, then
some variation on
tan(angle) = (y2-y1) / (x2-x1)
Where
angle = the angle of the segment
x1,y1 = coords of first node
x2,y2 = coords of second node
for each segment - if the angles differ then the polyline is curved.
If this sounds horrible, you could probably do a quick and dirty check
using:
select where objectgeography(obj,OBJ_GEO_ARCBEGANGLE) <>
objectgeography(obj,OBJ_GEO_ARCENDANGLE)
which would select curved polylines, except those where the last segment
goes in the same direction as the first (eg S or Z shapes).
Anyway, it's far too early in the morning for me to dredge up trigonometry
from my schooldays, so I'm off for a coffee.
Hope this helps, and my trig. is right!
---------------------------------------------
David Booth
Senior GIS Officer
Merseyside Information Service
> -----Original Message-----
> From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]]
> Sent: 10 April 2001 18:28
> To: [EMAIL PROTECTED]
> Subject: MI-L Line attributes
>
> Greetings,
>
> I think this should be a simple request. I am wondering if anyone knows of
> a technique to select a portion of a polyline that may have a curvature. I
> have a number of polylines that I would like to select only the portion
> which curves.
>
> Your thoughts and suggestions are welcome.
>
> TIA
>
> Cheers,
>
> Peter
>
> ___________________________
> Peter McPherson
> GIS Technician
> Cameco Corporation
> 2121 11th Street West
> Saskatoon, Saskatchewan
> S7M 1J3
> Canada
>
> Telephone (306) 956 6433
> Fax (306) 956 6390
>
>
>
>
> _______________________________________________________________________
> List hosting provided by Directions Magazine | www.directionsmag.com |
> To unsubscribe, send e-mail to [EMAIL PROTECTED] and
> put "unsubscribe MapInfo-L" in the message body.
_______________________________________________________________________
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, send e-mail to [EMAIL PROTECTED] and
put "unsubscribe MapInfo-L" in the message body.