** Does exactly what it implies, readies a layer for processing. */
| 72 | ** Does exactly what it implies, readies a layer for processing. |
| 73 | */ |
| 74 | int msLayerOpen(layerObj *layer) |
| 75 | { |
| 76 | /* RFC-69 clustering support */ |
| 77 | if (layer->cluster.region) |
| 78 | return msClusterLayerOpen(layer); |
| 79 | |
| 80 | if(layer->features && layer->connectiontype != MS_GRATICULE ) |
| 81 | layer->connectiontype = MS_INLINE; |
| 82 | |
| 83 | if(layer->tileindex && layer->connectiontype == MS_SHAPEFILE) |
| 84 | layer->connectiontype = MS_TILED_SHAPEFILE; |
| 85 | |
| 86 | if(layer->type == MS_LAYER_RASTER && layer->connectiontype != MS_WMS) |
| 87 | layer->connectiontype = MS_RASTER; |
| 88 | |
| 89 | if ( ! layer->vtable) { |
| 90 | int rv = msInitializeVirtualTable(layer); |
| 91 | if (rv != MS_SUCCESS) |
| 92 | return rv; |
| 93 | } |
| 94 | return layer->vtable->LayerOpen(layer); |
| 95 | } |
| 96 | |
| 97 | /* |
| 98 | ** Returns MS_TRUE if layer has been opened using msLayerOpen(), MS_FALSE otherwise |
no test coverage detected