Version 6 (modified by 18 years ago) ( diff ) | ,
---|
MapGuide RFC 6 - Overriding Coordinate Systems in Feature Sources
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 | February 5, 2007 |
Last Modified | Tony Fang Timestamp |
Author | Tony Fang |
RFC Status | draft |
Implementation Status | pending |
Proposed Milestone | 1.2 |
Assigned PSC guide(s) | (when determined) |
Voting History | (vote date) |
+1 | |
+0 | |
-0 | |
-1 |
Overview
In the feature source, there is an optional tag called SupplementalSpatialContextInfo. This can contain a SpatialContextType defining a coordinate system override. If an entry exists for a given Spatial Context, then the specified coordinate system override will be used. The coordinate system override will be given preference over the coordinate system defined in the data.
Previously, the SupplementalSpatialContextInfo was intended for data containing spatial contexts with undefined coordinate systems. The SupplementalSpatialContextInfo would allow a coordinate system to be specified for a given spatial context. The SupplementalSpatialContextInfo can now be used to override coordinate systems for all spatial contexts in a feature source -- regardless of whether it contains a coordinate system or not.
Motivation
If a feature source geometry contains an incorrect coordinate system or does not have a coordinate system defined, this provides a convenient way to change the coordinate system without having to change the data of the feature source.
Proposed Solution
The schema FeatureSource-1.0.0.xsd does not change. SupplementalSpatialContextInfo already exists in the schema. The schema documentation will be updated to reflect the new behaviour in the server.
<xs:element name="SupplementalSpatialContextInfo" type="SpatialContextType" minOccurs="0" maxOccurs="unbounded"> <xs:annotation> <xs:documentation>Additional information for a spatial context when the coordinate system is overridden. </xs:documentation> </xs:annotation> </xs:element>
When the server returns the data for a given feature source. it will check for entries in the SupplementalSpatialContextInfo. If there is a spatial context containing a coordinate system override, then that is the coordinate system used for the data.
Here is a feature source containing a coordinate system override:
<FeatureSource xsi:noNamespaceSchemaLocation="FeatureSource-1.0.0.xsd"> <Provider>OSGeo.SDF</Provider> <Parameter> <Name>File</Name> <Value>%MG_DATA_FILE_PATH%CENTLINES.sdf</Value> </Parameter> <Parameter> <Name>ReadOnly</Name> <Value>TRUE</Value> </Parameter> <SupplementalSpatialContextInfo> <Name>LL84</Name> <CoordinateSystem>PROJCS["CANA83-3TM114",GEOGCS["CANA83-3TM114",DATUM["NAD 83",SPHEROID["GRS 80",6378137,298.25722210089],TOWGS84[0,0,0,0,0,0,0]],PRIMEM["Greenwich",0],UNIT["Degrees", 0.0174532925199433]],PROJECTION["Transverse Mercator"],PARAMETER["central_meridian", -114],PARAMETER["latitude_of_origin", 0],PARAMETER["scale_factor", 0.9999],PARAMETER["false_easting", 0],PARAMETER["false_northing", 0],UNIT["Meter", 1]]</CoordinateSystem> </SupplementalSpatialContextInfo> </FeatureSource>
Implications
If the SupplementalSpatialContextInfo contains a spatial context with a coordinate system, then that is the coordinate system which will be used on the data. It will override any coordinate system contained in the data. This is the behaviour that will change.
If the feature source does not contain a spatial context with a coordinate system, then the coordinate system contained in the data will be used. This behaviour is the same as before.
Test Plan
Add unit tests to verify behaviour of the coordinate system overrides.
Funding/Resources
Autodesk to supply.