<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">You have two tables with different SRIDs specified. You must use "setsrid(the_geom, xxxx)" to be able to handle both. This problem ocurrs when you didn't specify the SRID when using shp2pgsql, it takes -1 (default) instead the one that your layer haves.<br><br><br><br><div><strong><font color="#0000bf">IC Carlos Ruiz</font></strong></div><br><br>--- On <b>Thu, 8/7/08, Kenne, Bryon K. <i>&lt;BKenne@iso.com&gt;</i></b> wrote:<br><blockquote webdeveloper-inline-style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;">From: Kenne, Bryon K. &lt;BKenne@iso.com&gt;<br>Subject: [mapserver-users] PostGreSQL8.2/PostGIS SQL Error<br>To: mapserver-users@lists.osgeo.org<br>Date: Thursday, August 7, 2008, 3:00 PM<br><br><pre>Does anybody know why the following select query returns this error? - <br><br>ERROR: Operation on two geometries with
 different SRIDs<br>SQL state: XX000<br><br><br>SELECT * FROM sdghaz WHERE the_geom&amp;&amp;'BOX3D(-117.052660 32.854340,<br>-117.052664 32.854353)'::box3d AND distance(the_geom,<br>GeomFromText('POINT(-117.052662 32.854349)',4326))&lt;0.00001<br><br>-Bryon<br>This email is intended for the recipient only.  If you are not the intended<br>recipient please disregard, and do not use the information for any purpose.<br>_______________________________________________<br>mapserver-users mailing list<br>mapserver-users@lists.osgeo.org<br>http://lists.osgeo.org/mailman/listinfo/mapserver-users<br></pre></blockquote></td></tr></table><br>