Hello, I'm seeing that the OGRSQL virtual FID value is 0-based for
shapefile, and 1-based for MapInfo (TAB or MIF).

Is this driver-dependent generally, or is shapefile (or MI?) a special
case?

Using the autotest data I see

## no feature returned (there are 2)
ogrinfo autotest/ogr/data/seamless_part1.tab -sql "SELECT * FROM
seamless_part1 WHERE FID = 0"

## one feature returned
ogrinfo autotest/ogr/data/seamless_part1.tab -sql "SELECT * FROM
seamless_part1 WHERE FID = 2"

## create analogous SHP
ogr2ogr shp autotest/ogr/data/seamless_part1.tab seamless_part1

## one feature returned
ogrinfo shp -sql "SELECT * FROM seamless_part1 WHERE FID = 0"

## no feature returned
ogrinfo shp -sql "SELECT * FROM seamless_part1 WHERE FID = 2"

Cheers, Mike.
-- 
Dr. Michael Sumner
Software and Database Engineer
Australian Antarctic Division
203 Channel Highway
Kingston Tasmania 7050 Australia
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to