Re: earthdistance - Mailing list pgsql-general

From Bruno Wolff III
Subject Re: earthdistance
Date
Msg-id 20130824193542.GA23625@wolff.to
Whole thread Raw
In response to Re: earthdistance  (Olivier Chaussavoine <olivier.chaussavoine@gmail.com>)
List pgsql-general
On Tue, Aug 20, 2013 at 20:38:51 +0200,
   Olivier Chaussavoine <olivier.chaussavoine@gmail.com> wrote:
>I also look at cube extension, but the built in type box - a couple of
>points - does not require any extension and has a GIST index. It can be
>used to represent a rectangle on the domain [-PI/2,+PI/2[*[-PI,PI[. If the
>extension was providing a function get_rect_from_cap() giving the smallest
>rectangle of this domain containing a spherical cap, this rectangle could
>be used as you pointed out to reduce the set of rows where the earth
>distance need to be computed to know if a point A belongs to the cap. The
>operator && (box overlaps box) could be used if the point A is converted to
>box(A,A). Do you think this function get_rect_from_cap() could be usefull?

Depending on how the sphere is represented, getting the minimum bounding
cube is pretty simple and it might not be worth writing a function for
this.


pgsql-general by date:

Previous
From: Peter Eisentraut
Date:
Subject: Call for translations
Next
From: Korisk
Date:
Subject: batch insertion