Version 1 (modified by 12 years ago) ( diff ) | ,
---|
FDO RFC 66 - Support coordinate system transformation when serialize XML
This page contains a request for comments document (RFC) for the FDO Open Source project. More FDO RFCs can be found on the RFCs page.
Status
RFC Template Version | 1.1 |
Submission Date | April 19, 2013 |
Last Modified | Christine Bao - April 19, 2013 |
Author | Christine Bao |
RFC Status | Draft |
Implementation Status | Completed |
Proposed Milestone | 3.9 |
Assigned PSC guide(s) |
Overview
This proposal adds coordinate system transformation support when serialize XML using FdoXmlFeatureSerializer::XmlSerialize(...).
Motivation
FdoXmlFeatureSerializer is used for serializing FDO features into XML, for example it can serialize FDO features into WFS GML format.
void FdoXmlFeatureSerializer::XmlSerialize( FdoIFeatureReader* reader, FdoXmlFeatureWriter* writer, FdoXmlFeatureFlags* flags)
However currently it can only reads the features and write the native data in data source coordinate system, if user request the data in another coordinate system, it fails to return the right value. For example, if the data source SDF's coordinate system is ca83, and published as WFS service. Customer can request this WFS in LL84 coordinate system. Currently the returned WFS GML still ca83, not expected as customer wants.
Proposed Solution
FDO does not have coordinate system transformation capability. It should provide a way to let the caller to coordinate system transformation. A solution is to define a pseudo method in FDO:
class FdoCoordinateSystemTransform : public FdoDisposable { public: FDO_API virtual FdoIDirectPosition* CoordinateSystemTransform(FdoIDirectPosition* sourceGeometry); };
And FdoXmlFeatureFlags adopt this if the caller wants to do coordinate system transformation.
FDO_API virtual void SetSrsName(FdoString* srsName); FDO_API virtual FdoString* GetSrsName(); FDO_API virtual void SetCoordinateSystemTransform(FdoCoordinateSystemTransform *transform); FDO_API virtual FdoCoordinateSystemTransform* GetCoordinateSystemTransform();
This srs name and transform is called during FDO serializing XML. The default value is NULL, so if caller does not set it, it's ignored and work as before.
The caller can make a class inherit from FdoCoordinateSystemTransform and implement real CoordinateSystemTransform(...) function, set the instance to FdoXmlFeatureFlags, and the feature data is transformed.
Implications
Existing code is not implicated.
Test Plan
Add unit test in FDO to do pseudo coordinate system transformation. Test in MapGuide to do real coordinate system transformation.
Funding/Resources
Autodesk
Attachments (2)
- Ticket863.patch (53.8 KB ) - added by 12 years ago.
- Ticket863_unittest.patch (30.5 KB ) - added by 12 years ago.
Download all attachments as: .zip