1

I'm using ogr2ogr to convert MSSQL to MapInfo File and would like to add indexes to some of my MapInfo columns, is this possible?

This is what I have so far

set ogr2ogr="C:\Program Files\GDAL\ogr2ogr.exe"
set sqlcon="MSSQL:server=SQL;database=Spatial;User id=user;Password=password;MARS_Connection=yes;"

%ogr2ogr% -f "MapInfo File" test.tab %sqlcon% -sql "SELECT * FROM [dbo].[tableName]"
1

The documentation of MapInfo driver of GDAL http://www.gdal.org/drv_mitab.html mentions only spatial index so I believe that driver can't create indexes for attributes. However, the mitab driver does seem to have support for utilising the .IND index if such exists https://github.com/OSGeo/gdal/commit/013f4087c9468aff66e60a82a8ca326fe9609730

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.