MapGuide RFC 122 - Configurable Coordinate System Dictionary paths
This page contains a change request (RFC) for the MapGuide Open Source project. More MapGuide RFCs can be found on the RFCs page.
|RFC Template Version||(1.0)|
|Submission Date||30 September 2011|
|Last Modified||13 October 2011|
|Assigned PSC guide(s)||(when determined)|
|Voting History||13 October 2011|
This RFC proposes to make the coordinate system dictionary path configurable via serverconfig.ini and webconfig.ini
The current path where coordinate system dictionary files are stored is currently defined by the MENTOR_DICTIONARY_PATH environment variable. This approach is bad for many reasons, including:
- Environment variables are global, making for side-by-side installations of MapGuide (of different versions) very difficult. A newer MapGuide installation will overwrite this variable, possibly rendering an existing installation's Coordinate System APIs un-usable.
- For older versions of Windows (XP/2003), environment variable changes from the installer do not take effect until an OS restart is performed. This restart is completely unnecessary, and only exists in the installer to address this issue.
MapGuide should not use MENTOR_DICTIONARY_PATH to look for the coordinate system dictionary files. It should look for this path in a value defined by serverconfig.ini and webconfig.ini respectively.
The server and web tier startup logic will be modified as such:
- Read in the dictionary path from serverconfig.ini and webconfig.ini
- Obtain a pointer to the MgCoordinateSystemCatalog and change the dictionary path using the SetDictionaryDir() API, passing the read in value
- Check the library status of the catalog. Throw an exception if the library status is not initialized. Note that there is a current defect where the library status is not re-evaluated when SetDictionaryDir() is called. A patch (#1821) has been made for this particular issue.
The installer will be updated to write the proper CS-Map dictionary paths to serverconfig.ini and webconfig.ini. The mandatory reboot requirement for certain versions of windows will be removed.
Nothing is affected. Because the reading and setting of the dictionary path is done on server startup and web tier startup (via MgInitializeWebTier) before users and MapGuide Applications can start working with the Coordinate System APIs
Test using a custom coordinate system dictionary path specified in serverconfig.ini and webconfig.ini. Verify that MgCoordinateSystem APIs still correctly function from the server and web tier under this alternate path.
Funding / Resources