[postgis-tickets] [PostGIS] #4096: ST_Intersects does not return error when comparing different SRIDs
PostGIS
trac at osgeo.org
Thu May 24 07:34:04 PDT 2018
#4096: ST_Intersects does not return error when comparing different SRIDs
---------------------+---------------------------
Reporter: katbot | Owner: pramsey
Type: defect | Status: new
Priority: low | Milestone: PostGIS 2.4.5
Component: postgis | Version: 2.4.x
Keywords: |
---------------------+---------------------------
I have Point geometry objects with SRID 4326 in one table, and
MultiPolygon geometry objects with SRID 3042 in another.
I was trying to find all the Points in the first table that fall within
any MultiPolygon in the second. I originally tried the first query below,
using ST_Intersects with different SRIDs but didn't get an error - the
only messages are "O rows affected." The second query works fine and
returns the expected data after transforming to the correct SRID. Is it a
bug that there is no error returned when comparing different SRIDs?
Query 1:
{{{
SELECT points.*
FROM tweets AS points
JOIN census_data AS poly
ON ST_Intersects(poly.geom, points.tweet_geom);
}}}
Query 2:
{{{
SELECT points.*
FROM tweets AS points
JOIN census_data AS poly
ON ST_Intersects(poly.geom, ST_Transform(points.tweet_geom, 3042));
}}}
PostGIS Version:
"POSTGIS="2.4.4 r16526" PGSQL="100" GEOS="3.6.2-CAPI-1.10.2 4d2925d"
PROJ="Rel. 4.9.3, 15 August 2016" GDAL="GDAL 2.2.4, released 2018/03/19"
LIBXML="2.7.8" LIBJSON="0.12" LIBPROTOBUF="1.2.1" RASTER"
PostgreSQL Version:
"PostgreSQL 10.3, compiled by Visual C++ build 1800, 64-bit"
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/4096>
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