[postgis-tickets] [PostGIS] #3355: ST_Intersects() return no result with ST_Segmentize()
PostGIS
trac at osgeo.org
Sun Nov 1 22:32:47 PST 2015
#3355: ST_Intersects() return no result with ST_Segmentize()
----------------------+---------------------------
Reporter: sdiz | Owner: pramsey
Type: defect | Status: new
Priority: blocker | Milestone: PostGIS 2.1.9
Component: postgis | Version: 2.1.x
Resolution: | Keywords:
----------------------+---------------------------
Changes (by robe):
* priority: high => blocker
Comment:
Seems to be something amiss with the boxes. When it comes out of
ST_Segmentize, it gets a regular old bounding box instead of a gbox.
I'm tested this on both 2.1.8 and 2.2.0
{{{
SELECT ST_Summary(geog_before) As before, ST_Summary(geog_after) As
after, ST_Intersects(geog_before,geog_after)
FROM (SELECT
'LINESTRING(124.983539 1.419224,91.181596 29.647798)'::geography
As geog_before
, ST_Segmentize('LINESTRING(124.983539 1.419224,91.181596
29.647798)'::geography, 47487290) As geog_after) AS f;
}}}
outputs:
{{{
before | after |
st_intersects
------------------------------+-----------------------------+---------------
LineString[GS] with 2 points | LineString[S] with 2 points | f
}}}
Trying to recast to geography doesn't help because it's already a
geography (so guess it doesn't think updating the box is needed, however
double casting works:
{{{
SELECT ST_Summary(geog_before) As before,
ST_Summary(geog_after::geometry::geography) As after,
ST_Intersects(geog_before,geog_after::geometry::geography)
FROM (SELECT
'LINESTRING(124.983539 1.419224,91.181596 29.647798)'::geography
As geog_before
, ST_Segmentize('LINESTRING(124.983539 1.419224,91.181596
29.647798)'::geography, 47487290) As geog_after) AS f;
}}}
outputs:
{{{
before | after |
st_intersects
------------------------------+-------------------------------+---------------
LineString[GS] with 2 points | LineString[BGS] with 2 points | t
}}}
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/3355#comment:3>
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