Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > 5035839f674c88dea1f7928a86fbdc64 > files > 771

geos-devel-3.2.1-3.fc14.x86_64.rpm

<!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"/>
<title>GEOS: geos::geom::PrecisionModel Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.1 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;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 class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
    </ul>
  </div>
  <div class="navpath">
    <ul>
      <li><a class="el" href="namespacegeos.html">geos</a>      </li>
      <li><a class="el" href="namespacegeos_1_1geom.html">geom</a>      </li>
      <li><a class="el" href="classgeos_1_1geom_1_1PrecisionModel.html">geos::geom::PrecisionModel</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-attribs">Static Public Attributes</a> &#124;
<a href="#friends">Friends</a>  </div>
  <div class="headertitle">
<h1>geos::geom::PrecisionModel Class Reference</h1>  </div>
</div>
<div class="contents">
<!-- doxytag: class="geos::geom::PrecisionModel" -->
<p>Specifies the precision model of the <a class="el" href="classgeos_1_1geom_1_1Coordinate.html" title="Coordinate is the lightweight class used to store coordinates.">Coordinate</a> in a <a class="el" href="classgeos_1_1geom_1_1Geometry.html" title="Basic implementation of Geometry, constructed and destructed by GeometryFactory.">Geometry</a>.  
<a href="#_details">More...</a></p>

<p><code>#include &lt;<a class="el" href="geom_8h_source.html">geos.h</a>&gt;</code></p>

