Changes between Version 6 and Version 7 of MapGuideRfc161


Ignore:
Timestamp:
Jun 28, 2017, 6:58:48 AM (7 years ago)
Author:
jng
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • MapGuideRfc161

    v6 v7  
    5353|| COORDINATESYSTEM || string || Yes || The coordinate system (CS-Map code) of the input geometry ||
    5454|| TRANSFORMTO || string || Optional || The coordinate system (CS-Map code) to transform the buffer geometry into. If not specified, the buffer geometry will be in the input coordinate system  ||
    55 || PRECISION || number || Optional || The decimal precision to use when outputting as GeoJSON. If not specified, it will default to 7 decimal places. Has no effect if output format is not GeoJSON ||
     55|| PRECISION || number || Optional || The decimal precision to use when outputting as GeoJSON. If not specified, coordinates will be output as-is if output format is GeoJSON ||
    5656
    5757=== Simplify ===
     
    7171|| COORDINATESYSTEM || string || Optional || The coordinate system (CS-Map code) of the input geometry. Only required in combination with `TRANSFORMTO` if you intend to transform the simplified geometry ||
    7272|| TRANSFORMTO || string || Optional || The coordinate system (CS-Map code) to transform the simplified geometry into. Only required in combination with `COORDINATESYSTEM ` if you intend to transform the simplified geometry  ||
    73 || PRECISION || number || Optional || The decimal precision to use when outputting as GeoJSON. If not specified, it will default to 7 decimal places. Has no effect if output format is not GeoJSON ||
     73|| PRECISION || number || Optional || The decimal precision to use when outputting as GeoJSON. If not specified, coordinates will be output as-is if output format is GeoJSON ||
    7474
    7575=== Binary Operation ===
     
    9494|| COORDINATESYSTEM || string || Optional || The coordinate system (CS-Map code) of the input geometries. Only required in combination with `TRANSFORMTO` if you intend to transform the geometry result ||
    9595|| TRANSFORMTO || string || Optional || The coordinate system (CS-Map code) to transform the simplified geometry into. Only required in combination with `COORDINATESYSTEM ` if you intend to transform the geometry result ||
    96 || PRECISION || number || Optional || The decimal precision to use when outputting as GeoJSON. If not specified, it will default to 7 decimal places. Has no effect if output format is not GeoJSON ||
     96|| PRECISION || number || Optional || The decimal precision to use when outputting as GeoJSON. If not specified, coordinates will be output as-is if output format is GeoJSON ||
    9797
    9898All operators are invoked in the form of {{{GEOMETRYA OPERATOR GEOMETRYB}}}. Where ordering of input geometries matters (the operator is not commutative), refer to this rule.
     
    135135|| COORDINATESYSTEM || string || Optional || The coordinate system (CS-Map code) of the input geometries. Only required in combination with `TRANSFORMTO` if you intend to transform the geometry result ||
    136136|| TRANSFORMTO || string || Optional || The coordinate system (CS-Map code) to transform the simplified geometry into. Only required in combination with `COORDINATESYSTEM ` if you intend to transform the geometry result ||
    137 || PRECISION || number || Optional || The decimal precision to use when outputting as GeoJSON. If not specified, it will default to 7 decimal places. Has no effect if output format is not GeoJSON ||
     137|| PRECISION || number || Optional || The decimal precision to use when outputting as GeoJSON. If not specified, coordinates will be output as-is if output format is GeoJSON ||
    138138
    139139=== Boundary ===
     
    149149|| COORDINATESYSTEM || string || Optional || The coordinate system (CS-Map code) of the input geometries. Only required in combination with `TRANSFORMTO` if you intend to transform the geometry result ||
    150150|| TRANSFORMTO || string || Optional || The coordinate system (CS-Map code) to transform the simplified geometry into. Only required in combination with `COORDINATESYSTEM ` if you intend to transform the geometry result ||
    151 || PRECISION || number || Optional || The decimal precision to use when outputting as GeoJSON. If not specified, it will default to 7 decimal places. Has no effect if output format is not GeoJSON ||
     151|| PRECISION || number || Optional || The decimal precision to use when outputting as GeoJSON. If not specified, coordinates will be output as-is if output format is GeoJSON ||
    152152
    153153=== Tessellate ===
     
    163163|| COORDINATESYSTEM || string || Optional || The coordinate system (CS-Map code) of the input geometries. Only required in combination with `TRANSFORMTO` if you intend to transform the geometry result ||
    164164|| TRANSFORMTO || string || Optional || The coordinate system (CS-Map code) to transform the simplified geometry into. Only required in combination with `COORDINATESYSTEM ` if you intend to transform the geometry result ||
    165 || PRECISION || number || Optional || The decimal precision to use when outputting as GeoJSON. If not specified, it will default to 7 decimal places. Has no effect if output format is not GeoJSON ||
     165|| PRECISION || number || Optional || The decimal precision to use when outputting as GeoJSON. If not specified, coordinates will be output as-is if output format is GeoJSON ||
    166166
    167167=== Distance ===
     
    281281Before this RFC, GeoJSON coordinates were output verbatim from their source geometry counterparts. Generally speaking, coordinates beyond 7 decimal places in most coordinate systems are superfluous and adds unnecessary bloat to GeoJSON content when converting feature geometry.
    282282
    283 As a result, the {{{MgGeoJsonWriter}}} class has been extended to allow a custom decimal precision to be specified
     283As a result, the {{{MgGeoJsonWriter}}} class has been extended to allow a custom decimal precision to be specified. Coordinate precision is opt-in so it requires manual activation.
    284284
    285285{{{
     
    292292    //////////////////////////////////////////////////////////////////
    293293    /// \brief
    294     /// Sets the decimal precision to use when writing out coordinates. If you do not call this method, the default precision used is 7 decimal places
     294    /// Sets the decimal precision to use when writing out coordinates. If you do not call this method, the default precision used is 7 decimal places.
     295    /// Precision must be enabled in order for this setting to have any effect
    295296    ///
    296297    /// <!-- Syntax in .Net, Java, and PHP -->
     
    308309    /// The decimal precision to write out coordinates
    309310    ///
     311    ///
     312    void SetPrecision(INT32 precision);
     313
     314    //////////////////////////////////////////////////////////////////
     315    /// \brief
     316    /// Gets the decimal precision to use when writing out coordinates
     317    ///
     318    /// <!-- Syntax in .Net, Java, and PHP -->
     319    /// \htmlinclude DotNetSyntaxTop.html
     320    /// int GetPrecision();
     321    /// \htmlinclude SyntaxBottom.html
     322    /// \htmlinclude JavaSyntaxTop.html
     323    /// int GetPrecision();
     324    /// \htmlinclude SyntaxBottom.html
     325    /// \htmlinclude PHPSyntaxTop.html
     326    /// int GetPrecision();
     327    /// \htmlinclude SyntaxBottom.html
     328    ///
     329    /// \return
     330    /// Returns the current precision
     331    ///
     332    INT32 GetPrecision();
     333
     334    //////////////////////////////////////////////////////////////////
     335    /// \brief
     336    /// Sets whether to apply coordinate precision when writing out GeoJSON coordinates
     337    ///
     338    /// <!-- Syntax in .Net, Java, and PHP -->
     339    /// \htmlinclude DotNetSyntaxTop.html
     340    /// void SetPrecisionEnabled(bool enabled);
     341    /// \htmlinclude SyntaxBottom.html
     342    /// \htmlinclude JavaSyntaxTop.html
     343    /// void SetPrecisionEnabled(boolean enabled);
     344    /// \htmlinclude SyntaxBottom.html
     345    /// \htmlinclude PHPSyntaxTop.html
     346    /// void SetPrecisionEnabled(bool enabled);
     347    /// \htmlinclude SyntaxBottom.html
     348    ///
     349    /// \param enabled (bool)
     350    /// If true, enables coordinate precision. Otherwise disables it
     351    ///
    310352    /// \return
    311353    /// Returns the GeoJSON output as a string.
    312354    ///
    313     void SetPrecision(INT32 precision);
     355    void SetPrecisionEnabled(bool enabled);
    314356
    315357    //////////////////////////////////////////////////////////////////
    316358    /// \brief
    317     /// Gets the decimal precision to use when writing out coordinates
    318     ///
    319     /// <!-- Syntax in .Net, Java, and PHP -->
    320     /// \htmlinclude DotNetSyntaxTop.html
    321     /// int GetPrecision();
    322     /// \htmlinclude SyntaxBottom.html
    323     /// \htmlinclude JavaSyntaxTop.html
    324     /// int GetPrecision();
    325     /// \htmlinclude SyntaxBottom.html
    326     /// \htmlinclude PHPSyntaxTop.html
    327     /// int GetPrecision();
    328     /// \htmlinclude SyntaxBottom.html
    329     ///
    330     /// \return
    331     /// Returns the current precision
    332     ///
    333     INT32 GetPrecision();
     359    /// Gets whether coordinate precision is enabled
     360    ///
     361    /// <!-- Syntax in .Net, Java, and PHP -->
     362    /// \htmlinclude DotNetSyntaxTop.html
     363    /// bool IsPrecisionEnabled();
     364    /// \htmlinclude SyntaxBottom.html
     365    /// \htmlinclude JavaSyntaxTop.html
     366    /// boolean IsPrecisionEnabled();
     367    /// \htmlinclude SyntaxBottom.html
     368    /// \htmlinclude PHPSyntaxTop.html
     369    /// bool IsPrecisionEnabled();
     370    /// \htmlinclude SyntaxBottom.html
     371    ///
     372    /// \return
     373    /// True if coordinate precision is enabled. False otherwise
     374    ///
     375    bool IsPrecisionEnabled();
    334376};
    335377
    336378}}}
    337379
    338 If not specified, 7 decimal places will be default when converting feature data to GeoJSON using {{{MgGeoJsonWriter}}}
     380By default, {{{MgGeoJsonWriter}}} will output coordinates as-is.
     381
     382If not specified, 7 decimal places will be default when converting feature data to GeoJSON using {{{MgGeoJsonWriter}}} if coordinate precision is enabled, but no call to {{{SetPrecision}}} is made.
    339383
    340384=== Auto-tessellation of curves ===
     
    693737Test new mapagent geo-processing operations and verify that their output is the same as the results provided by using `MgGeometry` APIs directly.
    694738
     739Add tests for double to string conversion with specific decimal precision.
     740
    695741Benchmark repeated evaluation of spatial operations using `MgGeometry` vs `MgPreparedGeometry`. Verify that using `MgPreparedGeometry` provides noticeable performance over using `MgGeometry`
    696742