From: | Вадим Самохин <samokhinvadim(at)gmail(dot)com> |
---|---|
To: | Brad White <b55white(at)gmail(dot)com> |
Cc: | pgsql-general(at)lists(dot)postgresql(dot)org |
Subject: | Re: postgresql 13.1: precision of spatial operations |
Date: | 2022-12-01 08:40:55 |
Message-ID: | CAGVmuwoN3eH=+6Put7gjsLp=Jn9ofpJmz_63SzS+n+ZLJFTLuw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
ср, 30 нояб. 2022 г., 20:51 Brad White <b55white(at)gmail(dot)com>:
> On 11/30/2022 9:48 AM, Вадим Самохин wrote:
>
> > Thank you so much Ivan, it worked!
> Can you give any more detail on which approach you took, for the sake of
> future followers?
>
Sure, I multiplied all points' coordinates by a factor of 10^6.
Here are the steps to demonstrate that the solution Ivan gave worked:
1. create table zones (
zone_id int,
zone_polygon polygon,
description text
);
create index zones__zone_polygon on zones using gist(zone_polygon poly_ops);
2. insert into zones (zone_polygon) values
('(37622012.9,55751936.7),(37621534.4,55753661.6),(37617206.4,55755950.9),(37622012.9,55751936.7)');
3. select count(1) from zones where zone_polygon @>
'(37617635,55755814)'::polygon;
count
-------
0
(1 row)
>
From | Date | Subject | |
---|---|---|---|
Next Message | Ray O'Donnell | 2022-12-01 11:17:36 | Re: posgres question / answer |
Previous Message | Amitabh Kant | 2022-12-01 07:44:20 | Re: Finding free time period on non-continous tstzrange field values |