<p><a href="classgeos_1_1geom_1_1PrecisionModel-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1geom_1_1PrecisionModel.html#aa32be4a02d1faf45306fee75d68a2e12">Type</a> { <a class="el" href="classgeos_1_1geom_1_1PrecisionModel.html#aa32be4a02d1faf45306fee75d68a2e12a702c5051872b1eae28e5f8d3c0f2e8af">FIXED</a>, 
<a class="el" href="classgeos_1_1geom_1_1PrecisionModel.html#aa32be4a02d1faf45306fee75d68a2e12a871d90e033044acdd1db738dc2934aaf">FLOATING</a>, 
<a class="el" href="classgeos_1_1geom_1_1PrecisionModel.html#aa32be4a02d1faf45306fee75d68a2e12aec6ecfa3e6b4087810606e2a41111035">FLOATING_SINGLE</a>
 }</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><p>The types of Precision Model which GEOS supports. </p>
 <a href="classgeos_1_1geom_1_1PrecisionModel.html#aa32be4a02d1faf45306fee75d68a2e12">More...</a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9f4af835c0ca26c06fe20d03dac79322"></a><!-- doxytag: member="geos::geom::PrecisionModel::PrecisionModel" ref="a9f4af835c0ca26c06fe20d03dac79322" args="(void)" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1geom_1_1PrecisionModel.html#a9f4af835c0ca26c06fe20d03dac79322">PrecisionModel</a> (void)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates a <a class="el" href="classgeos_1_1geom_1_1PrecisionModel.html" title="Specifies the precision model of the Coordinate in a Geometry.">PrecisionModel</a> with a default precision of FLOATING. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1geom_1_1PrecisionModel.html#ac6bb03bcd215e6d42406e3c8fbaaae1e">PrecisionModel</a> (<a class="el" href="classgeos_1_1geom_1_1PrecisionModel.html#aa32be4a02d1faf45306fee75d68a2e12">Type</a> nModelType)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates a <a class="el" href="classgeos_1_1geom_1_1PrecisionModel.html" title="Specifies the precision model of the Coordinate in a Geometry.">PrecisionModel</a> specifying an explicit precision model type.  <a href="#ac6bb03bcd215e6d42406e3c8fbaaae1e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1geom_1_1PrecisionModel.html#a5c68e7a03195a03d2a89fe24b9aa346a">PrecisionModel</a> (double newScale, double newOffsetX, double newOffsetY)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates a <code><a class="el" href="classgeos_1_1geom_1_1PrecisionModel.html" title="Specifies the precision model of the Coordinate in a Geometry.">PrecisionModel</a></code> with Fixed precision.  <a href="#a5c68e7a03195a03d2a89fe24b9aa346a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1geom_1_1PrecisionModel.html#ab7b6f3c8fc62bb29bb7eb665c969486a">PrecisionModel</a> (double newScale)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates a <a class="el" href="classgeos_1_1geom_1_1PrecisionModel.html" title="Specifies the precision model of the Coordinate in a Geometry.">PrecisionModel</a> with Fixed precision.  <a href="#ab7b6f3c8fc62bb29bb7eb665c969486a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1fc872e5c18986b3da10613d0eb50dfd"></a><!-- doxytag: member="geos::geom::PrecisionModel::PrecisionModel" ref="a1fc872e5c18986b3da10613d0eb50dfd" args="(const PrecisionModel &amp;pm)" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><b>PrecisionModel</b> (const <a class="el" href="classgeos_1_1geom_1_1PrecisionModel.html">PrecisionModel</a> &amp;pm)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5e57abc74a295b5a927bc0bc575a96c5"></a><!-- doxytag: member="geos::geom::PrecisionModel::~PrecisionModel" ref="a5e57abc74a295b5a927bc0bc575a96c5" args="(void)" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1geom_1_1PrecisionModel.html#a5e57abc74a295b5a927bc0bc575a96c5">~PrecisionModel</a> (void)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">destructor <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1geom_1_1PrecisionModel.html#ac93fddf641db2575293d8987b75053af">makePrecise</a> (double val) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Rounds a numeric value to the <a class="el" href="classgeos_1_1geom_1_1PrecisionModel.html" title="Specifies the precision model of the Coordinate in a Geometry.">PrecisionModel</a> grid.  <a href="#ac93fddf641db2575293d8987b75053af"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ade65ef4582991126ed6ebae2565b47c2"></a><!-- doxytag: member="geos::geom::PrecisionModel::makePrecise" ref="ade65ef4582991126ed6ebae2565b47c2" args="(Coordinate &amp;coord) const " -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1geom_1_1PrecisionModel.html#ade65ef4582991126ed6ebae2565b47c2">makePrecise</a> (<a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a> &amp;coord) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Rounds the given <a class="el" href="classgeos_1_1geom_1_1Coordinate.html" title="Coordinate is the lightweight class used to store coordinates.">Coordinate</a> to the <a class="el" href="classgeos_1_1geom_1_1PrecisionModel.html" title="Specifies the precision model of the Coordinate in a Geometry.">PrecisionModel</a> grid. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aeb238d40042893586a64e92fc987653e"></a><!-- doxytag: member="geos::geom::PrecisionModel::makePrecise" ref="aeb238d40042893586a64e92fc987653e" args="(Coordinate *coord) const " -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><b>makePrecise</b> (<a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a> *coord) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1geom_1_1PrecisionModel.html#ac9fd3cbb862a16a46d3ebcf601fc81fb">isFloating</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Tests whether the precision model supports floating point.  <a href="#ac9fd3cbb862a16a46d3ebcf601fc81fb"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1geom_1_1PrecisionModel.html#ab414dc6879f0e81e9672dc04ad00e4e1">getMaximumSignificantDigits</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the maximum number of significant digits provided by this precision model.  <a href="#ab414dc6879f0e81e9672dc04ad00e4e1"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classgeos_1_1geom_1_1PrecisionModel.html#aa32be4a02d1faf45306fee75d68a2e12">Type</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1geom_1_1PrecisionModel.html#a3ec7a6585c53fba22cf6b30fe1077abb">getType</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Gets the type of this <a class="el" href="classgeos_1_1geom_1_1PrecisionModel.html" title="Specifies the precision model of the Coordinate in a Geometry.">PrecisionModel</a>.  <a href="#a3ec7a6585c53fba22cf6b30fe1077abb"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a457c0f35f3ae4193c5713ac99a400bc8"></a><!-- doxytag: member="geos::geom::PrecisionModel::getScale" ref="a457c0f35f3ae4193c5713ac99a400bc8" args="() const " -->
