[Gdal-dev] How to use SetSpatialFilter()
Mir Hassan Ali
mirhassanali at gmail.com
Tue Nov 7 06:08:06 EST 2006
Hi
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
<extent> * * <type>*area*</type>
* * <coord-string>*
393546-377079;393544-377081;393542-377079;393544-377077*</coord-string>
</extent>
I am trying to set this area as spatial filter for the layer by using the
following code
layer.SetSpatialFilter(new Geometry(ogr.wkbGeometryCollection ,
"RECTANGLE(393546 377079 393544 377081 393542 377079 393544 377077)", 0,
null, null));
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.
I apologise for asking such a basic question, but I am new to the GIS stuff
so I hope you won't mind.
Any help will be appreciated.
Best Regards
Mir Hassan Ali
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20061107/5baed314/attachment.html
More information about the Gdal-dev
mailing list