Howdy all<br><br>I've searched around the archive looking for this and come up empty, so apologies if this has come up before.<br><br>I'm using PHP/Mapscript in an application to select features in one Postgis layer that intersect a selected feature of another layer. The first layer is comprised of non-adjacent polygons and the second is country boundaries. I'm finding that the number of returned features tends to vary with scale, where at a &quot;country display&quot; scale I can see a few features just outside the country boundary that are selected. As I zoom in, these extra features drop off the list to the true desired set, and as I zoom out more &quot;outside&quot; features are included in the results. The result set is not related to map extent.
<br><br>With some extraneous code removed (probably not the most elegant):<br>$cntry_layer-&gt;setFilter(&quot;gid = &quot;.$fid);<br>$search_shp = $cntry_layer-&gt;getShape(-1,$fid);<br>$poly_layer-&gt;queryByShape($search_shp);
<br><br>Are there scale-dependent considerations to getShape()? Any input on where in the process this may be happening?<br><br>Mapserver: 4.8.1<br>Postgres: 8.1.3<br>Postgis: 1.1.1<br>GEOS: 2.2.1<br>Linux x86_64 2.6.9-22
<br><br>Thanks for any input<br>Cheers!<br><br>Chris Barber<br><br><br>