Table of Contents

Class Point

Namespace
NetTopologySuite.Geometries
Assembly
NetTopologySuite.dll

Represents a single point.

A Point 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 Coordinate

The 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 CoordinateSequence

Contains the single coordinate on which to base this Point, or null 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

x double

The x coordinate.

y double

The y coordinate.

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

x double

The x coordinate.

y double

The y coordinate.

z double

The z coordinate.

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

Point

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

Geometry

BoundaryDimension

public override Dimension BoundaryDimension { get; }

Property Value

Dimension

Coordinate

public override Coordinate Coordinate { get; }

Property Value

Coordinate

CoordinateSequence

public CoordinateSequence CoordinateSequence { get; }

Property Value

CoordinateSequence

Coordinates

public override Coordinate[] Coordinates { get; }

Property Value

Coordinate[]

Dimension

public override Dimension Dimension { get; }

Property Value

Dimension

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

bool

M

public double M { get; set; }

Property Value

double

NumPoints

public override int NumPoints { get; }

Property Value

int

OgcGeometryType

Gets the OGC geometry type

public override OgcGeometryType OgcGeometryType { get; }

Property Value

OgcGeometryType

SortIndex

Gets a value to sort the geometry

protected override Geometry.SortIndexValue SortIndex { get; }

Property Value

Geometry.SortIndexValue

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

double

Y

public double Y { get; set; }

Property Value

double

Z

public double Z { get; set; }

Property Value

double

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

filter IEntireCoordinateSequenceFilter

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

int

CompareToSameClass(object, IComparer<CoordinateSequence>)

protected override int CompareToSameClass(object other, IComparer<CoordinateSequence> comparer)

Parameters

other object
comparer IComparer<CoordinateSequence>

Returns

int

ComputeEnvelopeInternal()

protected override Envelope ComputeEnvelopeInternal()

Returns

Envelope

CopyInternal()

protected override Geometry CopyInternal()

Returns

Geometry

EqualsExact(Geometry, double)

public override bool EqualsExact(Geometry other, double tolerance)

Parameters

other Geometry
tolerance double

Returns

bool

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

Geometry

ReverseInternal()

The actual implementation of the Reverse() function for POINTs.

protected override Geometry ReverseInternal()

Returns

Geometry

A reversed geometry