Class FunctionsUtil
A utility class to get GeometryFactorys, Envelopes off of Geometrys or to build aggregate geometries.
Inherited Members
Namespace: NetTopologySuite.Utilities
Assembly: NetTopologySuite.dll
Syntax
public class FunctionsUtil
Fields
| Improve this Doc View SourceDefaultEnvelope
Gets a default envelope
Declaration
public static readonly Envelope DefaultEnvelope
Field Value
Type | Description |
---|---|
Envelope |
Methods
| Improve this Doc View SourceBuildGeometry(Geometry, Geometry)
Method to build a geometry.
Declaration
public static Geometry BuildGeometry(Geometry a, Geometry b)
Parameters
Type | Name | Description |
---|---|---|
Geometry | a | A geometry |
Geometry | b | A geometry |
Returns
Type | Description |
---|---|
Geometry | A |
BuildGeometry(Geometry[])
Method to build a geometry.
Declaration
public static Geometry BuildGeometry(params Geometry[] geoms)
Parameters
Type | Name | Description |
---|---|---|
Geometry[] | geoms | An array of geometries |
Returns
Type | Description |
---|---|
Geometry | A |
BuildGeometry(IList<Geometry>, Geometry)
Builds a geometry from a list of geometries.
The function returns
null
if the list isnull
or empty
if the list contains one single item.geoms
[0]- a GeometryCollection
- a Multi-geometry
Declaration
public static Geometry BuildGeometry(IList<Geometry> geoms, Geometry parentGeom)
Parameters
Type | Name | Description |
---|---|---|
IList<Geometry> | geoms | A list of geometries. |
Geometry | parentGeom | A parent geometry |
Returns
Type | Description |
---|---|
Geometry | A geometry. |
BuildGeometry(List<Geometry>, Geometry)
Builds a geometry from a list of geometries.
The function returns
null
if the list isnull
or empty
if the list contains one single item.geoms
[0]- a GeometryCollection
- a Multi-geometry
Declaration
[Obsolete]
public static Geometry BuildGeometry(List<Geometry> geoms, Geometry parentGeom)
Parameters
Type | Name | Description |
---|---|---|
List<Geometry> | geoms | A list of geometries. |
Geometry | parentGeom | A parent geometry |
Returns
Type | Description |
---|---|
Geometry | A geometry. |
GetEnvelopeOrDefault(Geometry)
Gets the envelope of a geometry.
Declaration
public static Envelope GetEnvelopeOrDefault(Geometry g)
Parameters
Type | Name | Description |
---|---|---|
Geometry | g | A geometry |
Returns
Type | Description |
---|---|
Envelope | The envelope of |
GetFactoryOrDefault(Geometry)
Function to get the geometry factory of a geometry. If
g
is null
, a default geometry
factory is returned.
Declaration
public static GeometryFactory GetFactoryOrDefault(Geometry g)
Parameters
Type | Name | Description |
---|---|---|
Geometry | g | A geometry |
Returns
Type | Description |
---|---|
GeometryFactory | A geometry factory |
GetFactoryOrDefault(IEnumerable<Geometry>)
Function to get the geometry factory of the first geometry in a series of geometries.
If no geometry is provided in gs
,
a default geometry factory is returned.
Declaration
public static GeometryFactory GetFactoryOrDefault(IEnumerable<Geometry> gs)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<Geometry> | gs | An enumeration of geometries |
Returns
Type | Description |
---|---|
GeometryFactory | A geometry factory |