<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
Hello,<br>
<br>
<br>
I found that there is a difference in result between using <tt>A
&& B</tt> operator or one of the geo functions like <tt>st_intersects(A,B)</tt>
or <tt>st_overlaps(A,B)</tt><br>
<br>
While the st_intersects or st_overlaps functions returns query
results without errors the operator version SOMETIMES results in
errors over the SRID:<br>
<tt><br>
</tt><tt>ERROR: Operation on two geometrys with different SRID's.</tt><tt><br>
</tt><tt><br>
</tt><tt>ERROR: Operation on two geometrys with different SRIDs</tt><tt><br>
</tt><tt>SQL state: XX000</tt><tt><br>
</tt><br>
All of the 3552 records are OKE, having the correct SRID, all 2D,
all vaid.<br>
<br>
select st_srid(geometry) ,count(*) from soils.vw_zones group by
st_srid(geometry) <br>
SELECT ST_Dimension(geometry), count(*) from soils.vw_zones group
by ST_Dimension(geometry)<br>
SELECT ST_isvalid(geometry), count(*) from soils.vw_zones group by
ST_isvalid(geometry)<br>
<br>
Everything runs on ubuntu<br>
-The SQL query is generated by MAPSERV 5.6.1 WMS server<br>
-Postgres Version 9.0.5<br>
-Postgis version 1.5<br>
<br>
<br>
Sample query:<br>
<br>
Operator &&<br>
<br>
select
encode(AsBinary(force_collection(force_2d("geometry")),'NDR'),'hex')
as geom, "id" <br>
from (select * from soils.vw_zones) as vw<br>
where geometry &&
GeomFromText('POLYGON((75722.1945223652
437331.342330005,75722.1945223652 503295.946741193,169438.897876772
503295.946741193,169438.897876772 437331.342330005,75722.1945223652
437331.342330005))',find_srid('','soils.vw_zones','geometry')) <br>
<br>
ST_INTERSECTS<br>
<br>
select
encode(AsBinary(force_collection(force_2d("geometry")),'NDR'),'hex')
as geom, "id" <br>
from (select * from soils.vw_zones) as vw<br>
where
st_intersects(geometry,GeomFromText('POLYGON((75722.1945223652
437331.342330005,75722.1945223652 503295.946741193,169438.897876772
503295.946741193,169438.897876772 437331.342330005,75722.1945223652
437331.342330005))',find_srid('','soils.vw_zones','geometry')))<br>
<br>
<br>
<br>
Regards, Huub<br>
<br>
<br>
<br>
<div class="moz-signature">-- <br>
<span style="font-family: Arial Bold; font-size:12pt">
<br>
E <a href="mailto:huub.fleuren@geodan.nl">huub.fleuren@geodan.nl</a>
<br>
<br>
<a href="http://www.geodan.nl/disclaimer"></a>
</span>
</div>
</body>
</html>