Changes between Version 8 and Version 9 of MapGuideRfc116


Ignore:
Timestamp:
Jun 27, 2011, 1:46:26 PM (13 years ago)
Author:
NormOlsen
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • MapGuideRfc116

    v8 v9  
    5252=== Refactor the MgCoordinateSystemTransform::Transform Functions ===
    5353
    54 It is proposed that the existing implementation of all of the Transform overloads in the existing MgCoordinateSystemTransformation object be refactored for optimum performance purposes.  It is contemplated that by : a) reducing the number of changes the form of a coordinate takes, b) removing some internal function calls by replicating code to a small degree, and c) reducing the overhead implied by several layers of try {} catch blocks; that significant performance enhancements can be achieved.  This work will introduce some minor changes in behavior which are considered to be improvements in consistency and usefulness of the API and only affects behavior in extraordinary cases.  These changes are detailed below.
     54It is proposed that the existing implementation of all of the Transform overloads in the existing MgCoordinateSystemTransformation object be refactored for optimum performance purposes.  It is contemplated that by: a) reducing the number of changes the form of a coordinate takes, b) removing some internal function calls by replicating code to a small degree, and c) reducing the overhead implied by several layers of try {} catch blocks; that significant performance enhancements can be achieved.  This work will introduce some minor changes in behavior which are considered to be improvements in consistency and usefulness of the API and only affects behavior in extraordinary cases.  These changes are detailed below.
    5555
    5656=== Conversion Status Accumulation ===
     
    5858CS_MAP issues warnings for coordinates outside the useful range of the coordinate systems (and the datums referenced by them) used to construct the MgCoordinateSystemTransform object.  These are warnings and do not mean that the returned coordinates are invalid.  It should '''not''' be considered abnormal for a small sub-set of the coordinates in a large conversion to be outside the useful range of a Transformation object.  In the event that a large number of coordinates in a conversion are found to be outside the useful range, it is proper to question the validity of the conversion.  Such a case is a strong indication that the user may not have selected the proper coordinate system for a specific conversion.
    5959
    60 The default behavior of the API is to throw an exception whenever such a warning is received from the CS-MAP library.  This default behavior can be, and often is, modified at run-time using the IgnoreDatumShiftWarning and IgnoreOutsideDomainWarning members of the MgCoordinateSystem interface.  Thus, it is recommended that applications using the API disable the exception throwing behavior of the API.  It is further proposed that the MgCoordinateSystemTransform object be enhanced to provide a status accumulation feature.  By status accumulation, we refer to the concept of: a) counting all source projective CRS warnings issued, b) counting all datum shift warnings issued, and c) counting all target projective CRS warnings.
     60The default behavior of the API is to throw an exception whenever such a warning is received from the CS-MAP library.  This default behavior can be, and often is, modified at run-time using the IgnoreDatumShiftWarning and IgnoreOutsideDomainWarning members of the MgCoordinateSystemTransform interface.  Thus, it is recommended that applications using the API disable the exception throwing behavior of the API.  It is further proposed that the MgCoordinateSystemTransform object be enhanced to provide a status accumulation feature.  By status accumulation, we refer to the concept of: a)counting all source projective CRS warnings issued, b)counting all datum shift warnings issued, and c)counting all target projective CRS warnings.
    6161
    62 Upon construction, or upon use of the SetSourceAndTarget member function, or upon use of the ResetLastTransformStatus member function, all counters of the status accumulation mechanism will be reset to zero.  Each point converted by the MgCoordinateSystemTransform object will cause the appropriate counts to be advanced based on the status of the conversion.  Upon completion of the conversion of a map or data source, the application would then query the Transformation object and make a determination as to the validity of the result.
     62Upon construction, or upon use of the SetSourceAndTarget member function, or upon use of the ResetLastTransformStatus member function, all counters of the status accumulation mechanism will be reset to zero.  Each point converted by the MgCoordinateSystemTransform object will cause the appropriate counts to be advanced based on the status of the conversion.  Upon completion of the conversion of a map or data source, the application would then query the Transform object and make a determination as to the validity of the result.
    6363
    6464For example, a conversion where the target CRS warning count exceeds, say, 20% of the total number of points suggests that the target CRS chosen by the user is incorrect.  On the other hand, warning counts which are less than, say, 20% of the total point count suggest a perfectly normal conversion.
     
    107107This function would inform the MgCoordinateSystemTransform object that the current instance may assume it is operating in a single thread environment, and thus deliver any extra performance it can under that assumption.  The member will return the previous state of the AssumeSingleThread flag.
    108108
     109Construction of a new MgCoordinateSystemTransform object will have the AssumeSingleThread flag set to false.  Use of the SetSourceAndTarget member function, will cause the AssumeSingle Thread flag to be reset to false.
     110
    109111== Implications ==
    110112