Re: [HACKERS] [Q]process for 'contains'.

From: "Thomas G(dot) Lockhart" <lockhart(at)alumni(dot)caltech(dot)edu>
To: hkkang(at)aiit(dot)or(dot)kr
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [HACKERS] [Q]process for 'contains'.
Date: 1998-04-02 13:35:09
Message-ID: 3523940D.4C15B91C@alumni.caltech.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> i have two question.
> one is
> topological data structure of postgresql.
> i wonder that
> how to related each spatial object-point, polygon, path..
> in postgres.

I'm not certain of your question. Most geometric objects consist of
collections of points. The exception is the circle, which consists of a
point and a radius. In order of complexity, the geometric objects are
point, lseg, line, box, path, polygon, and circle.

> another is..
> process of spatial operator.
> eg: 'contains' search points in polygon.
> how to search??
> how to relate between point table and polygon table.
> (the table has only set of coordinate..)

Hmm. Again not certain of your question, but here are some example
queries using geometric types:

CREATE TABLE pointtbl (name text, location point);
CREATE TABLE polytbl (region text, boundary polygon);

-- find which region each point is in
SELECT p.name, y.region FROM pointtbl p, polytbl y
WHERE p.location @ y.boundary;

> where reference book or site

There is a small description of each geometric type in the new User's
Guide.

- Tom

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Maurice Gittens 1998-04-02 13:40:57 Everything leaks; How it mm suppose to work?
Previous Message Maurice Gittens 1998-04-02 11:33:54 Re: [HACKERS] Its not my fault. Its SEG's FAULT!