Table of Contents

Method GeoNear

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

GeoNear<TInput, TCoordinates, TOutput>(GeoJsonPoint<TCoordinates>, GeoNearOptions<TInput, TOutput>)

Creates a $geoNear stage.

public static PipelineStageDefinition<TInput, TOutput> GeoNear<TInput, TCoordinates, TOutput>(GeoJsonPoint<TCoordinates> near, GeoNearOptions<TInput, TOutput> options = null) where TCoordinates : GeoJsonCoordinates

Parameters

near GeoJsonPoint<TCoordinates>

The point for which to find the closest documents.

options GeoNearOptions<TInput, TOutput>

The options.

Returns

PipelineStageDefinition<TInput, TOutput>

The stage.

Type Parameters

TInput

The type of the input documents.

TCoordinates

The type of the coordinates for the point.

TOutput

The type of the output documents.

GeoNear<TInput, TOutput>(double[], GeoNearOptions<TInput, TOutput>)

Creates a $geoNear stage.

public static PipelineStageDefinition<TInput, TOutput> GeoNear<TInput, TOutput>(double[] near, GeoNearOptions<TInput, TOutput> options = null)

Parameters

near double[]

The point for which to find the closest documents.

options GeoNearOptions<TInput, TOutput>

The options.

Returns

PipelineStageDefinition<TInput, TOutput>

The stage.

Type Parameters

TInput

The type of the input documents.

TOutput

The type of the output documents.