4

I am trying to convert a MapInfo tab file with ogr2ogr

I did this:

ogr2ogr -f "ESRI Shapefile" testing.shp TEST.tab

And get this error;

ERROR 3: Failed to parse field definition at line 8 in file TEST.tab

    FAILURE:
    
    Unable to open datasource `TEST.tab' with the following drivers
    oid LargeInt ;

QGIS gives me this error when adding a vector layer:

Invalid Data Source: C:\Temp\Struer\TEST.TAB is not a valid or recognized data source.

I tried this:

Change the LargeInt to Integer in MapInfo. 

Then it works fine.

So it seems like there is a problem with the LargeInt type.

Is it GDAL that can't handle this or does anyone knows a workaround?

4
  • 1
    I don't think ESRI Shapefiles support 64-bit integers.
    – T_Bacon
    Commented Jul 29, 2020 at 8:18
  • 1
    can ogrinfo read your mapinfo file when you have a largeint?
    – nmtoken
    Commented Jul 29, 2020 at 9:01
  • @nmtoken no the ogrinfo also fails ERROR 3: Failed to parse field definition at line 8 in file test.tab ERROR 3: Failed to parse field definition at line 8 in file test.tab FAILURE: Unable to open datasource `test.tab' with the following drivers.
    – Kenneth
    Commented Jul 29, 2020 at 12:48
  • @Taras, no i thing the problem lays in the mitab
    – Kenneth
    Commented Jul 29, 2020 at 12:56

3 Answers 3

3

There is a GDAL plugin available here that adds support for the Extended MapInfo TAB format.

3
1

GDAL's mitab module indeed does not know about the LargeInt type.

Until that support has been added to GDAL, you have to use a different type.

1
  • Hmm. The LargeInt type has been in Mapinfo since approximately 2009, how can it be added to mitab module
    – Kenneth
    Commented Jul 29, 2020 at 12:51
0

This will be available in GDAL 3.7.0 (May 2023) per https://github.com/OSGeo/gdal/pull/7165.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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