Re: how to check if a point is contained in a polygon ? - Mailing list pgsql-sql

From Tom Lane
Subject Re: how to check if a point is contained in a polygon ?
Date
Msg-id 7470.1210173149@sss.pgh.pa.us
Whole thread Raw
In response to how to check if a point is contained in a polygon ?  (Julien Cigar <jcigar@ulb.ac.be>)
List pgsql-sql
Julien Cigar <jcigar@ulb.ac.be> writes:
> Is there an SQL function to check if a point is contained in a polygon
> shape (before I start to write my own) ?

> I tried something like :

> rodentia=> select point '(-8,25)' <@ polygon
> '((-3,10),(8,18),(-3,30),(-10,20))';
> ERROR:  operator does not exist: point <@ polygon
> HINT:  No operator matches the given name and argument type(s). You may
> need to add explicit type casts.

> ... but without success as you can see ;\

I think you are reading recent documentation and trying to apply it to
an old Postgres version.  <@ had some other name before 8.2 ... check
the docs for whatever you are running.
        regards, tom lane


pgsql-sql by date:

Previous
From: Julien Cigar
Date:
Subject: Re: how to check if a point is contained in a polygon ?
Next
From: Tom Lane
Date:
Subject: Re: Insert with pl/pgsql trigger