Search Results for

    Show / Hide Table of Contents

    Class FunctionsUtil

    A utility class to get GeometryFactorys, Envelopes off of Geometrys or to build aggregate geometries.

    Inheritance
    object
    FunctionsUtil
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: NetTopologySuite.Utilities
    Assembly: NetTopologySuite.dll
    Syntax
    public class FunctionsUtil

    Fields

    | Edit this page View Source

    DefaultEnvelope

    Gets a default envelope

    Declaration
    public static readonly Envelope DefaultEnvelope
    Field Value
    Type Description
    Envelope

    Methods

    | Edit this page View Source

    BuildGeometry(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 GEOMETRYCOLLECTION containing a and b.

    | Edit this page View Source

    BuildGeometry(params 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 GEOMETRYCOLLECTION containing geoms.

    | Edit this page View Source

    BuildGeometry(IList<Geometry>, Geometry)

    Builds a geometry from a list of geometries.

    The function returns
    • nullif the list is null or empty
    • geoms[0]if the list contains one single item.
    • 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.

    | Edit this page View Source

    BuildGeometry(List<Geometry>, Geometry)

    Builds a geometry from a list of geometries.

    The function returns
    • nullif the list is null or empty
    • geoms[0]if the list contains one single item.
    • 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.

    | Edit this page View Source

    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 g or DefaultEnvelope if g == null.

    | Edit this page View Source

    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

    | Edit this page View Source

    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

    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX