stDWithin function
FunctionExpression
stDWithin(
- Expression g1,
- Expression g2,
- Expression tolerance, {
- Expression? useSpheroid,
Returns true if the geometries are within a given distance.
For geometry: The distance is specified in units defined by the spatial reference system of the geometries. For this function to make sense, the source geometries must be in the same coordinate system (have the same SRID).
For geography: units are in meters and distance measurement defaults to use_spheroid = true. For faster evaluation use use_spheroid = false to measure on the sphere.
Implementation
FunctionExpression stDWithin(Expression g1, Expression g2, Expression tolerance,
{Expression? useSpheroid}) =>
FunctionExpression('ST_DWithin', [
g1,
g2,
tolerance,
if (useSpheroid != null) useSpheroid,
]);