circle @> box, polygon points access

From: Thomas Simpson <ts(at)talentstack(dot)to>
To: pgsql-hackers(at)postgresql(dot)org
Subject: circle @> box, polygon points access
Date: 2024-11-21 18:18:23
Message-ID: 3efc05bc-f11e-43f7-bcc8-0b44f4b152a0@talentstack.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi

Looking through the archives, around 20 years ago someone asked about
getting a list of points from a polygon [15 AUG 2004] and the reply was
this was not available but something like point(polygon, n) could be
added relatively easily as a new feature to extract points.

I'm hitting an issue trying to check if a box is entirely contained
within a circle and I had thought since that comparison is not directly
supported to cast the box to a polygon and then check each of the points
in the polygon since that is what the circle containing a box is
essentially going to do.

However, there does not seem to be an easy way to access the polygon
elements either (unnest failed, indexing doesn't work and the
point(poly,n) is not there).

Can anyone point me to an approach to do what I need or is this going to
be best by adding the box comparison in the mainline code?  I'm happy to
take a go if someone points [no pun intended] me to where in the code to go.

Thanks

Tom

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jacob Champion 2024-11-21 18:51:12 Re: [PoC] Federated Authn/z with OAUTHBEARER
Previous Message Marcos Pegoraro 2024-11-21 18:08:27 Re: Document NULL