Alexandre, Did you check the file before trying it with your application? What do you get if you run "ogrinfo -al <your_file>"?
On Fri, Mar 4, 2011 at 3:32 PM, Alexandre Leclerc <[email protected]>wrote: > 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 > -- Best regards, Chaitanya kumar CH. /tʃaɪθənjə/ /kʊmɑr/ +91-9494447584 17.2416N 80.1426E
_______________________________________________ gdal-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/gdal-dev
