| 90 | == A note about environment variables == |
| 91 | |
| 92 | GDAL has various configuration options which are driven through environment variables. For the GDAL FDO provider to properly incorporate these environment variables, you have to do one of the following: |
| 93 | |
| 94 | * Set the environment variables in question through the Computer properties dialog. This will probably also require a reboot so that MapGuide can pick these environment variables up when running in service mode. These variables will stick until they are unset from the Computer properties dialog. |
| 95 | * Set these environment variables from a command line and then run MapGuide afterwards from the same session in interactive mode ({{{mgserver run}}}). To simplify this, you could wrap the setting of the environment variables and the running of MapGuide in interactive mode as a batch file and run that. These variables will stick for the duration of the command-line session that you run MapGuide in. |
| 96 | |
| 97 | Wherever this guide refers to setting an environment variable, it is through one of these two methods. |
| 98 | |
| 114 | |
| 115 | The {{{CPL_DEBUG}}} environment variable controls whether GDAL and its plugins will output extra debug information when the MapGuide server process is running. |
| 116 | |
| 117 | GDAL debug output is written to the standard output stream (stdout), so its best to use {{{CPL_DEBUG}}} in conjunction with running MapGuide server in '''interactive mode''', as there is no visible stdout when MapGuide runs as a service. |
| 118 | |
| 119 | The moment the GDAL provider starts making GDAL API calls, you should see output like this start showing up in the console output^1. |
| 120 | |
| 121 | {{{ |
| 122 | GDAL: Auto register C:\Program Files\OSGeo\MapGuide\Server\bin\gdalplugins\gdal_ECW.dll using GDALRegister_ECW. |
| 123 | GDAL: Auto register C:\Program Files\OSGeo\MapGuide\Server\bin\gdalplugins\gdal_ECW_JP2ECW.dll using GDALRegister_ECW_JP2ECW. |
| 124 | GDAL: Auto register C:\Program Files\OSGeo\MapGuide\Server\bin\gdalplugins\gdal_MrSID.dll using GDALRegister_MrSID. |
| 125 | GDAL: Auto register C:\Program Files\OSGeo\MapGuide\Server\bin\gdalplugins\gdal_ECW.dll using GDALRegister_ECW. |
| 126 | GDAL: Auto register C:\Program Files\OSGeo\MapGuide\Server\bin\gdalplugins\gdal_ECW_JP2ECW.dll using GDALRegister_ECW_JP2ECW. |
| 127 | GDAL: Auto register C:\Program Files\OSGeo\MapGuide\Server\bin\gdalplugins\gdal_MrSID.dll using GDALRegister_MrSID. |
| 128 | MrSID: Opened zoom level 1 with size 2500x2500. |
| 129 | MrSID: Opened zoom level 2 with size 1250x1250. |
| 130 | MrSID: Opened zoom level 3 with size 625x625. |
| 131 | MrSID: Opened zoom level 4 with size 313x313. |
| 132 | MrSID: Opened zoom level 5 with size 157x157. |
| 133 | MrSID: Opened zoom level 6 with size 79x79. |
| 134 | MrSID: Opened zoom level 7 with size 40x40. |
| 135 | MrSID: Opened zoom level 0 with size 5000x5000. |
| 136 | MrSID: Opened image: width 5000, height 5000, bands 3 |
| 137 | GDAL: GDALOpen(D:\projects\Client\Data\SDF/DO_S03_9608_40.sid, this=0FB15438) succeeds as MrSID. |
| 138 | GDAL: GDALClose(, this=0FB15D18) |
| 139 | GDAL: GDALClose(, this=0FB16088) |
| 140 | GDAL: GDALClose(, this=0FB16410) |
| 141 | GDAL: GDALClose(, this=0FB16798) |
| 142 | GDAL: GDALClose(, this=0FB16B20) |
| 143 | GDAL: GDALClose(, this=0FB16EA8) |
| 144 | GDAL: GDALClose(, this=0FB17230) |
| 145 | GDAL: GDALClose(D:\projects\Client\Data\SDF/DO_S03_9608_40.sid, this=0FB15438 |
| 146 | }}} |
| 147 | |
| 148 | ^1 This is just example output (copied from the GDAL provider guide for 2.2) showing the kind of output you would see. Just remember there's no MrSID driver support in this custom build of GDAL. |
| 149 | |
| 150 | Remember to unset CPL_DEBUG when finished as performance is significantly slower when GDAL debugging is turned on. |