Ticket #723 (closed defect: fixed)
ST_Intersection for geography is really messed up
| Reported by: | robe | Owned by: | pramsey |
|---|---|---|---|
| Priority: | medium | Milestone: | PostGIS 2.0.0 |
| Component: | postgis | Version: | trunk |
| Keywords: | Cc: |
Description
I suspect geography ST_Intersection might not be the problem but it is the first to break. You need at least 2 records to break it. A simple ST_Intersect(geog1,geog2) will not do it. So might just be memory not being released.
SELECT ST_Intersection(a.geog,
b.geog) As result
FROM (VALUES (ST_GeogFromText('SRID=4326;POINT(-11.1111111 40)') ),
(ST_GeogFromText('SRID=4326;POINT(-11.1111111 55)') ) ) As a(geog)
CROSS JOIN
( VALUES (ST_GeogFromText('SRID=4326;POINT(-11.1111111 40)') ),
(ST_GeogFromText('SRID=4326;POINT(-11.1111111 55)') )
) As b(geog);
-- returns ERROR: Return size (40) not equal to expected size (16)!
Same error with POINT/POLYGON, POINT/LINESTRING but polygon one seems especially fatal.
-- When I do the below query 3 times, server crashes
SELECT ST_Intersection(geography(foo1.the_geom),
geography(foo2.the_geom)) As result,
ST_AsText(foo1.the_geom) As ref1_geom,
ST_AsText(foo2.the_geom) As ref2_geom
FROM ((SELECT ST_SetSRID(ST_Point(i,j),4326) As the_geom
FROM (SELECT a*1.11111111 FROM generate_series(-10,50,10) As a) As i(i) CROSS JOIN generate_series(40,70, 15) j ORDER BY i,j )) As foo1 CROSS JOIN ((SELECT ST_Buffer(ST_SetSRID(ST_Point(i,j),4326), j*0.05) As the_geom FROM (SELECT a*1.11111111 FROM generate_series(-10,50,10) As a) As i(i) CROSS JOIN generate_series(40,70, 20) As j ORDER BY i, i*j, j)) As foo2
LIMIT 2;
Change History
Note: See
TracTickets for help on using
tickets.
