Class HCoordinate
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.
Inherited Members
Namespace: NetTopologySuite.Algorithm
Assembly: NetTopologySuite.dll
Syntax
public class HCoordinate
Constructors
| Improve this Doc View SourceHCoordinate()
Declaration
public HCoordinate()
HCoordinate(HCoordinate, HCoordinate)
Declaration
public HCoordinate(HCoordinate p1, HCoordinate p2)
Parameters
Type | Name | Description |
---|---|---|
HCoordinate | p1 | |
HCoordinate | p2 |
HCoordinate(Coordinate)
Declaration
public HCoordinate(Coordinate p)
Parameters
Type | Name | Description |
---|---|---|
Coordinate | p |
HCoordinate(Coordinate, Coordinate)
Constructs a homogeneous coordinate which is the intersection of the lines Coordinates. define by the homogeneous coordinates represented by two
Declaration
public HCoordinate(Coordinate p1, Coordinate p2)
Parameters
Type | Name | Description |
---|---|---|
Coordinate | p1 | A coordinate |
Coordinate | p2 | A coordinate |
HCoordinate(Coordinate, Coordinate, Coordinate, Coordinate)
Creates an instance of this
Declaration
public HCoordinate(Coordinate p1, Coordinate p2, Coordinate q1, Coordinate q2)
Parameters
Type | Name | Description |
---|---|---|
Coordinate | p1 | |
Coordinate | p2 | |
Coordinate | q1 | |
Coordinate | q2 |
HCoordinate(Double, Double, Double)
Declaration
public HCoordinate(double x, double y, double w)
Parameters
Type | Name | Description |
---|---|---|
Double | x | |
Double | y | |
Double | w |
Properties
| Improve this Doc View SourceCoordinate
Declaration
public Coordinate Coordinate { get; }
Property Value
Type | Description |
---|---|
Coordinate |
Methods
| Improve this Doc View SourceGetX()
Declaration
public double GetX()
Returns
Type | Description |
---|---|
Double |
GetY()
Declaration
public double GetY()
Returns
Type | Description |
---|---|
Double |
Intersection(Coordinate, Coordinate, Coordinate, Coordinate)
Computes the (approximate) intersection point between two line segments using homogeneous coordinates.
Declaration
[Obsolete("Use Intersection.Compute(Coordinate, Coordinate, Coordinate, Coordinate)")]
public static Coordinate Intersection(Coordinate p1, Coordinate p2, Coordinate q1, Coordinate q2)
Parameters
Type | Name | Description |
---|---|---|
Coordinate | p1 | 1st Coordinate of 1st linesegment |
Coordinate | p2 | 2nd Coordinate of 1st linesegment |
Coordinate | q1 | 1st Coordinate of 2nd linesegment |
Coordinate | q2 | 2nd Coordinate of 2nd linesegment |
Returns
Type | Description |
---|---|
Coordinate |
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.
Declaration
public static Coordinate OldIntersection(Coordinate p1, Coordinate p2, Coordinate q1, Coordinate q2)
Parameters
Type | Name | Description |
---|---|---|
Coordinate | p1 | |
Coordinate | p2 | |
Coordinate | q1 | |
Coordinate | q2 |
Returns
Type | Description |
---|---|
Coordinate |