[gdal-dev] [MITAB] Unsupported case or corrupt file

RICHARD Didier didier.richard at ign.fr
Mon Dec 21 11:20:46 EST 2009


> Which version of GDAL/OGR are you using?
>

trunk (as it was last friday)

it is compiled as follows :

CPPFLAGS=-D_FILE_OFFSET_BITS=64 CFLAGS=-D_FILE_OFFSET_BITS=64
CXXFLAGS=-D_FILE_OFFSET_BITS=64 ./configure --prefix=/opt/gdal-1.7.0b1
--with-pg=/usr/bin/pg_config --with-jasper=/usr/lib/ --with-geos=yes
--with-perl --with-python --with-libz=/usr/lib/ --with-png=/usr/lib/
--with-xerces=yes --with-curl=/usr/bin/curl-config --with-libtiff=internal

> Can you please try to convert your dataset from TAB to MIF using the
> tab2tab program available at http://mitab.maptools.org/ and see if you
> get the same error?

tried and it seems ok :

46Mb rall.mid
 2Gb rall.mif

$ ogrinfo -al -so rall.mif
Had to open data source read-only.
INFO: Open of `rall.mif'
      using driver `MapInfo File' successful.

Layer name: rall
Geometry: Unknown (any)
Feature Count: 3889708
Extent: (-5.053907, 41.367176) - (9.559522, 50.167815)
Layer SRS WKT:
GEOGCS["unnamed",
    DATUM["WGS_1984",
        SPHEROID["WGS 84",6378137,298.257223563],
        TOWGS84[0,0,0,-0,-0,-0,0]],
    PRIMEM["Greenwich",0],
    UNIT["degree",0.0174532925199433]]
ID: Integer (0.0)


BTW, i changed GNUmake.opt, line 34 is now CXX= g++ to get tab2tab
compiled on my linux box.

>
> About QGIS, yes, AFAIK it uses OGR (and MITAB) to read TAB files, so the
> difference in behavior may be related to different versions of the libs
> being used.

ldd on qgis gives me : libgdal.1.6.0.so.1
while ogr2ogr --version gives me : GDAL 1.7.0b1, released 2009/12/14

didier

>
> Daniel
>
>
> RICHARD Didier wrote:
>> Hi all,
>>
>> I'm trying to read a (big) mapinfo TAB file and I'm facing the following
>> error (source is the today's trunk) with ogr2ogr as well as ogrinfo :
>>
>> ____
>> $ ogrinfo -al rall.TAB
>> Had to open data source read-only.
>> INFO: Open of `rall.TAB'
>>       using driver `MapInfo File' successful.
>>
>> Layer name: rall
>> Geometry: Unknown (any)
>> Feature Count: 6138177
>> Extent: (-5.053907, 41.367176) - (9.559522, 51.075147)
>> Layer SRS WKT:
>> GEOGCS["unnamed",
>>     DATUM["WGS_1984",
>>         SPHEROID["WGS 84",6378137,298.257223563],
>>         TOWGS84[0,0,0,-0,-0,-0,0]],
>>     PRIMEM["Greenwich",0],
>>     UNIT["degree",0.0174532925199433]]
>> ID: Integer (0.0)
>> ERROR 7: Unsupported case or corrupt file: MULTIPLINE/REGION object
>> vertices do not appear to be grouped together.
>> ERROR 3: Failed reading coordinate data at offset 210440
>> ____
>>
>> With debug on there is no more usefull information.
>> My objective is to put this dataset into postgresql.
>>
>> The mapinfo files I'm trying to read are as follows (ls -lh):
>>
>> ____
>>   135 rall.TAB
>>  1,2G rall.MAP
>>   24M rall.ID
>>   30M rall.DAT
>> ____
>>
>> In mitab_mapcoordblock.cpp (line 503) when the error occurs I have got
>> the
>> following values :
>> i=0 numSections=1
>> nVextexOffset=-16384003
>> numVertices=24
>> numVerticesTotal=24
>>
>> The negative offset is the cause of the error, but it is declared as an
>> int. Is this right ?
>>
>> I have not found any tickets about this kind of error.
>>
>> Any idea on how to fix this (I could read the TAB file with QGIS 1.3.0
>> but
>> not sure if QGIS is using GDAL/OGR for reading files)?
>>
>>
>> Regards
>
>
> --
> Daniel Morissette
> http://www.mapgears.com/
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>


-- 
RICHARD Didier - Chef du pôle technique du Géoportail
2/4, avenue Pasteur - 94165 Saint Mandé Cedex
Tél : +33 (0) 1 43 98 83 23


More information about the gdal-dev mailing list