Geometry

Geometry class

The abstract root class of the geometries hierarchy.

public abstract class Geometry : IGeometry

Properties

Name Description
CoordinateDimension { get; } Gets the number of coordinate dimensions for this Geometry.
abstract Dimension { get; } Gets the topological dimension of this Geometry. If the dimension is unknown (e.g. for an empty GEOMETRYCOLLECTION) Point is returned.
abstract GeometryType { get; } Gets the type of the geometry.
virtual HasCurveGeometry { get; } Gets a value indicating whether this geometry is or contains curve (not linear) geometry.
virtual HasM { get; set; } Gets a value indicating whether this instance has M coordinate.
virtual HasZ { get; set; } Gets a value indicating whether this instance has Z coordinate.
virtual IsEmpty { get; } Gets a value indicating whether this instance is empty.
IsSimple { get; } Gets a value indicating whether this instance is simple from SFA point of view.
IsValid { get; } Gets a value indicating whether this instance is valid.
abstract SpatialReferenceSystem { get; set; } Gets SpatialReferenceSystem of this instance. This property can be null, is SpatialReferenceSystem is unknown. Assigning new SpatialReferenceSystem will not perform any coordinate transformation, only reference will change.
static Null { get; } Gets an instance of null geometry.

Methods

Name Description
AsBinary() Translates this geometry to its Well-Known Binary representation.
AsBinary(WkbVariant) Translates this geometry to its Well-Known Binary representation.
AsText() Translates this geometry to its Well-Known Text representation.
AsText(WktVariant) Translates this geometry to its Well-Known Text representation.
AsText(WktVariant, NumericFormat) Translates this geometry to its Well-Known Text representation.
abstract Clone() Clones this instance.
CoveredBy(IGeometry) Determines whether this geometry is covered by a specified geometry.
Covers(IGeometry) Determines whether this geometry covers a specified geometry.
Crosses(IGeometry) Determines if this geometry and a specified geometry cross.
Difference(IGeometry) Subtracts a specified geometry from this geometry.
Disjoint(IGeometry) Determines if this geometry is disjoint from a specified geometry.
GetArea() Computes the area of this geometry.
GetBuffer(double, int) Computes a buffer region around this geometry.
GetCentroid() Computes the centroid of this geometry.
GetConvexHull() Computes the convex hull of this geometry.
GetDistanceTo(IGeometry) Computes the minimum distance between this geometry and a specified geometry.
GetExtent() Computes and returns a bounding extent of this geometry.
GetLength() Computes the length of this geometry.
Intersection(IGeometry) Builds an intersection between this geometry and a specified geometry.
Intersects(Extent) Determines whether this geometry intersects a specified extent.
Intersects(IGeometry) Determines if this geometry and a specified geometry intersects.
Overlaps(IGeometry) Determines whether this geometry overlap with a specified geometry.
Relate(IGeometry, string) Determines if DE-9IM intersection matrix of this geometry and a specified geometry matches provided pattern.
ReplacePolygonsByLines() Gets polygons represented as lines of this geometry.
RoundM(int) Rounds M coordinate to a specified number of fractional digits.
RoundXY(int) Rounds X and Y coordinates to a specified number of fractional digits.
RoundZ(int) Rounds Z coordinate to a specified number of fractional digits.
virtual SetEmpty() Makes this Geometry empty.
SpatiallyContains(IGeometry) Determines whether this geometry spatially contains a specified geometry.
SpatiallyEquals(IGeometry) Determines if this geometry spatially equal to a specified geometry.
SymDifference(IGeometry) Builds a symmetric difference between this geometry and a specified geometry.
ToEditable() Gets an editable copy of this geometry.
ToEditable<T>() Gets an editable copy of this geometry.
ToLinearGeometry() Gets approximate or equivalent non-curve version of this geometry using the default tolerance.
ToLinearGeometry(double) Gets approximate or equivalent non-curve version of this geometry using the specified tolerance.
override ToString() Returns a string that represents the current object.
Touches(IGeometry) Determines if this geometry and a specified geometry touch.
Union(IGeometry) Unites this geometry and a specified geometry.
Within(Extent) Determines whether this geometry is within a specified extent.
Within(IGeometry) Determines whether this geometry is within a specified geometry.
static FromBinary(byte[]) Creates a geometry from its Well-Known Binary representation.
static FromBinary(byte[], SpatialReferenceSystem) Creates a geometry from its Well-Known Binary representation.
static FromText(string) Creates a geometry from its Well-Known Text representation.
static FromText(string, SpatialReferenceSystem) Creates a geometry from its Well-Known Text representation.

See Also