NetTopologySuite
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Pages
NetTopologySuite.Geometries.Point Class Reference

Represents a single point. A Point is topologically valid if and only if:

More...

Inheritance diagram for NetTopologySuite.Geometries.Point:
NetTopologySuite.Geometries.Geometry

Public Member Functions

 Point (Coordinate coordinate)
 
 Point (ICoordinateSequence coordinates, IGeometryFactory factory)
 Constructs a Point with the given coordinate. More...
 
override double[] GetOrdinates (Ordinate ordinate)
 Gets an array of System.Double ordinate values More...
 
override bool EqualsExact (IGeometry other, double tolerance)
 
override void Apply (ICoordinateFilter filter)
 
override void Apply (ICoordinateSequenceFilter filter)
 
override void Apply (IGeometryFilter filter)
 
override void Apply (IGeometryComponentFilter filter)
 
override object Clone ()
 
override IGeometry Reverse ()
 
override void Normalize ()
 
 Point (double x, double y, double z)
 Initializes a new instance of the Point class. More...
 
 Point (double x, double y)
 Initializes a new instance of the Point class. More...
 
- Public Member Functions inherited from NetTopologySuite.Geometries.Geometry
virtual IGeometry GetGeometryN (int n)
 Returns an element Geometry from a GeometryCollection, or More...
 
double Distance (IGeometry g)
 Returns the minimum distance between this Geometry and another Geometry g. More...
 
bool IsWithinDistance (IGeometry geom, double distance)
 Tests whether the distance from this Geometry to another is less than or equal to a specified value. More...
 
void GeometryChanged ()
 Notifies this geometry that its coordinates have been changed by an external party (for example, via a ICoordinateFilter). More...
 
void GeometryChangedAction ()
 Notifies this Geometry that its Coordinates have been changed by an external party. When GeometryChanged is called, this method will be called for this Geometry and its component Geometries. More...
 
bool Disjoint (IGeometry g)
 Tests whether this geometry is disjoint from the argument geometry. More...
 
bool Touches (IGeometry g)
 Tests whether this geometry touches the argument geometry More...
 
bool Intersects (IGeometry g)
 Tests whether this geometry intersects the argument geometry. /summary> More...
 
bool Crosses (IGeometry g)
 
bool Within (IGeometry g)
 Tests whether this geometry is within the specified geometry. More...
 
bool Contains (IGeometry g)
 
bool Overlaps (IGeometry g)
 Tests whether this geometry overlaps the specified geometry. More...
 
bool Covers (IGeometry g)
 Tests whether this geometry covers the argument geometry More...
 
bool CoveredBy (IGeometry g)
 
bool Relate (IGeometry g, string intersectionPattern)
 
IntersectionMatrix Relate (IGeometry g)
 Returns the DE-9IM intersection matrix for the two Geometrys. More...
 
bool Equals (IGeometry g)
 Tests whether this geometry is topologically equal to the argument geometry. This method is included for backward compatibility reasons. It has been superseded by the

See also
EqualsTopologically

method, which has been named to clearly denote its functionality. This method should NOT be confused with the method

See also
Equals(Object)

, which implements an exact equality comparison. More...

 
bool EqualsTopologically (IGeometry g)
 Tests whether this geometry is topologically equal to the argument geometry as defined by the SFS Equals predicate. More...
 
override bool Equals (Object o)
 Tests whether this geometry is structurally and numerically equal to a given Object. More...
 
override int GetHashCode ()
 Gets a hash code for the Geometry. More...
 
override string ToString ()
 Returns the Well-known Text representation of this Geometry. For a definition of the Well-known Text format, see the OpenGIS Simple Features Specification. More...
 
string ToText ()
 Returns the Well-known Text representation of this Geometry. For a definition of the Well-known Text format, see the OpenGIS Simple Features Specification. More...
 
string AsText ()
 ToText More...
 
byte[] ToBinary ()
 Returns the Well-known Binary representation of this Geometry. For a definition of the Well-known Binary format, see the OpenGIS Simple Features Specification. More...
 
