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

Function msSHPLayerGetItems

mapshape.c:2651–2676  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2649}
2650
2651int msSHPLayerGetItems(layerObj *layer)
2652{
2653 shapefileObj *shpfile;
2654 const char *value;
2655
2656 shpfile = layer->layerinfo;
2657
2658 if(!shpfile) {
2659 msSetError(MS_SHPERR, "Shapefile layer has not been opened.", "msSHPLayerGetItems()");
2660 return MS_FAILURE;
2661 }
2662
2663 layer->numitems = msDBFGetFieldCount(shpfile->hDBF);
2664 layer->items = msDBFGetItems(shpfile->hDBF);
2665 if(layer->numitems == 0) return MS_SUCCESS; /* No items is a valid case (#3147) */
2666 if(!layer->items) return MS_FAILURE;
2667
2668/* -------------------------------------------------------------------- */
2669/* consider populating the field definitions in metadata. */
2670/* -------------------------------------------------------------------- */
2671 if((value = msOWSLookupMetadata(&(layer->metadata), "G", "types")) != NULL
2672 && strcasecmp(value,"auto") == 0 )
2673 msSHPPassThroughFieldDefinitions( layer, shpfile->hDBF );
2674
2675 return msLayerInitItemInfo(layer);
2676}
2677
2678int msSHPLayerGetExtent(layerObj *layer, rectObj *extent)
2679{

Callers

nothing calls this directly

Calls 7

msSetErrorFunction · 0.85
msDBFGetFieldCountFunction · 0.85
msDBFGetItemsFunction · 0.85
msOWSLookupMetadataFunction · 0.85
strcasecmpFunction · 0.85
msLayerInitItemInfoFunction · 0.85

Tested by

no test coverage detected