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

Models an OGC SFS LinearRing. More...

Inheritance diagram for NetTopologySuite.Geometries.LinearRing:
NetTopologySuite.Geometries.LineString NetTopologySuite.Geometries.Geometry

Public Member Functions

 LinearRing (ICoordinateSequence points, IGeometryFactory factory)
 Constructs a LinearRing with the given points. More...
 
override IGeometry Reverse ()
 
 LinearRing (Coordinate[] points)
 Initializes a new instance of the LinearRing class. More...
 
- Public Member Functions inherited from NetTopologySuite.Geometries.LineString
override double[] GetOrdinates (Ordinate ordinate)
 Gets an array of System.Double ordinate values More...
 
Coordinate GetCoordinateN (int n)
 
IPoint GetPointN (int n)
 
override IGeometry Reverse ()
 Creates a LineString whose coordinates are in the reverse order of this objects. More...
 
bool IsCoordinate (Coordinate pt)
 Returns true if the given point is a vertex of this LineString. 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 void Normalize ()
 Normalizes a LineString. A normalized linestring has the first point which is not equal to it's reflected point less than the reflected point. More...
 
 LineString (Coordinate[] points)
 Initializes a new instance of the LineString class. More...
 
 LineString (ICoordinateSequence points, IGeometryFactory factory)
 Initializes a new instance of the LineString 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...
 

Public Attributes

const int MinimumValidSize = 4
 The minimum number of vertices allowed in a valid non-empty ring (= 4). Empty rings with 0 vertices are also valid. More...
 

Properties

override Dimension BoundaryDimension [get]
 Returns Dimensions.False, since by definition LinearRings do not have a boundary. More...
 
override bool IsClosed [get]
 
override string GeometryType [get]
 Returns the name of this object's interface. More...
 
bool IsCCW [get]
 
- Properties inherited from NetTopologySuite.Geometries.LineString
override Coordinate[] Coordinates [get]
 
ICoordinateSequence CoordinateSequence [get]
 
override Coordinate Coordinate [get]
 
override Dimension Dimension [get]
 
override Dimension BoundaryDimension [get]
 
override bool IsEmpty [get]
 
override int NumPoints [get]
 
IPoint StartPoint [get]
 
IPoint EndPoint [get]
 
virtual bool IsClosed [get]
 
bool IsRing [get]
 
override string GeometryType [get]
 Returns the name of this object's interface. More...
 
override OgcGeometryType OgcGeometryType [get]
 
override double Length [get]
 Returns the length of this LineString More...
 
override IGeometry Boundary [get]
 
Coordinate this[int n] [get, set]
 
int Count [get]
 
double Angle [get]
 Returns the value of the angle between the StartPoint and the EndPoint. More...
 
- 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 Public Attributes inherited from NetTopologySuite.Geometries.LineString
static readonly ILineString Empty = new GeometryFactory().CreateLineString(new Coordinate[] { })
 Represents an empty LineString. 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 inherited from NetTopologySuite.Geometries.LineString
override Envelope ComputeEnvelopeInternal ()
 
override 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...
 
- Protected Member Functions inherited from NetTopologySuite.Geometries.Geometry
 Geometry (IGeometryFactory factory)
 Creates a new Geometry via the specified GeometryFactory. More...
 
void CheckNotGeometryCollection (IGeometry g)
 Throws an exception if g's class is GeometryCollection. (its subclasses do not trigger an exception). More...
 
- 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

Models an OGC SFS LinearRing.

A LinearRing is a LineString which is both closed and simple. In other words, the first and last coordinate in the ring must be equal, and the interior of the ring must not self-intersect. Either orientation of the ring is allowed.

A ring must have either 0 or 4 or more points. The first and last points must be equal (in 2D). If these conditions are not met, the constructors throw an ArgumentException

Constructor & Destructor Documentation

NetTopologySuite.Geometries.LinearRing.LinearRing ( ICoordinateSequence  points,
IGeometryFactory  factory 
)

Constructs a LinearRing with the given points.

Parameters
pointsPoints forming a closed and simple linestring, or null or an empty array to create the empty point. This array must not contain null elements.
factory
Exceptions
ArgumentExceptionIf the ring is not closed, or has too few points
NetTopologySuite.Geometries.LinearRing.LinearRing ( Coordinate[]  points)

Initializes a new instance of the LinearRing class.

Parameters
pointsThe points used for create this instance.

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

Exceptions
ArgumentExceptionIf the ring is not closed, or has too few points

Member Data Documentation

const int NetTopologySuite.Geometries.LinearRing.MinimumValidSize = 4

The minimum number of vertices allowed in a valid non-empty ring (= 4). Empty rings with 0 vertices are also valid.

Property Documentation

override Dimension NetTopologySuite.Geometries.LinearRing.BoundaryDimension
get

Returns Dimensions.False, since by definition LinearRings do not have a boundary.

override string NetTopologySuite.Geometries.LinearRing.GeometryType
get

Returns the name of this object's interface.

Returns
"LinearRing"

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