double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1geom_1_1PrecisionModel.html#a457c0f35f3ae4193c5713ac99a400bc8">getScale</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the multiplying factor used to obtain a precise coordinate. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1geom_1_1PrecisionModel.html#abd9ded598191954a40e40aaabed6242d">getOffsetX</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the x-offset used to obtain a precise coordinate.  <a href="#abd9ded598191954a40e40aaabed6242d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1geom_1_1PrecisionModel.html#ae0772ba6e7f4df08bb4e38a9cc80cf0b">getOffsetY</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the y-offset used to obtain a precise coordinate.  <a href="#ae0772ba6e7f4df08bb4e38a9cc80cf0b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">std::string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1geom_1_1PrecisionModel.html#a6fba7ce37a54d9bce731f6a1f069b31d">toString</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets <code>internal</code> to the precise representation of <code>external</code>.  <a href="#a6fba7ce37a54d9bce731f6a1f069b31d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1geom_1_1PrecisionModel.html#acf4a8556c689a152b4f6f51284ad1c88">compareTo</a> (const <a class="el" href="classgeos_1_1geom_1_1PrecisionModel.html">PrecisionModel</a> *other) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Compares this <a class="el" href="classgeos_1_1geom_1_1PrecisionModel.html" title="Specifies the precision model of the Coordinate in a Geometry.">PrecisionModel</a> object with the specified object for order.  <a href="#acf4a8556c689a152b4f6f51284ad1c88"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pub-static-attribs"></a>
Static Public Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static const double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1geom_1_1PrecisionModel.html#a92ff29ac9cd8f93f1ab9283788313a5e">maximumPreciseValue</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The maximum precise value representable in a double.  <a href="#a92ff29ac9cd8f93f1ab9283788313a5e"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="friends"></a>
Friends</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab829c6cc2e53f09a6ab263b76734c222"></a><!-- doxytag: member="geos::geom::PrecisionModel::io::Unload" ref="ab829c6cc2e53f09a6ab263b76734c222" args="" -->
class&nbsp;</td><td class="memItemRight" valign="bottom"><b>io::Unload</b></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Specifies the precision model of the <a class="el" href="classgeos_1_1geom_1_1Coordinate.html" title="Coordinate is the lightweight class used to store coordinates.">Coordinate</a> in a <a class="el" href="classgeos_1_1geom_1_1Geometry.html" title="Basic implementation of Geometry, constructed and destructed by GeometryFactory.">Geometry</a>. </p>
<p>In other words, specifies the grid of allowable points for all <code><a class="el" href="classgeos_1_1geom_1_1Geometry.html" title="Basic implementation of Geometry, constructed and destructed by GeometryFactory.">Geometry</a></code>s.</p>
<p>The makePrecise method allows rounding a coordinate to a "precise" value; that is, one whose precision is known exactly.</p>
<p>Coordinates are assumed to be precise in geometries. That is, the coordinates are assumed to be rounded to the precision model given for the geometry. JTS input routines automatically round coordinates to the precision model before creating Geometries. All internal operations assume that coordinates are rounded to the precision model. Constructive methods (such as boolean operations) always round computed coordinates to the appropriate precision model.</p>
<p>Currently three types of precision model are supported:</p>
<ul>
<li>FLOATING - represents full double precision floating point. This is the default precision model used in JTS</li>
<li>FLOATING_SINGLE - represents single precision floating point.</li>
<li>FIXED - represents a model with a fixed number of decimal places. A Fixed Precision Model is specified by a scale factor. The scale factor specifies the grid which numbers are rounded to. Input coordinates are mapped to fixed coordinates according to the following equations:<ul>
<li>jtsPt.x = round( (inputPt.x * scale ) / scale</li>
<li>jtsPt.y = round( (inputPt.y * scale ) / scale</li>
</ul>
</li>
</ul>
<p>Coordinates are represented internally as Java double-precision values. Since Java uses the IEEE-394 floating point standard, this provides 53 bits of precision. (Thus the maximum precisely representable integer is 9,007,199,254,740,992).</p>
<p>JTS methods currently do not handle inputs with different precision models. </p>
<hr/><h2>Member Enumeration Documentation</h2>
<a class="anchor" id="aa32be4a02d1faf45306fee75d68a2e12"></a><!-- doxytag: member="geos::geom::PrecisionModel::Type" ref="aa32be4a02d1faf45306fee75d68a2e12" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="classgeos_1_1geom_1_1PrecisionModel.html#aa32be4a02d1faf45306fee75d68a2e12">geos::geom::PrecisionModel::Type</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>The types of Precision Model which GEOS supports. </p>
<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" id="aa32be4a02d1faf45306fee75d68a2e12a702c5051872b1eae28e5f8d3c0f2e8af"></a><!-- doxytag: member="FIXED" ref="aa32be4a02d1faf45306fee75d68a2e12a702c5051872b1eae28e5f8d3c0f2e8af" args="" -->FIXED</em>&nbsp;</td><td>
<p>Fixed Precision indicates that coordinates have a fixed number of decimal places. The number of decimal places is determined by the log10 of the scale factor. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="aa32be4a02d1faf45306fee75d68a2e12a871d90e033044acdd1db738dc2934aaf"></a><!-- doxytag: member="FLOATING" ref="aa32be4a02d1faf45306fee75d68a2e12a871d90e033044acdd1db738dc2934aaf" args="" -->FLOATING</em>&nbsp;</td><td>
<p>Floating precision corresponds to the standard Java double-precision floating-point representation, which is based on the IEEE-754 standard </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="aa32be4a02d1faf45306fee75d68a2e12aec6ecfa3e6b4087810606e2a41111035"></a><!-- doxytag: member="FLOATING_SINGLE" ref="aa32be4a02d1faf45306fee75d68a2e12aec6ecfa3e6b4087810606e2a41111035" args="" -->FLOATING_SINGLE</em>&nbsp;</td><td>
<p>Floating single precision corresponds to the standard Java single-precision floating-point representation, which is based on the IEEE-754 standard </p>
</td></tr>
</table>
</dd>
</dl>

</div>
</div>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="ac6bb03bcd215e6d42406e3c8fbaaae1e"></a><!-- doxytag: member="geos::geom::PrecisionModel::PrecisionModel" ref="ac6bb03bcd215e6d42406e3c8fbaaae1e" args="(Type nModelType)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">geos::geom::PrecisionModel::PrecisionModel </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classgeos_1_1geom_1_1PrecisionModel.html#aa32be4a02d1faf45306fee75d68a2e12">Type</a>&nbsp;</td>
          <td class="paramname"> <em>nModelType</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Creates a <a class="el" href="classgeos_1_1geom_1_1PrecisionModel.html" title="Specifies the precision model of the Coordinate in a Geometry.">PrecisionModel</a> specifying an explicit precision model type. </p>
<p>If the model type is FIXED the scale factor will default to 1.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>nModelType</em>&nbsp;</td><td>the type of the precision model </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a5c68e7a03195a03d2a89fe24b9aa346a"></a><!-- doxytag: member="geos::geom::PrecisionModel::PrecisionModel" ref="a5c68e7a03195a03d2a89fe24b9aa346a" args="(double newScale, double newOffsetX, double newOffsetY)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">geos::geom::PrecisionModel::PrecisionModel </td>
          <td>(</td>
          <td class="paramtype">double&nbsp;</td>
          <td class="paramname"> <em>newScale</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&nbsp;</td>
          <td class="paramname"> <em>newOffsetX</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&nbsp;</td>
          <td class="paramname"> <em>newOffsetY</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Creates a <code><a class="el" href="classgeos_1_1geom_1_1PrecisionModel.html" title="Specifies the precision model of the Coordinate in a Geometry.">PrecisionModel</a></code> with Fixed precision. </p>
<p>Fixed-precision coordinates are represented as precise internal coordinates, which are rounded to the grid defined by the scale factor.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>scale</em>&nbsp;</td><td>amount by which to multiply a coordinate after subtracting the offset, to obtain a precise coordinate </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>offsetX</em>&nbsp;</td><td>not used. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>offsetY</em>&nbsp;</td><td>not used.</td></tr>
  </table>
  </dd>
</dl>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000004">Deprecated:</a></b></dt><dd>offsets are no longer supported, since internal representation is rounded floating point </dd></dl>

</div>
</div>
<a class="anchor" id="ab7b6f3c8fc62bb29bb7eb665c969486a"></a><!-- doxytag: member="geos::geom::PrecisionModel::PrecisionModel" ref="ab7b6f3c8fc62bb29bb7eb665c969486a" args="(double newScale)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">geos::geom::PrecisionModel::PrecisionModel </td>
          <td>(</td>
          <td class="paramtype">double&nbsp;</td>
          <td class="paramname"> <em>newScale</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Creates a <a class="el" href="classgeos_1_1geom_1_1PrecisionModel.html" title="Specifies the precision model of the Coordinate in a Geometry.">PrecisionModel</a> with Fixed precision. </p>
<p>Fixed-precision coordinates are represented as precise internal coordinates which are rounded to the grid defined by the scale factor.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>newScale</em>&nbsp;</td><td>amount by which to multiply a coordinate after subtracting the offset, to obtain a precise coordinate </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="acf4a8556c689a152b4f6f51284ad1c88"></a><!-- doxytag: member="geos::geom::PrecisionModel::compareTo" ref="acf4a8556c689a152b4f6f51284ad1c88" args="(const PrecisionModel *other) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int geos::geom::PrecisionModel::compareTo </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classgeos_1_1geom_1_1PrecisionModel.html">PrecisionModel</a> *&nbsp;</td>
          <td class="paramname"> <em>other</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Compares this <a class="el" href="classgeos_1_1geom_1_1PrecisionModel.html" title="Specifies the precision model of the Coordinate in a Geometry.">PrecisionModel</a> object with the specified object for order. </p>
<p>A <a class="el" href="classgeos_1_1geom_1_1PrecisionModel.html" title="Specifies the precision model of the Coordinate in a Geometry.">PrecisionModel</a> is greater than another if it provides greater precision. The comparison is based on the value returned by the getMaximumSignificantDigits method. This comparison is not strictly accurate when comparing floating precision models to fixed models; however, it is correct when both models are either floating or fixed.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>other</em>&nbsp;</td><td>the <a class="el" href="classgeos_1_1geom_1_1PrecisionModel.html" title="Specifies the precision model of the Coordinate in a Geometry.">PrecisionModel</a> with which this <a class="el" href="classgeos_1_1geom_1_1PrecisionModel.html" title="Specifies the precision model of the Coordinate in a Geometry.">PrecisionModel</a> is being compared </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>a negative integer, zero, or a positive integer as this <a class="el" href="classgeos_1_1geom_1_1PrecisionModel.html" title="Specifies the precision model of the Coordinate in a Geometry.">PrecisionModel</a> is less than, equal to, or greater than the specified <a class="el" href="classgeos_1_1geom_1_1PrecisionModel.html" title="Specifies the precision model of the Coordinate in a Geometry.">PrecisionModel</a>. </dd></dl>

</div>
</div>
<a class="anchor" id="ab414dc6879f0e81e9672dc04ad00e4e1"></a><!-- doxytag: member="geos::geom::PrecisionModel::getMaximumSignificantDigits" ref="ab414dc6879f0e81e9672dc04ad00e4e1" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int geos::geom::PrecisionModel::getMaximumSignificantDigits </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the maximum number of significant digits provided by this precision model. </p>
<p>Intended for use by routines which need to print out precise values.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>the maximum number of decimal places provided by this precision model </dd></dl>

</div>
</div>
<a class="anchor" id="abd9ded598191954a40e40aaabed6242d"></a><!-- doxytag: member="geos::geom::PrecisionModel::getOffsetX" ref="abd9ded598191954a40e40aaabed6242d" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double geos::geom::PrecisionModel::getOffsetX </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the x-offset used to obtain a precise coordinate. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>the amount by which to subtract the x-coordinate before multiplying by the scale </dd></dl>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000005">Deprecated:</a></b></dt><dd>Offsets are no longer used </dd></dl>

</div>
</div>
<a class="anchor" id="ae0772ba6e7f4df08bb4e38a9cc80cf0b"></a><!-- doxytag: member="geos::geom::PrecisionModel::getOffsetY" ref="ae0772ba6e7f4df08bb4e38a9cc80cf0b" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double geos::geom::PrecisionModel::getOffsetY </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the y-offset used to obtain a precise coordinate. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>the amount by which to subtract the y-coordinate before multiplying by the scale </dd></dl>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000006">Deprecated:</a></b></dt><dd>Offsets are no longer used </dd></dl>

</div>
</div>
<a class="anchor" id="a3ec7a6585c53fba22cf6b30fe1077abb"></a><!-- doxytag: member="geos::geom::PrecisionModel::getType" ref="a3ec7a6585c53fba22cf6b30fe1077abb" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classgeos_1_1geom_1_1PrecisionModel.html#aa32be4a02d1faf45306fee75d68a2e12">Type</a> geos::geom::PrecisionModel::getType </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Gets the type of this <a class="el" href="classgeos_1_1geom_1_1PrecisionModel.html" title="Specifies the precision model of the Coordinate in a Geometry.">PrecisionModel</a>. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>the type of this <a class="el" href="classgeos_1_1geom_1_1PrecisionModel.html" title="Specifies the precision model of the Coordinate in a Geometry.">PrecisionModel</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ac9fd3cbb862a16a46d3ebcf601fc81fb"></a><!-- doxytag: member="geos::geom::PrecisionModel::isFloating" ref="ac9fd3cbb862a16a46d3ebcf601fc81fb" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool geos::geom::PrecisionModel::isFloating </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Tests whether the precision model supports floating point. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd><code>true</code> if the precision model supports floating point </dd></dl>

</div>
</div>
<a class="anchor" id="ac93fddf641db2575293d8987b75053af"></a><!-- doxytag: member="geos::geom::PrecisionModel::makePrecise" ref="ac93fddf641db2575293d8987b75053af" args="(double val) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double geos::geom::PrecisionModel::makePrecise </td>
          <td>(</td>
          <td class="paramtype">double&nbsp;</td>
          <td class="paramname"> <em>val</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Rounds a numeric value to the <a class="el" href="classgeos_1_1geom_1_1PrecisionModel.html" title="Specifies the precision model of the Coordinate in a Geometry.">PrecisionModel</a> grid. </p>
<p>Asymmetric Arithmetic Rounding is used, to provide uniform rounding behaviour no matter where the number is on the number line.</p>
<p><b>Note:</b> Java's <code>Math::rint</code> uses the "Banker's Rounding" algorithm, which is not suitable for precision operations elsewhere in JTS. </p>

</div>
</div>
<a class="anchor" id="a6fba7ce37a54d9bce731f6a1f069b31d"></a><!-- doxytag: member="geos::geom::PrecisionModel::toString" ref="a6fba7ce37a54d9bce731f6a1f069b31d" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::string geos::geom::PrecisionModel::toString </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets <code>internal</code> to the precise representation of <code>external</code>. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>external</em>&nbsp;</td><td>the original coordinate </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>internal</em>&nbsp;</td><td>the coordinate whose values will be changed to the precise representation of <code>external</code> </td></tr>
  </table>
  </dd>
</dl>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000007">Deprecated:</a></b></dt><dd>use makePrecise instead </dd></dl>

</div>
</div>
<hr/><h2>Member Data Documentation</h2>
<a class="anchor" id="a92ff29ac9cd8f93f1ab9283788313a5e"></a><!-- doxytag: member="geos::geom::PrecisionModel::maximumPreciseValue" ref="a92ff29ac9cd8f93f1ab9283788313a5e" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const double <a class="el" href="classgeos_1_1geom_1_1PrecisionModel.html#a92ff29ac9cd8f93f1ab9283788313a5e">geos::geom::PrecisionModel::maximumPreciseValue</a><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>The maximum precise value representable in a double. </p>
<p>Since IEE754 double-precision numbers allow 53 bits of mantissa, the value is equal to 2^53 - 1. This provides <em>almost</em> 16 decimal digits of precision. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="PrecisionModel_8h_source.html">PrecisionModel.h</a></li>
</ul>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Thu Jul 22 2010 for GEOS by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address>
</body>
</html>