Re: point-in-polygon error

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Don Isgitt <djisgitt(at)soundenergy(dot)com>
Cc: postgresql-general mailing list <pgsql-general(at)postgresql(dot)org>
Subject: Re: point-in-polygon error
Date: 2002-06-18 21:25:45
Message-ID: 20020618141847.R65443-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, 18 Jun 2002, Don Isgitt wrote:

> No response to my first plea; maybe this time.
>
> Hi.
>
> I am trying to determine if some lat/longs stored in a database are
> contained within a defined polygon using the very nice builtin operators
>
> and types of postgresql; to wit,
>
> gds2=> select count(*) from master where point '(latitude,longitude)' @
> polygon
> '(
> (3200000,10200000),(3187500,10262500),(3112500,10230000),(3112500,10187500),(3200000,10200000))';
>
> ERROR: Bad point external representation '(latitude,longitude)'
> ERROR: Bad point external representation '(latitude,longitude)'
>
> I have tried several variations on this theme to no avail. What am I
> doing wrong?
>
> I am using version 6.5.2, latitude and longitude are float.

I would guess that point '...' would be for point literals not a
conversion to point. On my current machine, a function
point(double, double) is defined which might do what you want.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jorge Sarmiento 2002-06-18 21:50:20 pl/pgsql question
Previous Message Anna Dorofiyenko 2002-06-18 21:23:27 dynamic sql