byte[] AsBinary ()
 ToBinary More...
 
XmlReader ToGMLFeature ()
 Returns the feature representation as GML 2.1.1 XML document. This XML document is based on Geometry.xsd schema. NO features or XLink are implemented here! More...
 
IGeometry Buffer (double distance)
 Computes a buffer area around this geometry having the given width. The buffer of a Geometry is the Minkowski sum or difference of the geometry with a disc of radius Abs(distance). More...
 
IGeometry Buffer (double distance, BufferStyle endCapStyle)
 Computes a buffer region around this Geometry having the given width. The buffer of a Geometry is the Minkowski sum or difference of the geometry with a disc of radius Abs(distance). More...
 
IGeometry Buffer (double distance, EndCapStyle endCapStyle)
 Computes a buffer region around this Geometry having the given width. The buffer of a Geometry is the Minkowski sum or difference of the geometry with a disc of radius Abs(distance). More...
 
IGeometry Buffer (double distance, int quadrantSegments)
 Computes a buffer region around this Geometry having the given width and with a specified accuracy of approximation for circular arcs. The buffer of a Geometry is the Minkowski sum of the Geometry with a disc of radius distance. Curves in the buffer polygon are approximated with line segments. This method allows specifying the accuracy of that approximation. More...
 
IGeometry Buffer (double distance, int quadrantSegments, BufferStyle endCapStyle)
 Computes a buffer region around this Geometry having the given width and with a specified number of segments used to approximate curves. The buffer of a Geometry is the Minkowski sum of the Geometry with a disc of radius distance. Curves in the buffer polygon are approximated with line segments. This method allows specifying the accuracy of that approximation. More...
 
IGeometry Buffer (double distance, int quadrantSegments, EndCapStyle endCapStyle)
 Computes a buffer region around this Geometry having the given width and with a specified number of segments used to approximate curves. The buffer of a Geometry is the Minkowski sum of the Geometry with a disc of radius distance. Curves in the buffer polygon are approximated with line segments. This method allows specifying the accuracy of that approximation. More...
 
IGeometry Buffer (double distance, IBufferParameters bufferParameters)
 Computes a buffer region around this Geometry having the given width and with a specified number of segments used to approximate curves. The buffer of a Geometry is the Minkowski sum of the Geometry with a disc of radius distance. Curves in the buffer polygon are approximated with line segments. This method allows specifying the accuracy of that approximation. More...
 
virtual IGeometry ConvexHull ()
 Returns the smallest convex Polygon that contains all the points in the Geometry. This obviously applies only to Geometry s which contain 3 or more points. More...
 
IGeometry Intersection (IGeometry other)
 Computes a Geometry representing the point-set which is common to both this Geometry and the other Geometry. The intersection of two geometries of different dimension produces a result geometry of dimension less than or equal to the minimum dimension of the input geometries. The result geometry may be a heterogenous IGeometryCollection. If the result is empty, it is an atomic geometry with the dimension of the lowest input dimension. Intersection of IGeometryCollections is supported only for homogeneous collection types. Non-empty heterogeneous IGeometryCollection arguments are not supported. More...
 
IGeometry Union (IGeometry other)
 Computes a Geometry representing the point-set which is contained in both this Geometry and the other Geometry. More...
 
IGeometry Difference (IGeometry other)
 Computes a Geometry representing the closure of the point-set of the points contained in this Geometry that are not contained in the other Geometry. If the result is empty, it is an atomic geometry with the dimension of the left-hand input. Non-empty IGeometryCollection arguments are not supported. More...
 
IGeometry SymmetricDifference (IGeometry other)
 Computes a Geometry representing the closure of the point-set which is the union of the points in this Geometry which are not contained in the other Geometry, with the points in the other Geometry not contained in this Geometry. If the result is empty, it is an atomic geometry with the dimension of the highest input dimension. Non-empty IGeometryCollection arguments are not supported. More...
 
IGeometry Union ()
 Computes the union of all the elements of this geometry. More...
 
bool EqualsExact (IGeometry other)
 Returns true if the two Geometrys are exactly equal. Two Geometries are exactly equal if:

  • they have the same class,
  • they have the same values of Coordinates in their internal Coordinate lists, in exactly the same order.

This provides a stricter test of equality than EqualsTopologically, which is more useful in certain situations (such as using geometries as keys in collections). This method does not test the values of the GeometryFactory, the SRID, or the UserData fields. To properly test equality between different geometries, it is usually necessary to Normalize them first. More...

 
bool EqualsNormalized (IGeometry g)
 Tests whether two geometries are exactly equal in their normalized forms. More...
 
IGeometry Normalized ()
 Creates a new Geometry which is a normalized copy of this Geometry. More...
 
int CompareTo (object o)
 Returns whether this Geometry is greater than, equal to, or less than another Geometry. More...
 
int CompareTo (IGeometry geom)
 Returns whether this Geometry is greater than, equal to, or less than another Geometry. More...
 
int CompareTo (Object o, IComparer< ICoordinateSequence > comp)
 Returns whether this Geometry is greater than, equal to, or less than another Geometry, using the given . More...
 

Static Public Attributes

static readonly IPoint Empty = new GeometryFactory().CreatePoint(EmptyCoordinate)
 Represents an empty Point. More...
 
- Static Public Attributes inherited from NetTopologySuite.Geometries.Geometry
static readonly IGeometryFactory DefaultFactory = GeometryFactory.Default
 A predefined GeometryFactory with PrecisionModel == PrecisionModels.Fixed. More...
 

Protected Member Functions

override Envelope ComputeEnvelopeInternal ()
 
- Protected Member Functions inherited from NetTopologySuite.Geometries.Geometry
 Geometry (IGeometryFactory factory)
 Creates a new Geometry via the specified GeometryFactory. More...
 
virtual bool IsEquivalentClass (IGeometry other)
 Returns whether the two Geometrys are equal, from the point of view of the EqualsExact method. Called by EqualsExact . In general, two Geometry classes are considered to be "equivalent" only if they are the same class. An exception is LineString , which is considered to be equivalent to its subclasses. More...
 
void CheckNotGeometryCollection (IGeometry g)
 Throws an exception if g's class is GeometryCollection. (its subclasses do not trigger an exception). More...
 

Properties

ICoordinateSequence CoordinateSequence [get]
 
override Coordinate[] Coordinates [get]
 
override int NumPoints [get]
 
override bool IsEmpty [get]
 
override Dimension Dimension [get]
 
override Dimension BoundaryDimension [get]
 
double X [get, set]
 
double Y [get, set]
 
override Coordinate Coordinate [get]
 
override string GeometryType [get]
 Returns the name of this object's interface. More...
 
override OgcGeometryType OgcGeometryType [get]
 Gets the OGC geometry type More...
 
override IGeometry Boundary [get]
 Gets the boundary of this geometry. Zero-dimensional geometries have no boundary by definition, so an empty GeometryCollection is returned. More...
 
double Z [get, set]
 
double M [get, set]
 
- Properties inherited from NetTopologySuite.Geometries.Geometry
IGeometryFactory Factory [get]
 Gets the factory which contains the context in which this point was created. More...
 
object UserData [get, set]
 Gets/Sets the user data object for this point, if any. More...
 
int SRID [get, set]
 Sets the ID of the Spatial Reference System used by the Geometry. More...
 
abstract string GeometryType [get]
 Returns the name of this Geometry's actual class. More...
 
abstract OgcGeometryType OgcGeometryType [get]
 Gets the OGC geometry type More...
 
IPrecisionModel PrecisionModel [get]
 Returns the PrecisionModel used by the Geometry. More...
 
abstract Coordinate Coordinate [get]
 Returns a vertex of this Geometry (usually, but not necessarily, the first one). More...
 
abstract Coordinate[] Coordinates [get]
 Returns an array containing the values of all the vertices for this geometry. More...
 
