Skip to content

withDistance casting to geometry when underlying column is geography #123

Open
@AlexGodbehere

Description

@AlexGodbehere

I have a geography column (called location) and the built-in withDistance and whereDistance functions are casting the column to a geometry (via GeometryExpression:normalize()). Are geography columns not supported?

    public function normalize(ConnectionInterface $connection): string
    {
        return $connection instanceof PostgresConnection
          ? $this->expression.'::geometry'
          : $this->expression;
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions