Class HCoordinate
- Namespace
- NetTopologySuite.Algorithm
- Assembly
- NetTopologySuite.dll
Represents a homogeneous coordinate in a 2-D coordinate space. In NTS HCoordinates are used as a clean way of computing intersections between line segments.
public class HCoordinate- Inheritance
- 
      
      HCoordinate
- Inherited Members
Constructors
HCoordinate()
public HCoordinate()HCoordinate(HCoordinate, HCoordinate)
public HCoordinate(HCoordinate p1, HCoordinate p2)Parameters
- p1HCoordinate
- p2HCoordinate
HCoordinate(Coordinate)
public HCoordinate(Coordinate p)Parameters
HCoordinate(Coordinate, Coordinate)
Constructs a homogeneous coordinate which is the intersection of the lines Coordinates. define by the homogeneous coordinates represented by two
public HCoordinate(Coordinate p1, Coordinate p2)Parameters
- p1Coordinate
- A coordinate 
- p2Coordinate
- A coordinate 
HCoordinate(Coordinate, Coordinate, Coordinate, Coordinate)
Creates an instance of this
public HCoordinate(Coordinate p1, Coordinate p2, Coordinate q1, Coordinate q2)Parameters
- p1Coordinate
- p2Coordinate
- q1Coordinate
- q2Coordinate
HCoordinate(double, double, double)
public HCoordinate(double x, double y, double w)Parameters
Properties
Coordinate
public Coordinate Coordinate { get; }Property Value
Methods
GetX()
public double GetX()Returns
GetY()
public double GetY()Returns
Intersection(Coordinate, Coordinate, Coordinate, Coordinate)
Computes the (approximate) intersection point between two line segments using homogeneous coordinates.
[Obsolete("Use Intersection.Compute(Coordinate, Coordinate, Coordinate, Coordinate)")]
public static Coordinate Intersection(Coordinate p1, Coordinate p2, Coordinate q1, Coordinate q2)Parameters
- p1Coordinate
- 1st Coordinate of 1st linesegment 
- p2Coordinate
- 2nd Coordinate of 1st linesegment 
- q1Coordinate
- 1st Coordinate of 2nd linesegment 
- q2Coordinate
- 2nd Coordinate of 2nd linesegment 
Returns
Remarks
Note that this algorithm is not numerically stable; i.e. it can produce intersection points which lie outside the envelope of the line segments themselves. In order to increase the precision of the calculation input points should be normalized before passing them to this routine.
OldIntersection(Coordinate, Coordinate, Coordinate, Coordinate)
Computes the (approximate) intersection point between two line segments using homogeneous coordinates. Note that this algorithm is not numerically stable; i.e. it can produce intersection points which lie outside the envelope of the line segments themselves. In order to increase the precision of the calculation input points should be normalized before passing them to this routine.
public static Coordinate OldIntersection(Coordinate p1, Coordinate p2, Coordinate q1, Coordinate q2)Parameters
- p1Coordinate
- p2Coordinate
- q1Coordinate
- q2Coordinate