| 2392 | } |
| 2393 | |
| 2394 | int msTiledSHPLayerGetItems(layerObj *layer) |
| 2395 | { |
| 2396 | msTiledSHPLayerInfo *tSHP=NULL; |
| 2397 | const char *value; |
| 2398 | |
| 2399 | tSHP = layer->layerinfo; |
| 2400 | if(!tSHP) { |
| 2401 | msSetError(MS_SHPERR, "Tiled shapefile layer has not been opened.", "msTiledSHPLayerGetItems()"); |
| 2402 | return MS_FAILURE; |
| 2403 | } |
| 2404 | |
| 2405 | layer->numitems = msDBFGetFieldCount(tSHP->shpfile->hDBF); |
| 2406 | layer->items = msDBFGetItems(tSHP->shpfile->hDBF); |
| 2407 | if(!layer->items) return MS_FAILURE; |
| 2408 | |
| 2409 | /* -------------------------------------------------------------------- */ |
| 2410 | /* consider populating the field definitions in metadata. */ |
| 2411 | /* -------------------------------------------------------------------- */ |
| 2412 | if((value = msOWSLookupMetadata(&(layer->metadata), "G", "types")) != NULL |
| 2413 | && strcasecmp(value,"auto") == 0 ) |
| 2414 | msSHPPassThroughFieldDefinitions( layer, tSHP->shpfile->hDBF ); |
| 2415 | |
| 2416 | return msTiledSHPLayerInitItemInfo(layer); |
| 2417 | } |
| 2418 | |
| 2419 | int msTiledSHPLayerGetExtent(layerObj *layer, rectObj *extent) |
| 2420 | { |
nothing calls this directly
no test coverage detected