Anybody can help me please ? 

 

I feel that the SHPWriteObject()  write a bad way in the file.

 

Do you think it could come from compiler ? I use Borland C++ 6

 

When I edit the file in text editor it seems good, the length of the file is
1904

 

But when I read file with SHPOpen() the psSHP->nFileSize attribute is 100.
oddly this corresponds to the size of the header (shx).

 

So I wonder if It comes from compiler or not. 

 

What do you think ?

 

Here in shpOpen().

 

/* -------------------------------------------------------------------- */

/*  Read the file size from the SHP file.
*/

/* -------------------------------------------------------------------- */

    pabyBuf = (uchar *) malloc(100);

    psSHP->sHooks.FRead( pabyBuf, 100, 1, psSHP->fpSHP );

 

    psSHP->nFileSize = ((unsigned int)pabyBuf[24] * 256 * 256 * 256

                                               + (unsigned int)pabyBuf[25] *
256 * 256

                                               + (unsigned int)pabyBuf[26] *
256

                                               + (unsigned int)pabyBuf[27])
* 2;

 

 

Only papybuf[27] has a value (50) , others have 0 as value..

_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to