# MapWinGeoProc:Topology:Segment

This is a back-up of the WIKI.
We're working on a new wiki.

Main Page | Recent changes | View source | Page history | Log in / create account |

## Segment

Summary

Stores a set of double values that represents a line segment.

Fields

 X1 The X coordinate of the Start Point of the segment X2 The X coordinate of the End Point of the segment Y1 The Y coordinate of the Start Point of the segment Y2 The Y coordinate of the End Point of the segment Z1 The Z coordinate of the Start Point of the segment Z2 The Z coordinate of the End Point of the segment

Methods

 ClosestPointTo Returns a Point representing the closest point. Constructor This function has 6 overloads. Crosses Checks to see if two segments cross. This will not return true if the endpoints touch, or the lines are identical. Specifically the middle portions of the lines have to contact each other. DistanceTo This function has 3 overloads. IntersectsWith This function has 3 overloads. IsCompletelyWithin Returns true if the entire segment is within the polygon, without touching or crossing any of the edges. IsIdenticalTo Checks the points of the segemnts to see if they are the same, but is unconcerned with direction. IsParallelTo Returns true if the line segments are parallel IsPerpendicularTo Returns true if the line segments are perpendicular IsWithinADistanceOf This function has 2 overloads. LocationByX Given a segment, we try fix the value of one coordinate to solve for the other two. LocationByY Given a segment, we try fix the value of one coordinate to solve for the other two. LocationByZ Given a segment, we try fix the value of one coordinate to solve for the other two. Touches Checks to see if two segments touch. This is true if a vertex from one segment intersects with the other segment. Does not return true if only the line areas touch one another. ToVector Creates a new vector from this segment where the StartPoint becomes the beginning of the vector and the end point is the tip of the vector.

Back to MapWinGeoProc.Topology