| 1008 | **********************************************************************/ |
| 1009 | |
| 1010 | int msWFSLayerGetItems(layerObj *layer) |
| 1011 | { |
| 1012 | #ifdef USE_WFS_LYR |
| 1013 | /* For now this method simply lets OGR parse the GML and figure the */ |
| 1014 | /* schema itself. */ |
| 1015 | /* It could also be implemented to call DescribeFeatureType for */ |
| 1016 | /* this layer, but we don't need to do it so why waste resources? */ |
| 1017 | |
| 1018 | msWFSLayerInfo* psInfo = NULL; |
| 1019 | |
| 1020 | if(layer != NULL && layer->wfslayerinfo != NULL) |
| 1021 | psInfo = (msWFSLayerInfo*)layer->wfslayerinfo; |
| 1022 | else |
| 1023 | { |
| 1024 | msSetError(MS_WFSERR, "Layer is not opened.", "msWFSLayerGetItems()"); |
| 1025 | return MS_FAILURE; |
| 1026 | } |
| 1027 | |
| 1028 | if(psInfo->bLayerHasValidGML) |
| 1029 | return msOGRLayerGetItems(layer); |
| 1030 | else |
| 1031 | { |
| 1032 | /* Layer is successful, but there is no data to process */ |
| 1033 | layer->numitems = 0; |
| 1034 | layer->items = NULL; |
| 1035 | return MS_SUCCESS; |
| 1036 | } |
| 1037 | #else |
| 1038 | /* ------------------------------------------------------------------ |
| 1039 | * WFS CONNECTION Support not included... |
| 1040 | * ------------------------------------------------------------------ */ |
| 1041 | msSetError(MS_WFSCONNERR, "WFS CLIENT CONNECTION support is not available.", |
| 1042 | "msWFSLayerGetItems()"); |
| 1043 | return(MS_FAILURE); |
| 1044 | #endif /* USE_WFS_LYR */ |
| 1045 | |
| 1046 | } |
| 1047 | |
| 1048 | /********************************************************************** |
| 1049 | * msWFSLayerWhichShapes() |
nothing calls this directly
no test coverage detected