[postgis-tickets] [PostGIS] #4689: Error using ST_Intersects in WHERE clause
PostGIS
trac at osgeo.org
Wed May 13 02:16:48 PDT 2020
#4689: Error using ST_Intersects in WHERE clause
---------------------+---------------------
Reporter: tsc | Owner: pramsey
Type: defect | Status: new
Priority: medium | Milestone:
Component: postgis | Version: 3.0.x
Keywords: |
---------------------+---------------------
After an upgrade from PSQL11 with PostGIS 2.53 to PSQL12 with PostGIS
3.0.1 I am encountering a bug. The following query is minimal,
reproducible example of the problem:
{{{
SELECT * FROM
(VALUES
('POLYGON((30 10, 40 40, 20 40, 30 10))'::geography),
('POLYGON((81 6,140 35,-70 18,-51 0,-60 -46,106 -6,81 6))'::geography)
) AS t (v)
WHERE (ST_INTERSECTS(t.v, 'POLYGON ((30 10, 40 40, 20 40, 30
10))'::geography))
}}}
This outputs:
{{{
ERROR: CircTreePIP: Unable to generate outside point!
SQL state: XX000
}}}
Version on system producing the error:
{{{
PostgreSQL 12.2 (Ubuntu 12.2-4) on x86_64-pc-linux-gnu, compiled by gcc
(Ubuntu 9.3.0-8ubuntu1) 9.3.0, 64-bit POSTGIS="3.0.1 ec2a9aa" [EXTENSION]
PGSQL="120" GEOS="3.8.0-CAPI-1.13.1 " PROJ="6.3.1" LIBXML="2.9.10"
LIBJSON="0.13.1" LIBPROTOBUF="1.3.3" WAGYU="0.4.3 (Internal)"
}}}
Running the same query with following versions works as expected:
{{{
PostgreSQL 11.6 (Ubuntu 11.6-1.pgdg18.04+1) on x86_64-pc-linux-gnu,
compiled by gcc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0, 64-bit
POSTGIS="2.5.3 r17699" [EXTENSION] PGSQL="110" GEOS="3.7.1-CAPI-1.11.1
27a5e771" PROJ="Rel. 4.9.3, 15 August 2016" GDAL="GDAL 2.2.3, released
2017/11/20" LIBXML="2.9.4" LIBJSON="0.12.1" LIBPROTOBUF="1.2.1" RASTER
}}}
**More details:**
- The problem only occurs when multiple rows are selected - select each of
the rows in separate queries works.
- The error only occurs when the ST_INTERSECT is in the WHERE-clause,
having it in the SELECT doesn't result in the error.
- The error only occurs with geography, using geometry instead works fine.
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/4689>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-tickets
mailing list