MapGuide RFC 98 - EPSG Code Upgrade
This page contains an 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 | 17 June 2010 |
Last Modified | Norm Olsen 17 June 2010 |
Author | Nortm Olsen |
RFC Status | draft |
Implementation Status | |
Proposed Milestone | 2.2 |
Assigned PSC guide(s) | (when determined) |
Voting History | (vote date) |
+1 | |
+0 | |
-0 | |
-1 | |
no vote |
Overview
CS-MAP RFC 2 will add to the content of the coordinate system dictionary the EPSG code, SRID code, and the EPSG quadrant code for all systems for which this information is known. It is proposed that the coordinate system API be expanded to expose this new information to the MapGuide community.
Motivation
EPSG and Oracle SRID codes are becoming essential meta data associated with system definitions. The CS-MAP RFC 2, upon approval, will populate currently unused elements of the Coordinate System Dictionary record with EPSG and Oracle SRID codes. Additionally, the Datums dictionary and the Ellipsoid Dictionary will have unused elements populated with EPSG codes (there are no Oracle SRID codes for datums and ellipsoids). Implementation of this RFC will simply expose this data to the MapGuide community.
There exists an axis swap problem when dealing with several data repositories. Essentially, the problem stems from the official definition requiring that the northing be the first ordinate of a coordinate. Since this produces a rotated image in most graphic systems this distinction is ignored in many CS-MAP definitions. CS-MAP RFC 2 proposes to include the "officially blessed" (read EPSG) ordinate order in the coordinate system definition and this RFC proposes to simply expose this information to the MapGuide community. Having access to this information, an application can compare the CS-MAP quad value to the EPSG quad value and chose an appropriate action based on this comparison.
Proposed Solution
Implementation is rather simple. Three additional interface functions will be added as follows. No exceptions are thrown, the API's simply return zeros if the information is not available.
- INT32 MgCoordinateSystem::GetEpsgCode();
- INT32 MgCoordinateSystem::GetEpsgQuadrant();
- INT32 MgCoordinateSystem::GetSridCode ();
The return value of the GetEpsgQuadrant () method is a value with the same meaning as the MgCoordinateSystem::GetQuadrant() member which is (X == first ordinate, Y == second ordinate):
1 | X increases to the East, Y increases to the North |
2 | X increases to the West, Y increases to the North |
3 | X increases to the West, Y increases to the South |
4 | X increases to the East, Y increases to the South |
-1 | X increases to the North, Y increases to the East |
-2 | X increases to the North, Y increases to the West |
-3 | X increases to the South, Y increases to the West |
-4 | X increases to the South, Y increases to the East |
Implications
No existing interface is changed. Three new interface functions are added to expose new information. The new interfaces will not throw exceptions.
The names of some data elements in the CS-MAP ldata structures will change. There exists one reference to each of these unused elements which will be renamed. This means that the change to CS-MAP and this MapGuide RFC will need to be synchronized.
Test Plan
A test program which compares the results returned by the new interfaces to the values obtained from the then current NameMapper database will be implemented.
Funding/Resources
Developement resources and funding to be provided by Autodesk.