On 21 Jul 2010, at 23:14, Joe Conway m...@joeconway.com wrote:
If you want something simple, and not requiring PostGIS, but plpgsql
instead, see:
http://archives.postgresql.org/pgsql-sql/2003-12/msg00193.php
For completeness, the earthdistance module also provides the distance between
two
Oliver Kohll - Mailing Lists wrote:
On 21 Jul 2010, at 23:14, Joe Conway m...@joeconway.com
mailto:m...@joeconway.com wrote:
If you want something simple, and not requiring PostGIS, but plpgsql
instead, see:
http://archives.postgresql.org/pgsql-sql/2003-12/msg00193.php
For completeness,
Oliver Kohll - Mailing Lists wrote:
On 21 Jul 2010, at 23:14, Joe Conway m...@joeconway.com
mailto:m...@joeconway.com wrote:
If you want something simple, and not requiring PostGIS, but plpgsql
instead, see:
http://archives.postgresql.org/pgsql-sql/2003-12/msg00193.php
For completeness,
Oliver Kohll - Mailing Lists wrote:
On 21 Jul 2010, at 23:14, Joe Conway m...@joeconway.com
mailto:m...@joeconway.com wrote:
If you want something simple, and not requiring PostGIS, but plpgsql
instead, see:
http://archives.postgresql.org/pgsql-sql/2003-12/msg00193.php
For completeness,
On 22 Jul 2010, at 12:57, Geoffrey wrote:
For completeness, the earthdistance module also provides the distance
between two lat/longs, the point@point syntax is simple to use:
http://www.postgresql.org/docs/8.3/static/earthdistance.html
Disgregard my last post, Surely as soon as I hit
Oliver Kohll - Mailing Lists wrote:
On 22 Jul 2010, at 12:57, Geoffrey wrote:
For completeness, the earthdistance module also provides the distance
between two lat/longs, the point@point syntax is simple to use:
http://www.postgresql.org/docs/8.3/static/earthdistance.html
Disgregard my
We need to locate all cities within a certain distance of a single city.
We have longitude and latitude data for all cities. I was thinking
postGIS was a viable solution, but I don't see a way to use our existing
data via postGIS.
Is postGIS a viable solution, or should I be looking at a
On 7/21/2010 8:01 AM, Geoffrey wrote:
We need to locate all cities within a certain distance of a single city.
We have longitude and latitude data for all cities. I was thinking
postGIS was a viable solution, but I don't see a way to use our existing
data via postGIS.
Is postGIS a viable
On 07/21/2010 06:01 AM, Geoffrey wrote:
We need to locate all cities within a certain distance of a single city.
We have longitude and latitude data for all cities. I was thinking
postGIS was a viable solution, but I don't see a way to use our existing
data via postGIS.
Is postGIS a
: PostgreSQL List
Subject: Re: [GENERAL] locating cities within a radius of another
On 07/21/2010 06:01 AM, Geoffrey wrote:
We need to locate all cities within a certain distance of a single city.
We have longitude and latitude data for all cities. I was thinking
postGIS was a viable solution, but I
create table cities (
geog geography,
name varchar,
id integer primary key
);
insert into cities
select
Geography(ST_SetSRID(ST_MakePoint(lon, lat),4326)) as geog,
name, id
from mytable;
create index cities_gix on cities using gist ( geog );
select st_distance(a.geog, b.geog),
2010 12:04
To: Joe Conway; Geoffrey
Cc: PostgreSQL List
Subject: Re: [GENERAL] locating cities within a radius of another
Once PostGIS is installed you can do it with a single SQL query looking like
this:
SELECT dest.id, ST_Distance(ST_MakePoint(orig.longitude, orig.latitude),
ST_MakePoint
12 matches
Mail list logo