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

kedardeshpande87 kedardeshpande87 at gmail.com
Mon Jun 11 16:48:24 PDT 2012


Frank Warmerdam wrote
> 
> There is no externally defined ordering, though the implementation in
> each driver will presumably have some implicit ordering.
> 
I am reading a TIGER shapefile provided by US Census Bureau:
...
ogr.RegisterAll();
DataSource ds = ogr.open("path/to/shapefil");
if(ds == null) {
      System.out.println("open failed");
      System.exit(1);
}
....
So, when I call ds.getDriver().getName(), it gives me "ESRI Shapefile".
For this driver, looks like the implementation is in the ogrshapelayer.cpp
file.
I went through the implementation of GetNetxtFeature(geometry) function, it
keeps looping over as long as features matching the criteria are found. From
the implementation, the order is not quite obvious to figure out. If
possible, can you please elaborate on this more (for ESRI Shapefile driver
implementation)?

In my application, I want to retrieve a single feature which matches the
criteria the closest.

Thanks,
Kedar

--
View this message in context: http://osgeo-org.1560.n6.nabble.com/Re-Accuracy-of-OGRLayer-SetSpatialFilter-API-tp4980063p4980594.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.


More information about the gdal-dev mailing list