wiki:MapGuideRfc127

Version 1 (modified by baertelchen, 12 years ago) ( diff )

First draft of this RFC


MapGuide RFC # - Change Coordinate System API (MgGeometry) to adopt changes proposed by CS-Map RFC6

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 Date(Date / Time submitted)
Last ModifiedAndre Barth 09/05/2012
AuthorAndre Barth
RFC Statusdraft
Implementation Statuspending
Proposed Milestone2.5
Assigned PSC guide(s)(when determined)
Voting History(vote date)
no vote

Overview

RFC6 for CS-Map - MapGuide's geospatial coordinate system engine - proposes to split the geospatial coordinate system dictionary (*.CSD) files it is using into "system" (read-only) and "user-defined" (read/write) files. In order to be able to benefit from these enhancements, the MgCoordinateSystem API will have to be updated.

Motivation

The rational behind changing the MgCoordinateSystem API is the same as for CS-Map's RFC6. Adding user-defined coordinate systems to CS-Map - which is possible through the MgCoordinateSystem API already today - would no longer rewrite entire *.CSD files which have been potentially installed as read-only files. Also, having any custom geospatial coordinate system information separated from the default system files allows for much easier sharing, distribution and "installing" of these.

See http://trac.osgeo.org/csmap/wiki/CsMapRfc6's 'Motivation' section for additional details.

Proposed Solution

This RFC proposes to implement the following changes to the MgCoordinateSystem API in principle and initialization routines in general:

  • Modify the initialization sequence of the MgCoordinateSystemCatalog class so it by default initializes the system dictionary path and also the user's coordinate system path. The latter defaults to [<current user>\Autodesk\User Geospatial Coordinate Systems] which is analog to the default dictionary path already implemented in the CCoordinateSystemCatalog class. This can be dynamically overridden by the MENTOR_USER_DICTIONARY_PATH variable. If, in either case, the targeted directory doesn't exist or is invalid in any way, entire MgCoordinateSystem API behaves as of today. That is, any dictionary updates initiated through MapGuide's Coordinate System API will directly modify the root CSD files.
  • Adapt the changes made due the implementation of RFC122 (http://trac.osgeo.org/mapguide/wiki/MapGuideRfc122) so that the user's dictionary path can be configured through the serverconfig.ini/webconfig.ini file

New API to be added:

  • CoordinateSystemCatalog::GetDefaultUserDictionaryDir(): Returns the default dictionary directory where user-defined geospatial coordinate system information is stored.
  • CoordinateSystemCatalog::GetUserDictionaryDir(): Returns the current, if so configured or initialized, dictionary directory where user-defined geospatial coordinate system information is stored
  • CoordinateSystemCatalog::SetUserDictionaryDir(): Sets the current dictionary directory where user-defined geospatial coordinate system information will be stored

Additional modifications:

  • With RFC6 being implemented in CS-Map, the category API will be finalized, too. Currently, MapGuide uses its own code to access, i.e. read and write, the Category.CSD file. That should be changed so it uses - like all other CS-Map dictionary related implementation in MapGuide - the API provided by CS-Map directly.
  • The various MgCoordinateSystem...Dictionary classes have to be changed, where appropriate, so they call into new CS-Map API. All these changes are internal only, however.

Implications

None. The additional directory where user-defined geospatial coordinate system information is to be stored is not created by default in any form. Instead, this feature has to be explicitly turned on by providing a valid target directory where custom geospatial coordinate system information can be stored. If that does not happen to be [<current user>\Autodesk\User Geospatial Coordinate Systems], MapGuide has to be configured in one of the following ways:

  • setting the MENTOR_USER_DICTIONARY_PATH variable - OR -
  • setting up the correct configuration in the appropriate ini file - OR -
  • call the new SetUserDictionaryDir() API in an appropriate way

where none of the aforementioned is proposed to be implemented by this RFC, e.g. through updating the installer.

Test Plan

The proposed changes will tested at unit level, i.e. by enhancing existing CPPUnitTests or new CPPUnit tests where appropriate. Existing unit tests, specifically those related to the coordinate system, should naturally not be affected by this RFC though.

In addition, the tests that have been run for RFC122 will have to be re-executed. See the Test Plan section for RFC 122.

Funding / Resources

Supplied by Autodesk.

Note: See TracWiki for help on using the wiki.