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

Function msSHPLayerInitItemInfo

mapshape.c:2484–2500  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2482}
2483
2484int msSHPLayerInitItemInfo(layerObj *layer)
2485{
2486 shapefileObj *shpfile = shpfile = layer->layerinfo;
2487 if( ! shpfile) {
2488 msSetError(MS_SHPERR, "Shapefile layer has not been opened.", "msSHPLayerInitItemInfo()");
2489 return MS_FAILURE;
2490 }
2491
2492 /* iteminfo needs to be a bit more complex, a list of indexes plus the length of the list */
2493 msSHPLayerFreeItemInfo(layer);
2494 layer->iteminfo = (int *) msDBFGetItemIndexes(shpfile->hDBF, layer->items, layer->numitems);
2495 if( ! layer->iteminfo) {
2496 return MS_FAILURE;
2497 }
2498
2499 return MS_SUCCESS;
2500}
2501
2502int msSHPLayerOpen(layerObj *layer)
2503{

Callers

nothing calls this directly

Calls 3

msSetErrorFunction · 0.85
msSHPLayerFreeItemInfoFunction · 0.85
msDBFGetItemIndexesFunction · 0.85

Tested by

no test coverage detected