[mapserver-users] How do I determine the direction of a line or polyline with Shapelib?

Stephen Lime steve.lime at dnr.state.mn.us
Mon Nov 19 12:48:14 EST 2001


Direction with regards to shapefiles only is used in conjuction with polygons. There the issue is the orientation of the vertices (clockwise or counter-clockwise) and inner and outer rings. With lines/polylines I think it's incumbent on the data to store from and to information as attributes. I don't think you'd want to rely solely on the order of vertices in the shapefile.

Steve

Stephen Lime
Data & Applications Manager

Minnesota DNR
500 Lafayette Road
St. Paul, MN 55155
651-297-2937

>>> Greg Mader <gmader at GeoAnalytics.com> 11/18/01 11:44AM >>>
Hi Frank and list,

I am sorry that this is a little off topic, but I am working on my
simple(primitive?) geocoder program, that hopefully will be useful to
Mapserver users.  How do I determine the directionality of a line or
polyline with shapelib?  Is directionality controlled by the order of the
nodes, and thus the direction that a line was digitized?  Is there some
attribute that I am unaware of from the documentation that shows
directionality?  When one assigns an address to a line in arcview, it is
usually in the form of "from address, to address", but this still implies
that directionality is known.  

I suppose that I could always derive directionality by looking at adjoining
line elements, but this would be potentially wrong in a lot of cases.


Thanks,

Greg Mader
GIS analyst, and CompSci student.
Chicago, IL




More information about the mapserver-users mailing list