Re: how to check if a point is contained in a polygon ?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: how to check if a point is contained in a polygon ?
Дата
Msg-id 7470.1210173149@sss.pgh.pa.us
обсуждение исходный текст
Ответ на how to check if a point is contained in a polygon ?  (Julien Cigar <jcigar@ulb.ac.be>)
Список 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 по дате отправления:

Предыдущее
От: Julien Cigar
Дата:
Сообщение: Re: how to check if a point is contained in a polygon ?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Insert with pl/pgsql trigger