[postgis-users] Problem with intersection from postgresql 8.0.7 to 8.1.3 win32

strk at refractions.net strk at refractions.net
Sat Feb 18 08:46:42 PST 2006


On Sat, Feb 18, 2006 at 12:30:04PM -0300, René F. Viancos S. wrote:
> i have a problem with the following query.
> 
> SELECT DISTINCT(intersection((SELECT collect(the_geom) FROM r13_ejes_32719
> WHERE nombre = 'LOS RECUERDOS'),(SELECT collect(the_geom) FROM
> r13_ejes_32719 WHERE nombre = 'LOS NOGALES'))) FROM r13_ejes_32719 WHERE
> (nombre = 'LOS RECUERDOS' OR nombre = 'LOS NOGALES');
> 
> where 'r13_ejes_32719' is the table with the street data, 'nombre' the flied
> with the street name.
> 
> In postgresql 8.0.3 works fine, but doesn't in postgresql 8.1.7 and i have
> executed the postgis_full_version() in both versions;
> 
> postgresql 8.0.3, win32 binary package, has the folowing:
> POSTGIS="0.9.1" GEOS="2.1.1" PROJ="Rel. 4.4.9, 29 Oct 2004" USE_STATS
> DBPROC=" 0.0.1" RELPROC="0.0.1"
> 
> postgresql 8.1.7, win32 binary package, has the folowing;
> POSTGIS="1.0.4" GEOS="2.1.4" PROJ="Rel. 4.4.9, 29 Oct 2004" USE_STATS
> DBPROC=" 0.3.0" RELPROC="0.3.0"

While you only report difference in PostgreSQL version you're 
indeed using two different versions of PostGIS as well of GEOS !!

I bet this has to do with the fact that starting with PostGIS 1.0.0
coordinates are kept with an higher precision. 

Try reducing precision by passing by a text representation
(which was forced with 0.9.1)

intersection((select astext(collect...)), (select astext(collect...)));

--strk;




More information about the postgis-users mailing list