Search Results for

    Show / Hide Table of Contents

    Class ElevationModel

    A base elevation model class.

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

    Constructors

    | Edit this page View Source

    ElevationModel()

    Creates an elevation model that always returns NullOrdinate as result.

    Declaration
    public ElevationModel()
    | Edit this page View Source

    ElevationModel(double)

    Creates an elevation model that always returns z as result.

    Declaration
    public ElevationModel(double z)
    Parameters
    Type Name Description
    double z

    The result value for GetZ(Coordinate) or its overloads.

    | Edit this page View Source

    ElevationModel(double, Envelope)

    Creates an elevation model that always returns z as result.

    Declaration
    public ElevationModel(double z, Envelope extent)
    Parameters
    Type Name Description
    double z

    The result value for GetZ(Coordinate) or its overloads.

    Envelope extent

    The extent where this elevation model is valid

    Properties

    | Edit this page View Source

    Extent

    Gets a value indicating the extent where this elevation model is valid.

    Declaration
    public Envelope Extent { get; }
    Property Value
    Type Description
    Envelope
    Remarks

    If this value is null, no check for the validity of the input arguments for GetZ(Coordinate) and its overload is made.

    | Edit this page View Source

    NoZ

    Gets or sets a value indicating the default ElevationModel

    Declaration
    public static ElevationModel NoZ { get; }
    Property Value
    Type Description
    ElevationModel
    Remarks

    The value null cannot be assigned to this property, it will be converted to a no-op elevation model.

    Methods

    | Edit this page View Source

    GetZ(Coordinate)

    Gets the z-ordinate value for a given coordinate.

    For locations outside of Extent, NullOrdinate is returned.
    Declaration
    public virtual double GetZ(Coordinate coordinate)
    Parameters
    Type Name Description
    Coordinate coordinate

    A coordinate to get the z-ordinate value.

    Returns
    Type Description
    double

    The z-ordinate value

    | Edit this page View Source

    GetZ(double, double)

    Gets the z-ordinate value for a given pair of x and y ordinates.

    For locations outside of Extent, NullOrdinate is returned.
    Declaration
    public virtual double GetZ(double x, double y)
    Parameters
    Type Name Description
    double x

    A x-ordinate value.

    double y

    A y-ordinate value.

    Returns
    Type Description
    double

    The z-ordinate value

    | Edit this page View Source

    GetZ(ReadOnlySpan<double>, Span<double>)

    Gets missing z-ordinate values for xy-ordinate pairs.

    For locations outside of Extent, NullOrdinate is set.

    In order to update z-ordinate at index idx double.IsNaN(z[idx]) has to be true.
    Declaration
    public virtual void GetZ(ReadOnlySpan<double> xy, Span<double> z)
    Parameters
    Type Name Description
    ReadOnlySpan<double> xy

    An array of x- and y- ordinates

    Span<double> z

    An array for the missing z-ordinate values

    Exceptions
    Type Condition
    ArgumentException

    Thrown if xy span isn't twice the size of z-span

    Extension Methods

    ElevationModels.AddMissingZ(ElevationModel, Geometry)
    ElevationModels.AddMissingZ(ElevationModel, Geometry, ElevationModels.CoordinateSequenceToXYAndZ)
    ElevationModels.CopyWithZ(ElevationModel, Coordinate)
    ElevationModels.GetZ(ElevationModel, double[], double[])
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX