[gdal-dev] Polygon
Chaitanya kumar CH
chaitanya.ch at gmail.com
Fri Mar 4 06:31:49 EST 2011
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 <a.leclerc at valabre.com>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
> gdal-dev at lists.osgeo.org
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20110304/c5c0f4ac/attachment.html
More information about the gdal-dev
mailing list