abstract int NumPoints [get]
 Returns the count of this Geometrys vertices. The Geometry s contained by composite Geometrys must be Geometry's; that is, they must implement NumPoints. More...
 
virtual int NumGeometries [get]
 Returns the number of Geometryes in a GeometryCollection, or 1, if the geometry is not a collection. More...
 
bool IsSimple [get]
 Tests whether this IGeometry is simple. The SFS definition of simplicity follows the general rule that a Geometry is simple if it has no points of self-tangency, self-intersection or other anomalous points. Simplicity is defined for each IGeometry subclass as follows:

  • Valid polygonal geometries are simple, since their rings must not self-intersect. IsSimple tests for this condition and reports
More...
 
virtual bool IsValid [get]
 Tests whether this Geometry is topologically valid, according to the OGC SFS specification.For validity rules see the documentation for the specific geometry subclass. More...
 
abstract bool IsEmpty [get]
 Tests whether the set of points covered in this Geometry is empty. More...
 
virtual double Area [get]
 Returns the area of this Geometry. Areal Geometries have a non-zero area. They override this function to compute the area. Others return 0.0 More...
 
virtual double Length [get]
 Returns the length of this Geometry. Linear geometries return their length. Areal geometries return their perimeter. They override this function to compute the length. Others return 0.0 More...
 
IPoint Centroid [get]
 Computes the centroid of this Geometry. The centroid is equal to the centroid of the set of component Geometries of highest dimension (since the lower-dimension geometries contribute zero "weight" to the centroid). The centroid of an empty geometry is POINT EMPTY. More...
 
IPoint InteriorPoint [get]
 Computes an interior point of this Geometry. More...
 
IPoint PointOnSurface [get]
 InteriorPoint More...
 
virtual Dimension Dimension [get, set]
 Returns the dimension of this geometry. More...
 
virtual IGeometry Boundary [get, set]
 Returns the boundary, or an empty geometry of appropriate dimension if this Geometry is empty. For a discussion of this function, see the OpenGIS Simple Features Specification. As stated in SFS Section 2.1.13.1, "the boundary of a Geometry is a set of Geometries of the next lower dimension." More...
 
virtual Dimension BoundaryDimension [get, set]
 Returns the dimension of this Geometrys inherent boundary. More...
 
IGeometry Envelope [get]
 Gets a geometry representing the envelope (bounding box) of this Geometry. More...
 
Envelope EnvelopeInternal [get]
 Gets an GeoAPI.Geometries.Envelope containing the minimum and maximum x and y values in this Geometry. If the geometry is empty, an empty Envelope is returned. More...
 
bool IsGeometryCollection [get]
 
virtual bool IsRectangle [get]
 

Additional Inherited Members

- Static Public Member Functions inherited from NetTopologySuite.Geometries.Geometry
static bool HasNullElements (object[] array)
 Returns true if the array contains any null elements. More...
 
static bool operator== (Geometry obj1, IGeometry obj2)
 
static bool operator!= (Geometry obj1, IGeometry obj2)
 
- Static Protected Member Functions inherited from NetTopologySuite.Geometries.Geometry
static bool HasNonEmptyElements (IGeometry[] geometries)
 Returns true if the array contains any non-empty Geometrys. More...
 
static int Compare (List< IGeometry > a, List< IGeometry > b)
 Returns the first non-zero result of CompareTo encountered as the two Collections are iterated over. If, by the time one of the iterations is complete, no non-zero result has been encountered, returns 0 if the other iteration is also complete. If b completes before a, a positive number is returned; if a before b, a negative number. More...
 
static bool Equal (Coordinate a, Coordinate b, double tolerance)
 
static double[] CreateArray (int size, double value)
 
static double[] CreateArray (ICoordinateSequence sequence, Ordinate ordinate)
 

Detailed Description

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

Constructor & Destructor Documentation

NetTopologySuite.Geometries.Point.Point ( Coordinate  coordinate)

Initializes a new instance of the Point class.

