MapGuide RFC 95 - OGC WMS 1.3.0 Support
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 | 06/12/2010 |
Last Modified | Arthur Liu 06/13/2010 |
Author | Arthur Liu |
RFC Status | adopted |
Implementation Status | Implemented |
Proposed Milestone | 2.3 |
Assigned PSC guide(s) | Bruce Dechant |
Voting History | June 21, 2010 |
+1 | Bruce, Tom, Trevor, Jackie, Jason, Haris, Paul, Robert, Zac |
+0 | |
-0 | |
-1 | |
no vote |
Overview
Enhance the WMS 1.3.0 implmentation of MapGuide according to OGC WMS 1.3.0 specification. The goal is to make sure MapGuide could pass the OGC certification for WMS 1.3.0 and 1.1.1 (http://cite.opengeospatial.org).
Motivation
OGC WMS 1.3.0 specification has been released for years, however, the highest offical supported WMS version for MapGuide is 1.1.1. It is necessary for MapGuide to enhance the implementation to support WMS 1.3.0.
Proposed Solution
Here are some proposed solution for two main changes in WMS 1.3.0.
One significant change in WMS 1.3.0 is the axis orientation. In order to align with the definitions from the EPSG database, OGC WMS 1.3.0 specification reversed the axis sequence for some EPSG code include EPSG:4326. Which means for some EPSG CRS, the meaning of (x,y) is changed from (lon,lat) to (lat,lon) or even other orientations.
Some new API added in order to adapt the axis orientation issue in WMS 1.3.0.
CS_MAP will provide an API to obtain the axis orientation for one particular ESPG CRS.
// Parameter nVendor=MgCoordinateSystemCodeFormat::Epsg // Return 0 X increases to the East, Y increases to the North // 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 INT16 MgCoordinateSystem::GetEpsgQuadrant (void)
It is necessary for MapGuide implement an API ProcessBoundingBoxAxes to handle different axis orientation for the bounding box parameter in GetMap and GetFeatureInfo operation. For example: change (lat,lon) back to (lon,lat).
class MgWmsMapUtil { public: … // Handle the CRSs which have their axis orientation changed static void ProcessBoundingBoxAxes(STRING sSrs, REFSTRING bbox); }
The other important change in WMS 1.3.0 specification is the CRS namespace. WMS 1.3.0 specification introduced two more CRS namespaces besides EPSG, they are CRS namespace which in the form specified by ISO 19111 and AUTO2 namespace is used for "automatic" coordinate reference systems.
In order to pass the OGC certification, the CRS CRS:84 must be supported. There's a workaround that it could be predefined in OgcWmsService.config.
<!-- This definition allows a site to override the behavior of --> <!-- the SRS= parameter of requests. --> <!-- Add translate elements here to map any particularly --> <!-- troublesome SRS to some appropriate WKT. --> <Define item="SRS.WKT.map"> <!-- This example fixes a problem with EPSG:21781 not finding the WKT for EPSG:21781 in the CS library. --> <translate from="EPSG:21781">PROJCS["CH1903.LV03/01",GEOGCS["LLCH1903",DATUM["CH-1903",SPHEROID["BESSEL",6377397.155,299.15281535],TOWGS84[660.0770,13.5510,369.3440,0.804816,0.577692,0.952236,5.66000000]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Swiss_Oblique_Cylindrical"],PARAMETER["false_easting",600000.000],PARAMETER["false_northing",200000.000],PARAMETER["latitude_of_origin",46.95240555555556],PARAMETER["central_meridian",7.43958333333333],UNIT["Meter",1.00000000000000]]</translate> <translate from="CRS:84">CRS:84 wkt here</translate> </Define>
Implications
Besides OGC WMS 1.3.0, MapGuide also support some previous WMS versions like 1.1.1, 1.1.0, and 1.0.0. This enhancement should not affect the functionality of other previous versions.
Test Plan
After the implementation of OGC WMS 1.3.0 enhancement, an official OGC certification(http://cite.opengeospatial.org) will test if MapGuide provides standard WMS service.
Funding/Resources
Supplied by Autodesk.
Relevant Ticket
Ticket #1392