Class Point
- Namespace
- NetTopologySuite.Geometries
- Assembly
- NetTopologySuite.dll
Represents a single point.
APoint
is topologically valid if and only if:
- The coordinate which defines it if any) is a valid coordinate
(i.e. does not have an
NaN
X- or Y-ordinate
public class Point : Geometry, IComparable, IComparable<Geometry>, IPuntal
- Inheritance
-
Point
- Implements
- Inherited Members
Constructors
Point(Coordinate)
Initializes a new instance of the Point class.
public Point(Coordinate coordinate)
Parameters
coordinate
CoordinateThe coordinate used for create this Point.
Remarks
For create this Geometry is used a standard GeometryFactory
with PrecisionModel ==
Floating.
Point(CoordinateSequence, GeometryFactory)
Constructs a Point
with the given coordinate.
public Point(CoordinateSequence coordinates, GeometryFactory factory)
Parameters
coordinates
CoordinateSequenceContains the single coordinate on which to base this
Point
, ornull
to create the empty point.factory
GeometryFactory
Point(double, double)
Initializes a new instance of the Point class.
public Point(double x, double y)
Parameters
Remarks
For create this Geometry is used a standard GeometryFactory
with PrecisionModel set to
Floating.
Point(double, double, double)
Initializes a new instance of the Point class.
public Point(double x, double y, double z)
Parameters
Remarks
For create this Geometry is used a standard GeometryFactory
with PrecisionModel set to
Floating.
Fields
Empty
Represents an empty Point
.
public static readonly Point Empty
Field Value
Properties
Boundary
Gets the boundary of this geometry. Zero-dimensional geometries have no boundary by definition, so an empty GeometryCollection is returned.
public override Geometry Boundary { get; }
Property Value
BoundaryDimension
public override Dimension BoundaryDimension { get; }
Property Value
Coordinate
public override Coordinate Coordinate { get; }
Property Value
CoordinateSequence
public CoordinateSequence CoordinateSequence { get; }
Property Value
Coordinates
public override Coordinate[] Coordinates { get; }
Property Value
Dimension
public override Dimension Dimension { get; }
Property Value
GeometryType
Returns the name of this object's interface.
public override string GeometryType { get; }
Property Value
- string
"Point"
IsEmpty
public override bool IsEmpty { get; }
Property Value
M
public double M { get; set; }
Property Value
NumPoints
public override int NumPoints { get; }
Property Value
OgcGeometryType
Gets the OGC geometry type
public override OgcGeometryType OgcGeometryType { get; }
Property Value
SortIndex
Gets a value to sort the geometry
protected override Geometry.SortIndexValue SortIndex { get; }
Property Value
Remarks
NOTE:
For JTS v1.17 this property's getter has been renamed to getTypeCode()
.
In order not to break binary compatibility we did not follow.
X
public double X { get; set; }
Property Value
Y
public double Y { get; set; }
Property Value
Z
public double Z { get; set; }
Property Value
Methods
Apply(ICoordinateFilter)
public override void Apply(ICoordinateFilter filter)
Parameters
filter
ICoordinateFilter
Apply(ICoordinateSequenceFilter)
public override void Apply(ICoordinateSequenceFilter filter)
Parameters
filter
ICoordinateSequenceFilter
Apply(IEntireCoordinateSequenceFilter)
public override void Apply(IEntireCoordinateSequenceFilter filter)
Parameters
Apply(IGeometryComponentFilter)
public override void Apply(IGeometryComponentFilter filter)
Parameters
filter
IGeometryComponentFilter
Apply(IGeometryFilter)
public override void Apply(IGeometryFilter filter)
Parameters
filter
IGeometryFilter
CompareToSameClass(object)
protected override int CompareToSameClass(object other)
Parameters
other
object
Returns
CompareToSameClass(object, IComparer<CoordinateSequence>)
protected override int CompareToSameClass(object other, IComparer<CoordinateSequence> comparer)
Parameters
other
objectcomparer
IComparer<CoordinateSequence>
Returns
ComputeEnvelopeInternal()
protected override Envelope ComputeEnvelopeInternal()
Returns
CopyInternal()
protected override Geometry CopyInternal()
Returns
EqualsExact(Geometry, double)
public override bool EqualsExact(Geometry other, double tolerance)
Parameters
Returns
GetOrdinates(Ordinate)
public override double[] GetOrdinates(Ordinate ordinate)
Parameters
ordinate
Ordinate
Returns
- double[]
Normalize()
public override void Normalize()
Reverse()
[Obsolete("Call Geometry.Reverse()")]
public override Geometry Reverse()
Returns
ReverseInternal()
The actual implementation of the Reverse() function for POINT
s.
protected override Geometry ReverseInternal()
Returns
- Geometry
A reversed geometry