geos_390_docs/classgeos_1_1operation_1_1o...

600 lines
30 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>GEOS: geos::operation::overlayng::PrecisionUtil Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">GEOS
&#160;<span id="projectnumber">3.9.1dev</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class&#160;List</span></a></li>
<li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&#160;Members</span></a></li>
</ul>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="namespacegeos.html">geos</a></li><li class="navelem"><a class="el" href="namespacegeos_1_1operation.html">operation</a></li><li class="navelem"><a class="el" href="namespacegeos_1_1operation_1_1overlayng.html">overlayng</a></li><li class="navelem"><a class="el" href="classgeos_1_1operation_1_1overlayng_1_1PrecisionUtil.html">PrecisionUtil</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#pub-static-attribs">Static Public Attributes</a> &#124;
<a href="#pri-static-methods">Static Private Member Functions</a> &#124;
<a href="classgeos_1_1operation_1_1overlayng_1_1PrecisionUtil-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">geos::operation::overlayng::PrecisionUtil Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p><code>#include &lt;<a class="el" href="PrecisionUtil_8h_source.html">PrecisionUtil.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1operation_1_1overlayng_1_1PrecisionUtil_1_1InherentScaleFilter.html">InherentScaleFilter</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:aec6fe24b0875bb44e4437119c08414a1"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1operation_1_1overlayng_1_1PrecisionUtil.html#aec6fe24b0875bb44e4437119c08414a1">PrecisionUtil</a> ()</td></tr>
<tr class="separator:aec6fe24b0875bb44e4437119c08414a1"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:ab9829c22876aa08fc9274076542a3c9d"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classgeos_1_1geom_1_1PrecisionModel.html">PrecisionModel</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1operation_1_1overlayng_1_1PrecisionUtil.html#ab9829c22876aa08fc9274076542a3c9d">robustPM</a> (const <a class="el" href="classgeos_1_1geom_1_1Geometry.html">Geometry</a> *a, const <a class="el" href="classgeos_1_1geom_1_1Geometry.html">Geometry</a> *b)</td></tr>
<tr class="separator:ab9829c22876aa08fc9274076542a3c9d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adffa35fa4ca92f826c116ea046539554"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classgeos_1_1geom_1_1PrecisionModel.html">PrecisionModel</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1operation_1_1overlayng_1_1PrecisionUtil.html#adffa35fa4ca92f826c116ea046539554">robustPM</a> (const <a class="el" href="classgeos_1_1geom_1_1Geometry.html">Geometry</a> *a)</td></tr>
<tr class="separator:adffa35fa4ca92f826c116ea046539554"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a35c0fe4144395341330ea6712aaec1f4"><td class="memItemLeft" align="right" valign="top">static double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1operation_1_1overlayng_1_1PrecisionUtil.html#a35c0fe4144395341330ea6712aaec1f4">robustScale</a> (const <a class="el" href="classgeos_1_1geom_1_1Geometry.html">Geometry</a> *a, const <a class="el" href="classgeos_1_1geom_1_1Geometry.html">Geometry</a> *b)</td></tr>
<tr class="separator:a35c0fe4144395341330ea6712aaec1f4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acfd80e5eae5bbfe02057fbb7875a4aca"><td class="memItemLeft" align="right" valign="top">static double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1operation_1_1overlayng_1_1PrecisionUtil.html#acfd80e5eae5bbfe02057fbb7875a4aca">robustScale</a> (const <a class="el" href="classgeos_1_1geom_1_1Geometry.html">Geometry</a> *a)</td></tr>
<tr class="separator:acfd80e5eae5bbfe02057fbb7875a4aca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae35d94a7ce2b01665d7e56394f34f94b"><td class="memItemLeft" align="right" valign="top">static double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1operation_1_1overlayng_1_1PrecisionUtil.html#ae35d94a7ce2b01665d7e56394f34f94b">safeScale</a> (double value)</td></tr>
<tr class="separator:ae35d94a7ce2b01665d7e56394f34f94b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afc4abdd2ff4da680797680d981494e52"><td class="memItemLeft" align="right" valign="top">static double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1operation_1_1overlayng_1_1PrecisionUtil.html#afc4abdd2ff4da680797680d981494e52">safeScale</a> (const <a class="el" href="classgeos_1_1geom_1_1Geometry.html">Geometry</a> *geom)</td></tr>
<tr class="separator:afc4abdd2ff4da680797680d981494e52"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abbcc4e21fbc610ecb608d4a226e851e4"><td class="memItemLeft" align="right" valign="top">static double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1operation_1_1overlayng_1_1PrecisionUtil.html#abbcc4e21fbc610ecb608d4a226e851e4">safeScale</a> (const <a class="el" href="classgeos_1_1geom_1_1Geometry.html">Geometry</a> *a, const <a class="el" href="classgeos_1_1geom_1_1Geometry.html">Geometry</a> *b)</td></tr>
<tr class="separator:abbcc4e21fbc610ecb608d4a226e851e4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac01efb69b6b091c99a92f076bb68af8b"><td class="memItemLeft" align="right" valign="top">static double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1operation_1_1overlayng_1_1PrecisionUtil.html#ac01efb69b6b091c99a92f076bb68af8b">inherentScale</a> (double value)</td></tr>
<tr class="separator:ac01efb69b6b091c99a92f076bb68af8b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a158f715a394f83e93f9a4f09263c8327"><td class="memItemLeft" align="right" valign="top">static double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1operation_1_1overlayng_1_1PrecisionUtil.html#a158f715a394f83e93f9a4f09263c8327">inherentScale</a> (const <a class="el" href="classgeos_1_1geom_1_1Geometry.html">Geometry</a> *geom)</td></tr>
<tr class="separator:a158f715a394f83e93f9a4f09263c8327"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af542f355659213b99d780f54d24b23ef"><td class="memItemLeft" align="right" valign="top">static double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1operation_1_1overlayng_1_1PrecisionUtil.html#af542f355659213b99d780f54d24b23ef">inherentScale</a> (const <a class="el" href="classgeos_1_1geom_1_1Geometry.html">Geometry</a> *a, const <a class="el" href="classgeos_1_1geom_1_1Geometry.html">Geometry</a> *b)</td></tr>
<tr class="separator:af542f355659213b99d780f54d24b23ef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adb51069987746ceeefa1fdf91dc81f82"><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1operation_1_1overlayng_1_1PrecisionUtil.html#adb51069987746ceeefa1fdf91dc81f82">numberOfDecimals</a> (double value)</td></tr>
<tr class="separator:adb51069987746ceeefa1fdf91dc81f82"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-attribs"></a>
Static Public Attributes</h2></td></tr>
<tr class="memitem:acad0be73675b719995d348899e71cd10"><td class="memItemLeft" align="right" valign="top">static constexpr int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1operation_1_1overlayng_1_1PrecisionUtil.html#acad0be73675b719995d348899e71cd10">MAX_ROBUST_DP_DIGITS</a> = 14</td></tr>
<tr class="separator:acad0be73675b719995d348899e71cd10"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-static-methods"></a>
Static Private Member Functions</h2></td></tr>
<tr class="memitem:ae07cb113267bf18b91018824d64e00aa"><td class="memItemLeft" align="right" valign="top">static double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1operation_1_1overlayng_1_1PrecisionUtil.html#ae07cb113267bf18b91018824d64e00aa">robustScale</a> (double <a class="el" href="classgeos_1_1operation_1_1overlayng_1_1PrecisionUtil.html#ac01efb69b6b091c99a92f076bb68af8b">inherentScale</a>, double <a class="el" href="classgeos_1_1operation_1_1overlayng_1_1PrecisionUtil.html#ae35d94a7ce2b01665d7e56394f34f94b">safeScale</a>)</td></tr>
<tr class="separator:ae07cb113267bf18b91018824d64e00aa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3e04bd998d17991aab9e59540a653542"><td class="memItemLeft" align="right" valign="top">static double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1operation_1_1overlayng_1_1PrecisionUtil.html#a3e04bd998d17991aab9e59540a653542">maxBoundMagnitude</a> (const <a class="el" href="classgeos_1_1geom_1_1Envelope.html">Envelope</a> *env)</td></tr>
<tr class="separator:a3e04bd998d17991aab9e59540a653542"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acbce50448dbf15e0e38e90c6a774de86"><td class="memItemLeft" align="right" valign="top">static double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1operation_1_1overlayng_1_1PrecisionUtil.html#acbce50448dbf15e0e38e90c6a774de86">precisionScale</a> (double value, int precisionDigits)</td></tr>
<tr class="separator:acbce50448dbf15e0e38e90c6a774de86"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Unions a collection of geometries in an efficient way, using <a class="el" href="classgeos_1_1operation_1_1overlayng_1_1OverlayNG.html">OverlayNG</a> to ensure robust computation. </p><dl class="section author"><dt>Author</dt><dd>Martin Davis </dd></dl>
<p>Definition at line <a class="el" href="PrecisionUtil_8h_source.html#l00049">49</a> of file <a class="el" href="PrecisionUtil_8h_source.html">PrecisionUtil.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="aec6fe24b0875bb44e4437119c08414a1"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">geos::operation::overlayng::PrecisionUtil::PrecisionUtil </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Definition at line <a class="el" href="PrecisionUtil_8h_source.html#l00086">86</a> of file <a class="el" href="PrecisionUtil_8h_source.html">PrecisionUtil.h</a>.</p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="ac01efb69b6b091c99a92f076bb68af8b"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static double geos::operation::overlayng::PrecisionUtil::inherentScale </td>
<td>(</td>
<td class="paramtype">double&#160;</td>
<td class="paramname"><em>value</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Computes the inherent scale of a number. The inherent scale is the scale factor for rounding which preserves all digits of precision (significant digits) present in the numeric value. In other words, it is the scale factor which does not change the numeric value when rounded:</p>
<p>num = round( num, inherentScale(num) ) </p>
</div>
</div>
<a class="anchor" id="a158f715a394f83e93f9a4f09263c8327"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static double geos::operation::overlayng::PrecisionUtil::inherentScale </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classgeos_1_1geom_1_1Geometry.html">Geometry</a> *&#160;</td>
<td class="paramname"><em>geom</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Computes the inherent scale of a geometry. The inherent scale is the scale factor for rounding which preserves <b>all</b> digits of precision (significant digits) present in the geometry ordinates.</p>
<p>This is the maximum inherent scale of all ordinate values in the geometry. </p>
</div>
</div>
<a class="anchor" id="af542f355659213b99d780f54d24b23ef"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static double geos::operation::overlayng::PrecisionUtil::inherentScale </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classgeos_1_1geom_1_1Geometry.html">Geometry</a> *&#160;</td>
<td class="paramname"><em>a</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classgeos_1_1geom_1_1Geometry.html">Geometry</a> *&#160;</td>
<td class="paramname"><em>b</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Computes the inherent scale of two geometries. The inherent scale is the scale factor for rounding which preserves <b>all</b> digits of precision (significant digits) present in the geometry ordinates.</p>
<p>This is the maximum inherent scale of all ordinate values in the geometries. </p>
</div>
</div>
<a class="anchor" id="a3e04bd998d17991aab9e59540a653542"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static double geos::operation::overlayng::PrecisionUtil::maxBoundMagnitude </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classgeos_1_1geom_1_1Envelope.html">Envelope</a> *&#160;</td>
<td class="paramname"><em>env</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Determines the maximum magnitude (absolute value) of the bounds of an of an envelope. This is equal to the largest ordinate value which must be accommodated by a scale factor. </p>
</div>
</div>
<a class="anchor" id="adb51069987746ceeefa1fdf91dc81f82"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static int geos::operation::overlayng::PrecisionUtil::numberOfDecimals </td>
<td>(</td>
<td class="paramtype">double&#160;</td>
<td class="paramname"><em>value</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Determines the number of decimal places represented in a double-precision number (as determined by Java). This uses the Java double-precision print routine to determine the number of decimal places, This is likely not optimal for performance, but should be accurate and portable. </p>
</div>
</div>
<a class="anchor" id="acbce50448dbf15e0e38e90c6a774de86"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static double geos::operation::overlayng::PrecisionUtil::precisionScale </td>
<td>(</td>
<td class="paramtype">double&#160;</td>
<td class="paramname"><em>value</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>precisionDigits</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Computes the scale factor which will produce a given number of digits of precision (significant digits) when used to round the given number.</p>
<p>For example: to provide 5 decimal digits of precision for the number 123.456 the precision scale factor is 100; for 3 digits of precision the scale factor is 1; for 2 digits of precision the scale factor is 0.1.</p>
<p>Rounding to the scale factor can be performed with <a class="el" href="">PrecisionModel#round</a></p>
<dl class="section see"><dt>See also</dt><dd>PrecisionModel.round </dd></dl>
</div>
</div>
<a class="anchor" id="ab9829c22876aa08fc9274076542a3c9d"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static <a class="el" href="classgeos_1_1geom_1_1PrecisionModel.html">PrecisionModel</a> geos::operation::overlayng::PrecisionUtil::robustPM </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classgeos_1_1geom_1_1Geometry.html">Geometry</a> *&#160;</td>
<td class="paramname"><em>a</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classgeos_1_1geom_1_1Geometry.html">Geometry</a> *&#160;</td>
<td class="paramname"><em>b</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Determines a precision model to use for robust overlay operations. The precision scale factor is chosen to maximize output precision while avoiding round-off issues.</p>
<p>NOTE: this is a heuristic determination, so is not guaranteed to eliminate precision issues.</p>
<p>WARNING: this is quite slow. </p>
</div>
</div>
<a class="anchor" id="adffa35fa4ca92f826c116ea046539554"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static <a class="el" href="classgeos_1_1geom_1_1PrecisionModel.html">PrecisionModel</a> geos::operation::overlayng::PrecisionUtil::robustPM </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classgeos_1_1geom_1_1Geometry.html">Geometry</a> *&#160;</td>
<td class="paramname"><em>a</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Determines a precision model to use for robust overlay operations for one geometry. The precision scale factor is chosen to maximize output precision while avoiding round-off issues.</p>
<p>NOTE: this is a heuristic determination, so is not guaranteed to eliminate precision issues.</p>
<p>WARNING: this is quite slow. </p>
</div>
</div>
<a class="anchor" id="ae07cb113267bf18b91018824d64e00aa"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static double geos::operation::overlayng::PrecisionUtil::robustScale </td>
<td>(</td>
<td class="paramtype">double&#160;</td>
<td class="paramname"><em>inherentScale</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double&#160;</td>
<td class="paramname"><em>safeScale</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a class="anchor" id="a35c0fe4144395341330ea6712aaec1f4"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static double geos::operation::overlayng::PrecisionUtil::robustScale </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classgeos_1_1geom_1_1Geometry.html">Geometry</a> *&#160;</td>
<td class="paramname"><em>a</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classgeos_1_1geom_1_1Geometry.html">Geometry</a> *&#160;</td>
<td class="paramname"><em>b</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Determines a scale factor which maximizes the digits of precision and is safe to use for overlay operations. The robust scale is the minimum of the inherent scale and the safe scale factors. </p>
</div>
</div>
<a class="anchor" id="acfd80e5eae5bbfe02057fbb7875a4aca"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static double geos::operation::overlayng::PrecisionUtil::robustScale </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classgeos_1_1geom_1_1Geometry.html">Geometry</a> *&#160;</td>
<td class="paramname"><em>a</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Determines a scale factor which maximizes the digits of precision and is safe to use for overlay operations. The robust scale is the minimum of the inherent scale and the safe scale factors. </p>
</div>
</div>
<a class="anchor" id="ae35d94a7ce2b01665d7e56394f34f94b"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static double geos::operation::overlayng::PrecisionUtil::safeScale </td>
<td>(</td>
<td class="paramtype">double&#160;</td>
<td class="paramname"><em>value</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Computes a safe scale factor for a numeric value. A safe scale factor ensures that rounded number has no more than MAX_PRECISION_DIGITS digits of precision. </p>
</div>
</div>
<a class="anchor" id="afc4abdd2ff4da680797680d981494e52"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static double geos::operation::overlayng::PrecisionUtil::safeScale </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classgeos_1_1geom_1_1Geometry.html">Geometry</a> *&#160;</td>
<td class="paramname"><em>geom</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Computes a safe scale factor for a geometry. A safe scale factor ensures that the rounded ordinates have no more than MAX_PRECISION_DIGITS digits of precision. </p>
</div>
</div>
<a class="anchor" id="abbcc4e21fbc610ecb608d4a226e851e4"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static double geos::operation::overlayng::PrecisionUtil::safeScale </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classgeos_1_1geom_1_1Geometry.html">Geometry</a> *&#160;</td>
<td class="paramname"><em>a</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classgeos_1_1geom_1_1Geometry.html">Geometry</a> *&#160;</td>
<td class="paramname"><em>b</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Computes a safe scale factor for two geometries. A safe scale factor ensures that the rounded ordinates have no more than MAX_PRECISION_DIGITS digits of precision. </p>
</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a class="anchor" id="acad0be73675b719995d348899e71cd10"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">constexpr int geos::operation::overlayng::PrecisionUtil::MAX_ROBUST_DP_DIGITS = 14</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Definition at line <a class="el" href="PrecisionUtil_8h_source.html#l00084">84</a> of file <a class="el" href="PrecisionUtil_8h_source.html">PrecisionUtil.h</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="PrecisionUtil_8h_source.html">PrecisionUtil.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>