Parameters
coordinateThe coordinate used for create this Point.

For create this Geometry is used a standard GeometryFactory with PrecisionModel == PrecisionModels.Floating.

NetTopologySuite.Geometries.Point.Point ( ICoordinateSequence  coordinates,
IGeometryFactory  factory 
)

Constructs a Point with the given coordinate.

Parameters
coordinatesContains the single coordinate on which to base this Point, or null to create the empty point.
factory
NetTopologySuite.Geometries.Point.Point ( double  x,
double  y,
double  z 
)

Initializes a new instance of the Point class.

Parameters
xThe x coordinate.
yThe y coordinate.
zThe z coordinate.

///

For create this Geometry is used a standard GeometryFactory with PrecisionModel set to PrecisionModels.Floating.

NetTopologySuite.Geometries.Point.Point ( double  x,
double  y 
)

Initializes a new instance of the Point class.

Parameters
xThe x coordinate.
yThe y coordinate.

///

For create this Geometry is used a standard GeometryFactory with PrecisionModel set to PrecisionModels.Floating.

Member Function Documentation

override void NetTopologySuite.Geometries.Point.Apply ( ICoordinateFilter  filter)
virtual

Parameters
filter

Implements NetTopologySuite.Geometries.Geometry.

override void NetTopologySuite.Geometries.Point.Apply ( IGeometryFilter  filter)
virtual

Parameters
filter

Implements NetTopologySuite.Geometries.Geometry.

override void NetTopologySuite.Geometries.Point.Apply ( IGeometryComponentFilter  filter)
virtual

Parameters
filter

Implements NetTopologySuite.Geometries.Geometry.

override object NetTopologySuite.Geometries.Point.Clone ( )
virtual

Returns

Reimplemented from NetTopologySuite.Geometries.Geometry.

override Envelope NetTopologySuite.Geometries.Point.ComputeEnvelopeInternal ( )
protectedvirtual
override bool NetTopologySuite.Geometries.Point.EqualsExact ( IGeometry  other,
double  tolerance 
)
virtual

Parameters
other
tolerance
Returns

Implements NetTopologySuite.Geometries.Geometry.

override double [] NetTopologySuite.Geometries.Point.GetOrdinates ( Ordinate  ordinate)
virtual

Gets an array of System.Double ordinate values

Parameters
ordinateThe ordinate index
Returns
An array of ordinate values

Implements NetTopologySuite.Geometries.Geometry.

override void NetTopologySuite.Geometries.Point.Normalize ( )
virtual

Member Data Documentation

readonly IPoint NetTopologySuite.Geometries.Point.Empty = new GeometryFactory().CreatePoint(EmptyCoordinate)
static

Represents an empty Point.

Property Documentation

override IGeometry NetTopologySuite.Geometries.Point.Boundary
get

Gets the boundary of this geometry. Zero-dimensional geometries have no boundary by definition, so an empty GeometryCollection is returned.

override Dimension NetTopologySuite.Geometries.Point.BoundaryDimension
get

override Coordinate NetTopologySuite.Geometries.Point.Coordinate
get

override Coordinate [] NetTopologySuite.Geometries.Point.Coordinates
get

ICoordinateSequence NetTopologySuite.Geometries.Point.CoordinateSequence
get

override Dimension NetTopologySuite.Geometries.Point.Dimension
get

override string NetTopologySuite.Geometries.Point.GeometryType
get

Returns the name of this object's interface.

Returns
"Point"
override bool NetTopologySuite.Geometries.Point.IsEmpty
get

double NetTopologySuite.Geometries.Point.M
getset

override int NetTopologySuite.Geometries.Point.NumPoints
get

override OgcGeometryType NetTopologySuite.Geometries.Point.OgcGeometryType
get

Gets the OGC geometry type

double NetTopologySuite.Geometries.Point.X
getset

double NetTopologySuite.Geometries.Point.Y
getset

double NetTopologySuite.Geometries.Point.Z
getset


The documentation for this class was generated from the following file: