Version 4 (modified by 14 years ago) ( diff ) | ,
---|
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 | (Date/Time submitted) |
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 thatthe coordinate system API be expanded to expose this new information to the MapGuide community.
Also, it is proposed that an overload to the MgCoordinateSystemCatalog constructor be added such that the path to the dictionary folder can be specified upon construction of the catalog (in addition to the current constructor which uses an environmental variable).
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 datusm 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 baded 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 function 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 inofrmation. The new interfaces will not throw exceptions.
Test Plan
A test porogram which compares the results returned by the new interfaces to the values obtained from the current NameMapper will be implemented.
Funding/Resources
Developement resources and funding to be provided by Autodesk.