MCPcopy Create free account
hub / github.com/MapServer/MapServer / msOGRInitialize

Function msOGRInitialize

mapogr.cpp:1268–1294  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1266static int bOGRDriversRegistered = MS_FALSE;
1267
1268void 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

Callers 3

msOGRFileOpenFunction · 0.85
msOGRWriteFromQueryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected