[postgis-devel] [PostGIS] #241: ST_LineCrossingDirection Server Crash (Segfault)
PostGIS
trac at osgeo.org
Tue Oct 6 08:31:07 PDT 2009
#241: ST_LineCrossingDirection Server Crash (Segfault)
-----------------------+----------------------------------------------------
Reporter: batzee | Owner: robe
Type: defect | Status: assigned
Priority: critical | Milestone: postgis 1.4.1
Component: postgis | Version: 1.4.X
Resolution: | Keywords: segfault
-----------------------+----------------------------------------------------
Changes (by robe):
* owner: pramsey => robe
* status: new => assigned
Comment:
Well it doesn't crash anymore. I get a wonderful answer of -42 when I do
this.
{{{
SELECT sum(ST_LineCrossingDirection(a.the_geom, b.the_geom)) FROM ((SELECT
ST_MakeLine(ST_Point(i,j),ST_Point(j,i)) As the_geom
FROM generate_series(-10,100,5) As i
CROSS JOIN generate_series(5,70, 4) As j WHERE NOT(i = j) ORDER BY
i, i*j)) As a CROSS JOIN
((SELECT ST_MakeLine(ARRAY[ST_Point(i,j),ST_Point(j,i), ST_Point(k,i),
ST_Point(j,k)]) As the_geom
FROM generate_series(-10,10000,1500) As i
CROSS JOIN generate_series(5,800, 7) As j CROSS JOIN
generate_series(0,800, 200) As k WHERE NOT(i = j) AND NOT (j = k) AND NOT
(k = i) ORDER BY i, i*j)) As b
WHERE ST_LineCrossingDirection(a.the_geom,ST_GeomFromText('LINESTRING(8
53.54,11 53.54)')) = 1
}}}
But I think there is still a problem.
In our documentation --
We still have this example that doesn't behave right
SELECT ST_LineCrossingDirection(foo.line1, foo.line2) As l1_cross_l2 ,
ST_LineCrossingDirection(foo.line2, foo.line1) As l2_cross_l1
FROM (SELECT
ST_GeomFromText('LINESTRING(25 169,89 114,40 70,86 43)') As line1,
ST_GeomFromText('LINESTRING(2.99 90.16,71 74,20 140,171 154)') As
line2
) As foo;
(gives me -2, 0)
http://www.postgis.org/documentation/manual-
svn/ST_LineCrossingDirection.html
So I'll leave this open for now until we figure out why that is giving the
presumably wrong answer.
Can't test the hausdorff one yet since don't have 3.2 compiled in on this
box.
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/241#comment:11>
PostGIS <http://trac.osgeo.org/postgis/>
PostGIS
More information about the postgis-devel
mailing list