<div>Hi</div>
<div> </div>
<div>I am using the C# wrapper for GDAL in my application. I want to use SetSpatialFilter() method on a layer. I have an area defined by the coordinates </div>
<div><font color="#000000"><span class="m"><extent</span><span class="m">></span> </font>
<div>
<div class="e">
<div style="MARGIN-LEFT: 1em; TEXT-INDENT: -2em"><font color="#000000"><span class="b"><strong><font face="Courier New"> </font></strong></span> <span class="m"><type</span><span class="m">></span><span class="tx">
<strong>area</strong></span><span class="m"></type</span><span class="m">></span> </font></div></div>
<div class="e">
<div style="MARGIN-LEFT: 1em; TEXT-INDENT: -2em"><font color="#000000"><span class="b"><strong><font face="Courier New"> </font></strong></span> <span class="m"><coord-string</span><span class="m">></span><span class="tx">
<strong>393546-377079;393544-377081;393542-377079;393544-377077</strong></span><span class="m"></coord-string</span><span class="m">></span> </font></div></div>
<div><font color="#000000"><span class="m"></extent</span><span class="m">></span></font></div>
<div><span class="m"><font color="#000000"></font></span> </div>
<div><span class="m"><font color="#000000">I am trying to set this area as spatial filter for the layer by using the following code</font></span></div>
<div><span class="m"><font size="2"><br><font color="#000000">layer.SetSpatialFilter(</font></font><font color="#000000"><font size="2">new</font><font size="2"> Geometry(ogr.wkbGeometryCollection , "RECTANGLE(393546 377079 393544 377081 393542 377079 393544 377077)", 0,
</font><font size="2">null</font><font size="2">, </font><font size="2">null</font><font size="2">));</font></font></span></div>
<div><span class="m"><font color="#000000" size="2"></font></span> </div>
<div><span class="m"><font color="#000000" size="2">But doing this does not return the desired result. It returns feature count as zero, rather than returning the features. Could someone please guide me how to use this function correctly.
</font></span></div>
<div><span class="m"><font color="#000000" size="2">I apologise for asking such a basic question, but I am new to the GIS stuff so I hope you won't mind.</font></span></div>
<div><span class="m"><font color="#000000" size="2">Any help will be appreciated.</font></span></div>
<div><span class="m"><font color="#000000" size="2"></font></span> </div>
<div><span class="m"><font color="#000000" size="2">Best Regards</font></span></div>
<div><span class="m"><font color="#000000" size="2"></font></span> </div>
<div><span class="m"><font size="2"><font color="#000000">Mir Hassan Ali</font></font></span></div></div></div>