Re: [HACKERS] Box operation algorithms

selkovjr@mcs.anl.gov

From: "Eugene Selkov Jr." <selkovjr@mcs.anl.gov>
To: Andy Farrell <Andy_Farrell@gator-gate.itd.sterling.com>
Cc: PostGreSQL Hackers <pgsql-hackers@postgreSQL.org>
Date: 1998-05-12T15:37:43Z
Lists: 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