wiki:MapGuideRfc122

Version 2 (modified by jng, 13 years ago) ( diff )

--

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.

Status

RFC Template Version(1.0)
Submission Date30 September 2011
Last Modified30 September 2011
AuthorJackie Ng
RFC Statusready for review
Implementation Statuspending
Proposed Milestone2.4
Assigned PSC guide(s)(when determined)
Voting History(vote date)
+1
+0
-0
-1
no vote

Overview

This RFC proposes to make the coordinate system dictionary path configurable via serverconfig.ini and webconfig.ini

Motivation

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.

Proposed Solution

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:

  1. Read in the dictionary path from serverconfig.ini and webconfig.ini
  2. Obtain a pointer to the MgCoordinateSystemCatalog and change the dictionary path using the SetDictionaryDir() API, passing the read in value
  3. 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.

Implications

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 Plan

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

Community

Note: See TracWiki for help on using the wiki.