Show / Hide Table of Contents

    Class SpatialArgs

    Principally holds the query and the SpatialOperation. It's used as an argument to some methods on SpatialStrategy.

    This is a Lucene.NET EXPERIMENTAL API, use at your own risk
    Inheritance
    System.Object
    SpatialArgs
    Namespace: Lucene.Net.Spatial.Queries
    Assembly: Lucene.Net.Spatial.dll
    Syntax
    public class SpatialArgs : object

    Constructors

    | Improve this Doc View Source

    SpatialArgs(SpatialOperation, IShape)

    Declaration
    public SpatialArgs(SpatialOperation operation, IShape shape)
    Parameters
    Type Name Description
    SpatialOperation operation
    IShape shape

    Fields

    | Improve this Doc View Source

    DEFAULT_DISTERRPCT

    Declaration
    public static readonly double DEFAULT_DISTERRPCT
    Field Value
    Type Description
    System.Double

    Properties

    | Improve this Doc View Source

    DistErr

    The acceptable error of the shape. This effectively inflates the size of the shape but should not shrink it.

    Declaration
    public virtual double? DistErr { get; set; }
    Property Value
    Type Description
    System.Nullable<System.Double>

    = 0

    | Improve this Doc View Source

    DistErrPct

    A measure of acceptable error of the shape as a fraction. This effectively inflates the size of the shape but should not shrink it.

    Declaration
    public virtual double? DistErrPct { get; set; }
    Property Value
    Type Description
    System.Nullable<System.Double>

    0 to 0.5

    | Improve this Doc View Source

    Operation

    Declaration
    public virtual SpatialOperation Operation { get; set; }
    Property Value
    Type Description
    SpatialOperation
    | Improve this Doc View Source

    Shape

    Declaration
    public virtual IShape Shape { get; set; }
    Property Value
    Type Description
    IShape

    Methods

    | Improve this Doc View Source

    CalcDistanceFromErrPct(IShape, Double, SpatialContext)

    Computes the distance given a shape and the distErrPct. The algorithm is the fraction of the distance from the center of the query shape to its furthest bounding box corner.

    Declaration
    public static double CalcDistanceFromErrPct(IShape shape, double distErrPct, SpatialContext ctx)
    Parameters
    Type Name Description
    IShape shape

    Mandatory.

    System.Double distErrPct

    0 to 0.5

    SpatialContext ctx

    Mandatory

    Returns
    Type Description
    System.Double

    A distance (in degrees).

    | Improve this Doc View Source

    ResolveDistErr(SpatialContext, Double)

    Gets the error distance that specifies how precise the query shape is. This looks at DistErr, DistErrPct, and defaultDistErrPct.

    Declaration
    public virtual double ResolveDistErr(SpatialContext ctx, double defaultDistErrPct)
    Parameters
    Type Name Description
    SpatialContext ctx
    System.Double defaultDistErrPct

    0 to 0.5

    Returns
    Type Description
    System.Double

    = 0

    | Improve this Doc View Source

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    System.String
    | Improve this Doc View Source

    Validate()

    Check if the arguments make sense -- throw an exception if not

    Declaration
    public virtual void Validate()
    • Improve this Doc
    • View Source
    Back to top Copyright © 2020 Licensed to the Apache Software Foundation (ASF)