Search Results for

    Show / Hide Table of Contents

    Class NtsGeometryServices

    A geometry service provider class

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

    When overriding this class, you need to provide a public constructor with the following arguments:

    1. A factory to create coordinate sequences
    2. PrecisionModelA precision model
    3. intspatial reference id (srid)
    4. GeometryOverlayA class that bundles an overlay operation function set
    5. CoordinateEqualityComparerA class that performs checks Coordinates for equality.
    NtsGeometryServices(CoordinateSequenceFactory, PrecisionModel, int, GeometryOverlay, CoordinateEqualityComparer)

    Constructors

    | Edit this page View Source

    NtsGeometryServices()

    Creates an instance of this class, using the CoordinateArraySequenceFactory as default and a Floating precision model.
    No DefaultSRID is specified.
    The Legacy function set for overlay operations is being used.

    Declaration
    public NtsGeometryServices()
    | Edit this page View Source

    NtsGeometryServices(CoordinateSequenceFactory)

    Creates an instance of this class, using a Floating precision model as default.
    No DefaultSRID is specified.
    The default coordinate sequence factory is defined by coordinateSequenceFactory.
    The Legacy function set for overlay operations is being used.

    Declaration
    public NtsGeometryServices(CoordinateSequenceFactory coordinateSequenceFactory)
    Parameters
    Type Name Description
    CoordinateSequenceFactory coordinateSequenceFactory
    | Edit this page View Source

    NtsGeometryServices(CoordinateSequenceFactory, PrecisionModel, int)

    Creates an instance of this class, using the provided CoordinateSequenceFactory, PrecisionModel and spatial reference Id (srid).

    Declaration
    public NtsGeometryServices(CoordinateSequenceFactory coordinateSequenceFactory, PrecisionModel precisionModel, int srid)
    Parameters
    Type Name Description
    CoordinateSequenceFactory coordinateSequenceFactory

    The coordinate sequence factory to use.

    PrecisionModel precisionModel

    The precision model.

    int srid

    The default spatial reference ID

    | Edit this page View Source

    NtsGeometryServices(CoordinateSequenceFactory, PrecisionModel, int, GeometryOverlay, CoordinateEqualityComparer)

    Creates an instance of this class, using the provided CoordinateSequenceFactory, PrecisionModel, a spatial reference Id (srid) and a GeometryOverlay.

    Declaration
    public NtsGeometryServices(CoordinateSequenceFactory coordinateSequenceFactory, PrecisionModel precisionModel, int srid, GeometryOverlay geometryOverlay, CoordinateEqualityComparer coordinateEqualityComparer)
    Parameters
    Type Name Description
    CoordinateSequenceFactory coordinateSequenceFactory

    The coordinate sequence factory to use.

    PrecisionModel precisionModel

    The precision model.

    int srid

    The default spatial reference ID

    GeometryOverlay geometryOverlay

    The geometry overlay function set to use.

    CoordinateEqualityComparer coordinateEqualityComparer

    The equality comparer for coordinates

    | Edit this page View Source

    NtsGeometryServices(CoordinateSequenceFactory, PrecisionModel, int, GeometryOverlay, GeometryRelate, CoordinateEqualityComparer)

    Creates an instance of this class, using the provided CoordinateSequenceFactory, PrecisionModel, a spatial reference Id (srid) and a GeometryOverlay.

    Declaration
    public NtsGeometryServices(CoordinateSequenceFactory coordinateSequenceFactory, PrecisionModel precisionModel, int srid, GeometryOverlay geometryOverlay, GeometryRelate geometryRelate, CoordinateEqualityComparer coordinateEqualityComparer)
    Parameters
    Type Name Description
    CoordinateSequenceFactory coordinateSequenceFactory

    The coordinate sequence factory to use.

    PrecisionModel precisionModel

    The precision model.

    int srid

    The default spatial reference ID

    GeometryOverlay geometryOverlay

    The geometry overlay function set to use.

    GeometryRelate geometryRelate

    The geometry relate function set to use.

    CoordinateEqualityComparer coordinateEqualityComparer

    The equality comparer for coordinates

    | Edit this page View Source

    NtsGeometryServices(CoordinateSequenceFactory, PrecisionModel, int, GeometryOverlay, GeometryRelate, CoordinateEqualityComparer, ElevationModel)

    Creates an instance of this class, using the provided CoordinateSequenceFactory, PrecisionModel, a spatial reference Id (srid) and a GeometryOverlay.

    Declaration
    public NtsGeometryServices(CoordinateSequenceFactory coordinateSequenceFactory, PrecisionModel precisionModel, int srid, GeometryOverlay geometryOverlay, GeometryRelate geometryRelate, CoordinateEqualityComparer coordinateEqualityComparer, ElevationModel elevationModel)
    Parameters
    Type Name Description
    CoordinateSequenceFactory coordinateSequenceFactory

    The coordinate sequence factory to use.

    PrecisionModel precisionModel

    The precision model.

    int srid

    The default spatial reference ID

    GeometryOverlay geometryOverlay

    The geometry overlay function set to use.

    GeometryRelate geometryRelate

    The geometry relate function set to use.

    CoordinateEqualityComparer coordinateEqualityComparer

    The equality comparer for coordinates

    ElevationModel elevationModel

    The elevation model that is used as default. May be null

    | Edit this page View Source

    NtsGeometryServices(GeometryOverlay)

    Creates an instance of this class, using the CoordinateArraySequenceFactory as default and a Floating precision model. No DefaultSRID is specified

    Declaration
    public NtsGeometryServices(GeometryOverlay geometryOverlay)
    Parameters
    Type Name Description
    GeometryOverlay geometryOverlay

    The function set to perform overlay operations

    | Edit this page View Source

    NtsGeometryServices(GeometryOverlay, GeometryRelate)

    Creates an instance of this class, using the CoordinateArraySequenceFactory as default and a Floating precision model. No DefaultSRID is specified

    Declaration
    public NtsGeometryServices(GeometryOverlay geometryOverlay, GeometryRelate geometryRelate)
    Parameters
    Type Name Description
    GeometryOverlay geometryOverlay

    The function set to perform overlay operations

    GeometryRelate geometryRelate

    The geometry relate function set to use.

    | Edit this page View Source

    NtsGeometryServices(GeometryRelate)

    Creates an instance of this class, using the CoordinateArraySequenceFactory as default and a Floating precision model. No DefaultSRID is specified

    Declaration
    public NtsGeometryServices(GeometryRelate geometryRelate)
    Parameters
    Type Name Description
    GeometryRelate geometryRelate

    The geometry relate function set to use.

    | Edit this page View Source

    NtsGeometryServices(PrecisionModel)

    Creates an instance of this class, using the CoordinateArraySequenceFactory as default.
    No DefaultSRID is specified.
    The default precision model is defined by precisionModel.
    The Legacy function set for overlay operations is being used.

    Declaration
    public NtsGeometryServices(PrecisionModel precisionModel)
    Parameters
    Type Name Description
    PrecisionModel precisionModel
    | Edit this page View Source

    NtsGeometryServices(PrecisionModel, int)

    Creates an instance of this class, using the CoordinateArraySequenceFactory as default.
    A value of srid is assigned to DefaultSRID.
    The default precision model is defined by precisionModel.
    The Legacy function set for overlay operations is being used.

    Declaration
    public NtsGeometryServices(PrecisionModel precisionModel, int srid)
    Parameters
    Type Name Description
    PrecisionModel precisionModel
    int srid

    Properties

    | Edit this page View Source

    CoordinateEqualityComparer

    Gets an object that is used to test 2 coordinates for equality.

    Declaration
    public CoordinateEqualityComparer CoordinateEqualityComparer { get; }
    Property Value
    Type Description
    CoordinateEqualityComparer

    A coordinate equality tester object

    | Edit this page View Source

    DefaultCoordinateSequenceFactory

    Gets the default coordiate sequence factory to use

    Declaration
    public CoordinateSequenceFactory DefaultCoordinateSequenceFactory { get; }
    Property Value
    Type Description
    CoordinateSequenceFactory
    | Edit this page View Source

    DefaultElevationModel

    Gets the default elevation model

    Declaration
    public ElevationModel DefaultElevationModel { get; }
    Property Value
    Type Description
    ElevationModel
    | Edit this page View Source

    DefaultPrecisionModel

    Gets the default precision model

    Declaration
    public PrecisionModel DefaultPrecisionModel { get; }
    Property Value
    Type Description
    PrecisionModel
    | Edit this page View Source

    DefaultSRID

    Gets the default spatial reference id

    Declaration
    public int DefaultSRID { get; }
    Property Value
    Type Description
    int
    | Edit this page View Source

    GeometryOverlay

    Gets a value indicating the operations to use for geometry overlay.

    Declaration
    public GeometryOverlay GeometryOverlay { get; }
    Property Value
    Type Description
    GeometryOverlay

    A set of geometry overlay functions.

    | Edit this page View Source

    GeometryRelate

    Gets a value indicating the operations to use for geometry relation determination.

    Declaration
    public GeometryRelate GeometryRelate { get; }
    Property Value
    Type Description
    GeometryRelate

    A set of geometry relation functions.

    | Edit this page View Source

    Instance

    Gets or sets the default instance of NtsGeometryServices.

    Declaration
    public static NtsGeometryServices Instance { get; set; }
    Property Value
    Type Description
    NtsGeometryServices
    Exceptions
    Type Condition
    ArgumentNullException

    Thrown when trying to set the value to null.

    Methods

    | Edit this page View Source

    CreateGeometryFactory()

    Creates or retrieves a geometry factory using DefaultSRID, DefaultPrecisionModel and DefaultCoordinateSequenceFactory.

    Declaration
    public GeometryFactory CreateGeometryFactory()
    Returns
    Type Description
    GeometryFactory

    A geometry factory

    | Edit this page View Source

    CreateGeometryFactory(CoordinateSequenceFactory)

    Creates or retrieves a geometry factory using DefaultSRID, DefaultPrecisionModel and coordinateSequenceFactory.

    Declaration
    public GeometryFactory CreateGeometryFactory(CoordinateSequenceFactory coordinateSequenceFactory)
    Parameters
    Type Name Description
    CoordinateSequenceFactory coordinateSequenceFactory
    Returns
    Type Description
    GeometryFactory

    A geometry factory

    | Edit this page View Source

    CreateGeometryFactory(PrecisionModel)

    Creates or retrieves a geometry factory using DefaultSRID, precisionModel and DefaultCoordinateSequenceFactory.

    Declaration
    public GeometryFactory CreateGeometryFactory(PrecisionModel precisionModel)
    Parameters
    Type Name Description
    PrecisionModel precisionModel

    The precision model to use.

    Returns
    Type Description
    GeometryFactory

    A geometry factory

    | Edit this page View Source

    CreateGeometryFactory(PrecisionModel, ElevationModel, int, CoordinateSequenceFactory)

    Creates or retrieves a geometry factory using srid, precisionModel elevationModel and coordinateSequenceFactory.

    Declaration
    public GeometryFactory CreateGeometryFactory(PrecisionModel precisionModel, ElevationModel elevationModel, int srid, CoordinateSequenceFactory coordinateSequenceFactory)
    Parameters
    Type Name Description
    PrecisionModel precisionModel

    The precision model to use.

    ElevationModel elevationModel

    The elevation model to use. May be null

    int srid

    The spatial reference id.

    CoordinateSequenceFactory coordinateSequenceFactory
    Returns
    Type Description
    GeometryFactory

    A geometry factory

    | Edit this page View Source

    CreateGeometryFactory(PrecisionModel, int)

    Creates or retrieves a geometry factory using srid, precisionModel and DefaultCoordinateSequenceFactory.

    Declaration
    public GeometryFactory CreateGeometryFactory(PrecisionModel precisionModel, int srid)
    Parameters
    Type Name Description
    PrecisionModel precisionModel

    The precision model to use.

    int srid

    The spatial reference id.

    Returns
    Type Description
    GeometryFactory

    A geometry factory

    | Edit this page View Source

    CreateGeometryFactory(PrecisionModel, int, CoordinateSequenceFactory)

    Creates or retrieves a geometry factory using srid, precisionModel and coordinateSequenceFactory.

    Declaration
    public GeometryFactory CreateGeometryFactory(PrecisionModel precisionModel, int srid, CoordinateSequenceFactory coordinateSequenceFactory)
    Parameters
    Type Name Description
    PrecisionModel precisionModel

    The precision model to use.

    int srid

    The spatial reference id.

    CoordinateSequenceFactory coordinateSequenceFactory
    Returns
    Type Description
    GeometryFactory

    A geometry factory

    | Edit this page View Source

    CreateGeometryFactory(int)

    Creates or retrieves a geometry factory using srid, DefaultPrecisionModel and DefaultCoordinateSequenceFactory.

    Declaration
    public GeometryFactory CreateGeometryFactory(int srid)
    Parameters
    Type Name Description
    int srid
    Returns
    Type Description
    GeometryFactory

    A geometry factory

    | Edit this page View Source

    CreateGeometryFactoryCore(PrecisionModel, ElevationModel, int, CoordinateSequenceFactory)

    Creates a GeometryFactory based on the given parameters.

    Declaration
    protected virtual GeometryFactory CreateGeometryFactoryCore(PrecisionModel precisionModel, ElevationModel elevationModel, int srid, CoordinateSequenceFactory coordinateSequenceFactory)
    Parameters
    Type Name Description
    PrecisionModel precisionModel

    The value for PrecisionModel.

    ElevationModel elevationModel

    The value for ElevationModel. May be null

    int srid

    The value for SRID.

    CoordinateSequenceFactory coordinateSequenceFactory

    The value for CoordinateSequenceFactory.

    Returns
    Type Description
    GeometryFactory

    A GeometryFactory that has the given values.

    Remarks

    This method is expected to be safe to call from any number of threads at once.

    Implementations must make sure to use a constructor which is properly assigning GeometryOverlay to the factory.

    Although the result for a given set of parameters is cached, there is no guarantee that, once this method is called with some set of parameters, it will never be called again with an exactly equal set of parameters. When this does happen, an arbitrary result is chosen as the winner (not necessarily the first one to start or finish), and all other results are discarded.

    | Edit this page View Source

    CreateGeometryFactoryCore(PrecisionModel, int, CoordinateSequenceFactory)

    Creates a GeometryFactory based on the given parameters.

    Declaration
    protected virtual GeometryFactory CreateGeometryFactoryCore(PrecisionModel precisionModel, int srid, CoordinateSequenceFactory coordinateSequenceFactory)
    Parameters
    Type Name Description
    PrecisionModel precisionModel

    The value for PrecisionModel.

    int srid

    The value for SRID.

    CoordinateSequenceFactory coordinateSequenceFactory

    The value for CoordinateSequenceFactory.

    Returns
    Type Description
    GeometryFactory

    A GeometryFactory that has the given values.

    Remarks

    This method is expected to be safe to call from any number of threads at once.

    Implementations must make sure to use a constructor which is properly assigning GeometryOverlay to the factory.

    Although the result for a given set of parameters is cached, there is no guarantee that, once this method is called with some set of parameters, it will never be called again with an exactly equal set of parameters. When this does happen, an arbitrary result is chosen as the winner (not necessarily the first one to start or finish), and all other results are discarded.

    | Edit this page View Source

    CreatePrecisionModel(PrecisionModel)

    Creates a precision model based on given precision model.

    Declaration
    [Obsolete("Will be removed in a future version")]
    public PrecisionModel CreatePrecisionModel(PrecisionModel precisionModel)
    Parameters
    Type Name Description
    PrecisionModel precisionModel
    Returns
    Type Description
    PrecisionModel

    The precision model

    | Edit this page View Source

    CreatePrecisionModel(PrecisionModels)

    Creates a precision model based on given precision model type

    Declaration
    [Obsolete("Will be removed in a future version")]
    public PrecisionModel CreatePrecisionModel(PrecisionModels modelType)
    Parameters
    Type Name Description
    PrecisionModels modelType
    Returns
    Type Description
    PrecisionModel

    The precision model type

    | Edit this page View Source

    CreatePrecisionModel(double)

    Creates a precision model based on the given scale factor.

    Declaration
    [Obsolete("Will be removed in a future version")]
    public PrecisionModel CreatePrecisionModel(double scale)
    Parameters
    Type Name Description
    double scale

    The scale factor

    Returns
    Type Description
    PrecisionModel

    The precision model.

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