Re: [HACKERS] Box operation algorithms - Mailing list pgsql-hackers

From Eugene Selkov Jr.
Subject Re: [HACKERS] Box operation algorithms
Date
Msg-id 35586CC7.5E7196B3@mcs.anl.gov
Whole thread Raw
In response to Box operation algorithms  ("Andy Farrell" <Andy_Farrell@gator-gate.itd.sterling.com>)
List pgsql-hackers
Andy Farrell wrote:
>
> REGARDING                Box operation algorithms
>
> Hello,
>
> I was wondering if the algorithms used to implement the operations on
> box/polygon/point datatypes are documented and available anywhere on the web?
>
> TIA,
> Andy

Most of geo funcions are one-liners or very small. I think they are easy
to understand. That's probably why no one (yet) felt an urge to document
them. If you have postgres sources, look in
/usr/src/pgsql/src/backend/utils/adt/geo_ops.c and
/usr/src/pgsql/src/backend/utils/adt/geo_selfuncs.c

Essential part of geo_ops.c are input routines dedicated to parsing of
external representations (box_in(), point_in() and friends). You can
safely ignore functions in this file whose names make no sense to you,
unless you find an accidental feature in parsing.

--Gene

pgsql-hackers by date:

Previous
From: "Thomas G. Lockhart"
Date:
Subject: Re: [HACKERS] Box operation algorithms
Next
From: Bruce Momjian
Date:
Subject: Re: [PATCHES] Try again: S_LOCK reduced contentionh]