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
p1
HCoordinatep2
HCoordinate
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
p1
CoordinateA coordinate
p2
CoordinateA coordinate
HCoordinate(Coordinate, Coordinate, Coordinate, Coordinate)
Creates an instance of this
public HCoordinate(Coordinate p1, Coordinate p2, Coordinate q1, Coordinate q2)
Parameters
p1
Coordinatep2
Coordinateq1
Coordinateq2
Coordinate
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
p1
Coordinate1st Coordinate of 1st linesegment
p2
Coordinate2nd Coordinate of 1st linesegment
q1
Coordinate1st Coordinate of 2nd linesegment
q2
Coordinate2nd 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
p1
Coordinatep2
Coordinateq1
Coordinateq2
Coordinate