From: | Assad Jarrahian <jarraa(at)gmail(dot)com> |
---|---|
To: | Michael Fuhr <mike(at)fuhr(dot)org> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: getting access to geodistance (what do I need to install/enable) in an existing db install |
Date: | 2006-01-11 23:20:05 |
Message-ID: | 4bd3e1480601111520v62a75b0era7064219e18c94f6@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Michael and all,
my appologies. It was a typo. The method is geo_distance(point, point)
I copied this from psql
mingle=# \df+ geo_distance
List of functions
Schema | Name | Result data type | Argument data types | Owner | Lan
guage | Source code | Description
--------+--------------+------------------+---------------------+----------+----
------+--------------+-------------
public | geo_distance | double precision | point, point | postgres | c
| geo_distance |
(1 row)
additionally I got this from pg_admin
CREATE OR REPLACE FUNCTION geo_distance(point, point)
RETURNS float8 AS
'$libdir/earthdistance', 'geo_distance'
LANGUAGE 'c' IMMUTABLE STRICT;
ALTER FUNCTION geo_distance(point, point) OWNER TO postgres;
I dont mind using any other distance method, but I cannot seem to find
any in my db (I presume I do not have postgis installed). How would I
go about installing (debian apt) and adding it to my current db.
Much thanks in advance.
-assad
On 1/11/06, Michael Fuhr <mike(at)fuhr(dot)org> wrote:
> On Wed, Jan 11, 2006 at 02:40:04PM -0700, Assad Jarrahian wrote:
> > I was running postgres 8.1 on a windows xp box and I recall
> > installing it with postgis option.
> > I had a method in a db there that called geodistance. Everything worked fine.
>
> Neither PostgreSQL nor PostGIS have a geodistance function, at least
> not in recent versions. However, PostGIS does have distance,
> distance_sphere, and distance_spheroid functions.
>
> > Now I tried to restore the db on the debian server thats running 8.1
> > as well. The geodistance function (or any other geometry function ) is
> > not available.
>
> Googling for "geodistance" returns a few hundred hits, but googling
> for "postgresql geodistance" or "postgis geodistance" yields only
> a few hits. The following message to pgsql-hackers from over five
> years ago is the only hit I found in the PostgreSQL or PostGIS
> mailing lists:
>
> http://archives.postgresql.org/pgsql-hackers/2000-11/msg01232.php
>
> I'd guess geodistance is or was part of some add-on. If you connect
> to the XP box with psql, what does "\df+ geodistance" show? If
> it's an SQL or PL/pgSQL function then you could copy its source
> into the new database with CREATE FUNCTION, but maybe you'd be
> better off using one of the standard functions.
>
> What, if anything, does geodistance do that the standard PostGIS
> distance functions don't?
>
> --
> Michael Fuhr
>
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Fuhr | 2006-01-11 23:31:02 | Re: getting access to geodistance (what do I need to install/enable) in an existing db install |
Previous Message | rlee0001 | 2006-01-11 22:57:42 | Returning SQL statement |