[gdal-dev] Polygon
Alexandre Leclerc
a.leclerc at valabre.com
Fri Mar 4 05:02:56 EST 2011
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..
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20110304/1ccc8e03/attachment-0001.html
More information about the gdal-dev
mailing list