Getting points from polygon
am 12.08.2004 18:59:23 von albrechtt
Hello,
how can I get single xy-points from a polygon like for example:
CREATE TABLE "public"."country"
(
"country_id" INTEGER NOT NULL,
"geo" polygon NOT NULL
)
SELECT geo.x, geo.y FROM country WHERE geo.x=5
or
SELECT geo[24th point].x FROM country
....
Thanks in advance and best regards,
Sebastian
Re: Getting points from polygon
am 15.08.2004 21:43:18 von tgl
albrechtt@inseal.de (Sebastian Albrecht) writes:
> how can I get single xy-points from a polygon like for example:
[ looks through pg_proc... ] Hmm, this seems to be an oversight
in the polygon datatype. I don't think it'd be real practical
to support an array-subscript-like notation, but certainly a
function like point(polygon, n) wouldn't be too hard to add.
regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?
http://archives.postgresql.org