Box operation algorithms

Started by Andy Farrellover 27 years ago3 messages
#1Thomas G. Lockhart
lockhart@alumni.caltech.edu
In reply to: Andy Farrell (#3)
Re: [HACKERS] Box operation algorithms

I was wondering if the algorithms used to implement the operations on
box/polygon/point datatypes are documented and available anywhere on
the web?

Use the source, Luke...

- Tom

#2Eugene Selkov Jr.
selkovjr@mcs.anl.gov
In reply to: Andy Farrell (#3)
Re: [HACKERS] Box operation algorithms

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

#3Andy Farrell
Andy_Farrell@gator-gate.itd.sterling.com

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