From: | "Agustin Casiva" <casivaagustin(at)gmail(dot)com> |
---|---|
To: | pgsql-es-ayuda(at)postgresql(dot)org |
Subject: | Re: Unidades de geo_distance |
Date: | 2008-04-21 16:11:52 |
Message-ID: | 646eb5870804210911p429bd7e2m6360667eaeab51a9@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-es-ayuda |
On Thu, Apr 10, 2008 at 10:54 PM, Roberto Andrade Fonseca <
randradefonseca(at)gmail(dot)com> wrote:
> Hola:
>
> Estoy usando esta consulta, suponiendo que geo_distance me regresa el
> resultado en millas, pero creo que NO es así:
>
> select geo_distance(point(19.455718,
> -99.175429),point(19.422867,-99.165344))::numeric(9,3)*1.64;
>
> ¿Alguien sabe en que unidades se expresa el valor de retorno?
Hola a todos, hace mucho que no respondo nada....
Según los comentarios del fuente, la unidad de retorno es millas
Puedes verlo en este framento
/******************************************************
*
* geo_distance - distance between points
*
* args:
* a pair of points - for each point,
* x-coordinate is longitude in degrees west of Greenwich
* y-coordinate is latitude in degrees above equator
*
* returns: float8
* distance between the points in miles on earth's surface
*
* If float8 is passed-by-value, the oldstyle version-0 calling convention
* is unportable, so we use version-1. However, if it's
passed-by-reference,
* continue to use oldstyle. This is just because we'd like earthdistance
* to serve as a canary for any unintentional breakage of version-0
functions
* with float8 results.
.....
--
Agustin Casiva
casivaagustin(at)gmail(dot)com
http://casivaagustin.com.ar
http://casiva.com.ar
http://casivaagustin.blogspot.com
From | Date | Subject | |
---|---|---|---|
Next Message | Roberto Andrade Fonseca | 2008-04-21 16:24:53 | Re: Unidades de geo_distance |
Previous Message | César Piñera García | 2008-04-21 15:58:23 | RE: Quitar acentos de palabras codificadas en UTF8 |