| 1266 | static int bOGRDriversRegistered = MS_FALSE; |
| 1267 | |
| 1268 | void msOGRInitialize(void) |
| 1269 | |
| 1270 | { |
| 1271 | #ifdef USE_OGR |
| 1272 | /* ------------------------------------------------------------------ |
| 1273 | * Register OGR Drivers, only once per execution |
| 1274 | * ------------------------------------------------------------------ */ |
| 1275 | if (!bOGRDriversRegistered) |
| 1276 | { |
| 1277 | ACQUIRE_OGR_LOCK; |
| 1278 | |
| 1279 | OGRRegisterAll(); |
| 1280 | CPLPushErrorHandler( CPLQuietErrorHandler ); |
| 1281 | |
| 1282 | /* ------------------------------------------------------------------ |
| 1283 | * Pass config option GML_FIELDTYPES=ALWAYS_STRING to OGR so that all |
| 1284 | * GML attributes are returned as strings to MapServer. This is most efficient |
| 1285 | * and prevents problems with autodetection of some attribute types. |
| 1286 | * ------------------------------------------------------------------ */ |
| 1287 | CPLSetConfigOption("GML_FIELDTYPES","ALWAYS_STRING"); |
| 1288 | |
| 1289 | bOGRDriversRegistered = MS_TRUE; |
| 1290 | |
| 1291 | RELEASE_OGR_LOCK; |
| 1292 | } |
| 1293 | #endif /* USE_OGR */ |
| 1294 | } |
| 1295 | |
| 1296 | /* ================================================================== |
| 1297 | * The following functions closely relate to the API called from |
no outgoing calls
no test coverage detected