[postgis-devel] [postgis-users] Odd Behavior with ST_Intersects (PostGIS 2.1, Ubuntu 12.04)
Paragon Corporation
lr at pcorp.us
Fri Jan 31 20:27:17 PST 2014
Jerry,
Thanks very much for the report. I had noticed what I think might be the
same issue, but couldn't find such a short and succinct example as yours to
reproduce.
I have added to my original ticket:
http://trac.osgeo.org/postgis/ticket/2422
I think there is another ticket in our bug tracker that might be the same
issue too but can't recall the number.
Thanks very very much for this great example.
Paul -- if you are watching you have work to do :)
Thanks,
Regina
http://www.postgis.us
http://postgis.net
_____
From: postgis-users-bounces at lists.osgeo.org
[mailto:postgis-users-bounces at lists.osgeo.org] On Behalf Of Jerry Sievert
Sent: Friday, January 31, 2014 6:25 PM
To: postgis-users at lists.osgeo.org
Subject: [postgis-users] Odd Behavior with ST_Intersects (PostGIS 2.1,Ubuntu
12.04)
Hello,
I am using Ubuntu 12.04 with the official PostgreSQL apt repo (via
https://wiki.postgresql.org/wiki/Apt). I am running into an easily
reproducible issue, and was hoping for some help to solve this.
When using ST_Intersects() not all rows that intersect are returned. This
was not the case in previous versions that we have upgraded from.
These are the steps to reproduce on a fresh install of Ubuntu 12.04 with all
packages updated and PostGIS/PostgreSQL 9.3 installed:
test=# CREATE TABLE test (id serial, condition_geo geography);
CREATE TABLE
test=# INSERT INTO test (condition_geo) VALUES
(ST_Buffer(ST_GeogFromWKB(ST_MakePoint(20.0,30.0)),10.0));
INSERT 0 1
test=# SELECT id FROM test WHERE ST_Intersects("condition_geo",
ST_Buffer(ST_GeogFromText('POINT(20.0 30.0)'), 20.0)) IS TRUE;
id
----
1
(1 row)
test=# INSERT INTO test (condition_geo) VALUES
(ST_Buffer(ST_GeogFromWKB(ST_MakePoint(20.0,30.0)),10.0));
INSERT 0 1
test=# SELECT id FROM test WHERE ST_Intersects("condition_geo",
ST_Buffer(ST_GeogFromText('POINT(20.0 30.0)'), 20.0)) IS TRUE;
id
----
1
(1 row)
test=# SELECT id FROM test WHERE ST_Intersects("condition_geo",
ST_Buffer(ST_GeogFromText('POINT(20.0 30.0)'), 20.0)) IS TRUE AND id = 2;
id
----
2
(1 row)
Note that the SELECT should return both rows 1 and 2 in the first SELECT.
Any thoughts?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20140131/d7d3147d/attachment.html>
More information about the postgis-devel
mailing list