[gdal-dev] shapefile field indexing on OGR 1.x vs 2.1

Andrea Battisti battisti at actgate.com
Mon Jan 30 07:56:29 PST 2017


Hi all,

I have a shapefile created by GDAL/OGR 1.7 which is using a .ind/.idm 
attribute index on an integer field.

If I SQL-query that integer field on OGR 2.1 I get the following:
ERROR 7: BuildKey(): 8 bytes integer key length not supported

I think that is because the new GDAL interprets that field as Integer64 
while before it was just Integer (and was working fine).

On the other hand if I delete the old index and recreate it using the 
new GDAL I get:
ERROR 1: Indexing not support for the field type of field myfield.

What is the proper way to use new GDAL on the old shapefile without 
modifying it?
Is there a way to explicitly tell GDAL to use that field as Integer and 
to make the field indexing work?


Thanks in advance!

Andrea Battisti
Software Engineer


More information about the gdal-dev mailing list