ST_DISTANCE
Calcula a distância mínima cartesiana bidimensional entre duas geometrias formatadas em WKT nas unidades das entradas.
Sintaxe
ST_DISTANCE(first, second)
Argumentos
| Nome | Tipo | Descrição | Valor padrão |
|---|---|---|---|
| first | caractere | Um objeto espacial formatado em WKT | |
| second | caractere | Um objeto espacial formatado em WKT |
Retorna
Retorna um valor double.
Exemplos
| first | second | Saída |
|---|---|---|
| "POINT (152.352298 -24.875975)" | "POINT (151.960336 -24.993289)" | 0.409141520796879 |
| "POLYGON((-10 30, -40 40, -10 -20, 40 20, 0 0, -10 30))" | "POINT(16 0)" | 0.6246950475544248 |