MCPcopy Index your code
hub / github.com/MapServer/MapServer / msSHPClose

Function msSHPClose

mapshape.c:383–406  ·  view source on GitHub ↗

/ msSHPClose() */ */ Close the .shp and .shx files. */ /

Source from the content-addressed store, hash-verified

381/* Close the .shp and .shx files. */
382/************************************************************************/
383void msSHPClose(SHPHandle psSHP )
384{
385 /* -------------------------------------------------------------------- */
386 /* Update the header if we have modified anything. */
387 /* -------------------------------------------------------------------- */
388 if( psSHP->bUpdated )
389 writeHeader( psSHP );
390
391 /* -------------------------------------------------------------------- */
392 /* Free all resources, and close files. */
393 /* -------------------------------------------------------------------- */
394 free( psSHP->panRecOffset );
395 free( psSHP->panRecSize );
396 free( psSHP->panRecLoaded );
397
398
399 if(psSHP->pabyRec) free(psSHP->pabyRec);
400 if(psSHP->panParts) free(psSHP->panParts);
401
402 fclose( psSHP->fpSHX );
403 fclose( psSHP->fpSHP );
404
405 free( psSHP );
406}
407
408/************************************************************************/
409/* msSHPGetInfo() */

Callers 4

process_shapefilesFunction · 0.85
mainFunction · 0.85
msShapefileCloseFunction · 0.85
mainFunction · 0.85

Calls 1

writeHeaderFunction · 0.70

Tested by

no test coverage detected