[gdal-dev] Accuracy of OGRLayer:SetSpatialFilter() API

Kedar Deshpande kedardeshpande87 at gmail.com
Mon Jun 11 10:21:33 PDT 2012


Is there a specific order in which the features get retrieved on calling
layer->GetNextFeature() ?
For example, if the given spatial filter matched 4 features, when we
iterate over the feature in a loop by calling  layer->GetNextFeature() , is
there a predefined order in which these feature are returned (such as best
match first etc) ?

I am not using GEOS, is there another way to make it retrieve more accurate
features ?

Thanks,
Kedar

On Fri, Jun 8, 2012 at 12:13 PM, Kedar Deshpande <kedardeshpande87 at gmail.com
> wrote:

> Hi,
>
> I am creating an application that reads a shapefile having Zipcode
> Tabulation Area information (provided by US Census Bureau).
> Once I get the layer, I am setting a spatial filter on it. I am passing a
> OGRPoint object to it having some values for latitude and longitude.
> After I apply this filter, I am iterating over the Features that the layer
> returns.
> But for a given geometry point, it is returning more than one features. I
> am extracting the zipcode from the feature.
> So, it is returning me more than one zip codes for one lat/long point.
> Could someone please let me know why is this behavior observed ?
> If it returns multiple features for a filter, what is the order in which
> it returns the features (when we call layer->GetNextFeature()).
> Is this order according to how exactly the filter matches Or is it not
> definite ? The documentation in the API does not mention about the order.
>
> Thanks,
> Kedar
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20120611/9f9f5e8d/attachment.html>


More information about the gdal-dev mailing list