Обсуждение: Hi! (and a question)

Поиск
Список
Период
Сортировка

Hi! (and a question)

От
David Cruz
Дата:
Hello everyone!

My name is David Cruz, and I'm from Bogota, Colombia.

I'm Beggining with PostgreSQL, so I've been doing just
a few simple things.

I have a problem, in my database there is a table
which has some geometric data types: (point and
polygon) and a need some operator or function that let
me know if the point is inside the polygon or not.
Something like the ~ in the point inside a circle, but
this one is inside a polygon.

thanks a lot!


David Cruz




__________________________________
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs
http://hotjobs.sweepstakes.yahoo.com/careermakeover

Re: Hi! (and a question)

От
Janko Richter
Дата:
David Cruz wrote:
> Hello everyone!
>
> My name is David Cruz, and I'm from Bogota, Colombia.
>
> I'm Beggining with PostgreSQL, so I've been doing just
> a few simple things.
>
> I have a problem, in my database there is a table
> which has some geometric data types: (point and
> polygon) and a need some operator or function that let
> me know if the point is inside the polygon or not.
> Something like the ~ in the point inside a circle, but
> this one is inside a polygon.
>
> thanks a lot!
>
<snip/>

What PGSQL version do you are using? I found the point ~ polygon
operator in version 7.4.

Example:
  SELECT '0.5,0.5'::point @ '(-1,0),(-1,-1),(1,-1),(1,1)'::polygon;
or
  SELECT  '(-1,0),(-1,-1),(1,-1),(1,1)'::polygon ~ '0.5,0.5'::point;

Regards, Janko Richter


Question about REF / DREF

От
David Cruz
Дата:

Hello!

I have heard about references and that you can make relations between tables by using ref and deref. But I'd like to know if some of you have done some with it, or have some source code or SQL script in order to learn something about it...

thanks!

 

David Cruz

Bogota, Colombia


Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs