Which version of MITAB are you using? I think there were some issues in 
V1.5.x and 1.6.0 that gave errors of this type, so if you are using an 
older version I'd recommend that you start by upgrading to 1.6.1.

If MITAB 1.6.1 still fails, then there are two possibilities:

- It could be that your file is corrupt. To rule out that possibility, 
you could try to open the file in MapInfo, export it to MIF and then 
reimport to TAB in MapInfo under a new name, and try the new TAB file 
with MITAB and see if the problem persists.

- If the problem persists with the new/clean TAB file, then it could be 
a bug or an unsupported feature type, in this case it would be best if 
you could submit a bug at 
http://bugzilla.maptools.org/enter_bug.cgi?product=MITAB and attach a 
sample dataset to reproduce the issue.

Daniel


mp83alpha wrote:
> Hi,
> 
> i've tried to copy a mapinfo (.TAB) file with tab2tab.exe, but i got
> this error:
> 
> D:\> tab2tab.exe Decheterie.TAB Test.TAB
> ERROR 1: ReadBytes(): Attempt to read past end of data block.
> Failed to read feature 2124.
> 
> If I do the following modif in Tab2Tab(), I am able to copy the file,
> but the result is "dirty" and looks different in MapInfo. Can somebody
> help me in this case?
> 
> Please.
> 
> regards
> 
>     nFeatureId = -1;
>     while ( (nFeatureId = poSrcFile->GetNextFeatureId(nFeatureId)) !=
> -1 &&
>             (nMaxFeatures < 1 || numFeatures++ < nMaxFeatures ))
>     {
>         poFeature = poSrcFile->GetFeatureRef(nFeatureId);
>         if (poFeature)
>         {
>             poDstFile->SetFeature(poFeature);
>         }
>         else
>         {
>             printf( "Failed to read feature %d.\n",
>                     nFeatureId );
>                       continue;
>                       dirty = TRUE;
>             // return -1;      // GetFeatureRef() failed: Error
>         }
>     }
> 
> 


 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/mitab/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/mitab/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

Reply via email to