Re: [HACKERS] [Q]process for 'contains'. - Mailing list pgsql-hackers

From Thomas G. Lockhart
Subject Re: [HACKERS] [Q]process for 'contains'.
Date
Msg-id 3523940D.4C15B91C@alumni.caltech.edu
Whole thread Raw
In response to [Q]process for 'contains'.  (hkkang@aiit.or.kr)
List 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

pgsql-hackers by date:

Previous
From: "Maurice Gittens"
Date:
Subject: Re: [HACKERS] Its not my fault. Its SEG's FAULT!
Next
From: Maurice Gittens
Date:
Subject: Everything leaks; How it mm suppose to work?