The geomdistance filter computes the distance between a given polygon and points.

Default Embedded Stage

This stage is enabled by default

Streamable Stage

This stage supports streaming operations

Example 1

This example computes the 2D distance of points to the given geometry.

        "geometry":"POLYGON ((636889.412951239268295 851528.512293258565478 422.7001953125,636899.14233423944097 851475.000686757150106 422.4697265625,636899.14233423944097 851475.000686757150106 422.4697265625,636928.33048324030824 851494.459452757611871 422.5400390625,636928.33048324030824 851494.459452757611871 422.5400390625,636928.33048324030824 851494.459452757611871 422.5400390625,636976.977398241520859 851513.918218758190051 424.150390625,636976.977398241520859 851513.918218758190051 424.150390625,637069.406536744092591 851475.000686757150106 438.7099609375,637132.647526245797053 851445.812537756282836 425.9501953125,637132.647526245797053 851445.812537756282836 425.9501953125,637336.964569251285866 851411.759697255445644 425.8203125,637336.964569251285866 851411.759697255445644 425.8203125,637473.175931254867464 851158.795739248627797 435.6298828125,637589.928527257987298 850711.244121236610226 420.509765625,637244.535430748714134 850511.791769731207751 420.7998046875,636758.066280735656619 850667.461897735483944 434.609375,636539.155163229792379 851056.63721774588339 422.6396484375,636889.412951239268295 851528.512293258565478 422.7001953125))",
Normal mode distance of Autzen to selection

Normal distance mode causes any points within the given polygon to have a distance of 0.

Ring mode distance of Autzen to selection

ring of True causes the polygon external ring to be used for distance computation, resulting in distances inside the polygon to be computed.



The polygon, expressed in a well-known text string, eg: "POLYGON((0 0, 5000 10000, 10000 0, 0 0))".


The dimension to write the distance into bounds or polygon. [Default: distance]


Use the outer ring of the polygon (so as to get distances to the exterior ring instead of all points inside the polygon having distance 0). [Default: false]


An expression that limits points passed to a filter. Points that don’t pass the expression skip the stage but are available to subsequent stages in a pipeline. [Default: no filtering]


A strategy for merging points skipped by a ‘where’ option when running in standard mode. If true, the skipped points are added to the first point view returned by the skipped filter. If false, skipped points are placed in their own point view. If auto, skipped points are merged into the returned point view provided that only one point view is returned and it has the same point count as it did when the filter was run. [Default: auto]