<!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::Coordinate 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 Page</span></a></li> <li><a href="pages.html"><span>Related 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 List</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class 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_1Coordinate.html">geos::geom::Coordinate</a> </li> </ul> </div> </div> <div class="header"> <div class="summary"> <a href="#pub-types">Public Types</a> | <a href="#pub-methods">Public Member Functions</a> | <a href="#pub-static-methods">Static Public Member Functions</a> | <a href="#pub-attribs">Public Attributes</a> </div> <div class="headertitle"> <h1>geos::geom::Coordinate Class Reference</h1> </div> </div> <div class="contents"> <!-- doxytag: class="geos::geom::Coordinate" --> <p><a class="el" href="classgeos_1_1geom_1_1Coordinate.html" title="Coordinate is the lightweight class used to store coordinates.">Coordinate</a> is the lightweight class used to store coordinates. <a href="#_details">More...</a></p> <p><code>#include <<a class="el" href="geom_8h_source.html">geos.h</a>></code></p> <p><a href="classgeos_1_1geom_1_1Coordinate-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"><a class="anchor" id="ad2287150888bce0481a99cc1d3faabbb"></a><!-- doxytag: member="geos::geom::Coordinate::ConstSet" ref="ad2287150888bce0481a99cc1d3faabbb" args="" --> typedef std::set< const <br class="typebreak"/> <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a> <br class="typebreak"/> *, <a class="el" href="structgeos_1_1geom_1_1CoordinateLessThen.html">CoordinateLessThen</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1geom_1_1Coordinate.html#ad2287150888bce0481a99cc1d3faabbb">ConstSet</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">A set of const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html" title="Coordinate is the lightweight class used to store coordinates.">Coordinate</a> pointers. <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1735d833ea7d033b82c317f883948525"></a><!-- doxytag: member="geos::geom::Coordinate::ConstVect" ref="a1735d833ea7d033b82c317f883948525" args="" --> typedef std::vector< const <br class="typebreak"/> <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a> * > </td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1geom_1_1Coordinate.html#a1735d833ea7d033b82c317f883948525">ConstVect</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">A vector of const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html" title="Coordinate is the lightweight class used to store coordinates.">Coordinate</a> pointers. <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af8601defdd78458e835c6a8ee7483231"></a><!-- doxytag: member="geos::geom::Coordinate::ConstStack" ref="af8601defdd78458e835c6a8ee7483231" args="" --> typedef std::stack< const <br class="typebreak"/> <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a> * > </td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1geom_1_1Coordinate.html#af8601defdd78458e835c6a8ee7483231">ConstStack</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">A stack of const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html" title="Coordinate is the lightweight class used to store coordinates.">Coordinate</a> pointers. <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a59345d3a409b5d2ebe01fcfcdcca92cb"></a><!-- doxytag: member="geos::geom::Coordinate::Vect" ref="a59345d3a409b5d2ebe01fcfcdcca92cb" args="" --> typedef std::vector< <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1geom_1_1Coordinate.html#a59345d3a409b5d2ebe01fcfcdcca92cb">Vect</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">A vector of <a class="el" href="classgeos_1_1geom_1_1Coordinate.html" title="Coordinate is the lightweight class used to store coordinates.">Coordinate</a> objects (real object, not pointers). <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="a97bb820b994c6a77cbe50db79f80a2c2"></a><!-- doxytag: member="geos::geom::Coordinate::setNull" ref="a97bb820b994c6a77cbe50db79f80a2c2" args="()" --> void </td><td class="memItemRight" valign="bottom"><b>setNull</b> ()</td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2090c511f26246ceddf8ecc29889beec"></a><!-- doxytag: member="geos::geom::Coordinate::isNull" ref="a2090c511f26246ceddf8ecc29889beec" args="() const " --> bool </td><td class="memItemRight" valign="bottom"><b>isNull</b> () const </td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a612dede1256ac33d34e883830987707a"></a><!-- doxytag: member="geos::geom::Coordinate::Coordinate" ref="a612dede1256ac33d34e883830987707a" args="(double xNew=0.0, double yNew=0.0, double zNew=DoubleNotANumber)" --> </td><td class="memItemRight" valign="bottom"><b>Coordinate</b> (double xNew=0.0, double yNew=0.0, double zNew=DoubleNotANumber)</td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2c21bb7a17fd64f70d6ee55990cb87b9"></a><!-- doxytag: member="geos::geom::Coordinate::equals2D" ref="a2c21bb7a17fd64f70d6ee55990cb87b9" args="(const Coordinate &other) const " --> bool </td><td class="memItemRight" valign="bottom"><b>equals2D</b> (const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a> &other) const </td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afb42140c4c88c2d91d9ec231b6d08b21"></a><!-- doxytag: member="geos::geom::Coordinate::equals" ref="afb42140c4c88c2d91d9ec231b6d08b21" args="(const Coordinate &other) const " --> bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1geom_1_1Coordinate.html#afb42140c4c88c2d91d9ec231b6d08b21">equals</a> (const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a> &other) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">2D only <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a48dd998aac25658a9f29065642d9de7f"></a><!-- doxytag: member="geos::geom::Coordinate::compareTo" ref="a48dd998aac25658a9f29065642d9de7f" args="(const Coordinate &other) const " --> int </td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1geom_1_1Coordinate.html#a48dd998aac25658a9f29065642d9de7f">compareTo</a> (const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a> &other) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">TODO: deprecate this, move logic to <a class="el" href="structgeos_1_1geom_1_1CoordinateLessThen.html" title="Strict weak ordering Functor for Coordinate.">CoordinateLessThen</a> instead. <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a93a622593e64bf9491e3e1c88a737f7d"></a><!-- doxytag: member="geos::geom::Coordinate::equals3D" ref="a93a622593e64bf9491e3e1c88a737f7d" args="(const Coordinate &other) const " --> bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1geom_1_1Coordinate.html#a93a622593e64bf9491e3e1c88a737f7d">equals3D</a> (const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a> &other) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">3D comparison <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6330f12ee3977d5a7a0fd729ea29a41f"></a><!-- doxytag: member="geos::geom::Coordinate::toString" ref="a6330f12ee3977d5a7a0fd729ea29a41f" args="() const " --> std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1geom_1_1Coordinate.html#a6330f12ee3977d5a7a0fd729ea29a41f">toString</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns a string of the form <em>(x,y,z)</em> . <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1geom_1_1Coordinate.html#a9a30687133579e261178d099a238ef19">distance</a> (const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a> &p) const </td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1fac64c2f3b0a66f5162d4ae4cbca2d3"></a><!-- doxytag: member="geos::geom::Coordinate::hashCode" ref="a1fac64c2f3b0a66f5162d4ae4cbca2d3" args="() const " --> int </td><td class="memItemRight" valign="bottom"><b>hashCode</b> () const </td></tr> <tr><td colspan="2"><h2><a name="pub-static-methods"></a> Static Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a45201240fe444687d56c1e3cb751d8df"></a><!-- doxytag: member="geos::geom::Coordinate::getNull" ref="a45201240fe444687d56c1e3cb751d8df" args="()" --> static <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a> & </td><td class="memItemRight" valign="bottom"><b>getNull</b> ()</td></tr> <tr><td class="memItemLeft" align="right" valign="top">static int </td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1geom_1_1Coordinate.html#a64687866bf3834250beb3ade914be7ca">hashCode</a> (double d)</td></tr> <tr><td colspan="2"><h2><a name="pub-attribs"></a> Public Attributes</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad809a77e5715e490a7e5f95c8611737e"></a><!-- doxytag: member="geos::geom::Coordinate::x" ref="ad809a77e5715e490a7e5f95c8611737e" args="" --> double </td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1geom_1_1Coordinate.html#ad809a77e5715e490a7e5f95c8611737e">x</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">x-coordinate <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="acdeb58356624ebe25cbbf5b6021c3d9d"></a><!-- doxytag: member="geos::geom::Coordinate::y" ref="acdeb58356624ebe25cbbf5b6021c3d9d" args="" --> double </td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1geom_1_1Coordinate.html#acdeb58356624ebe25cbbf5b6021c3d9d">y</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">y-coordinate <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af0c1b234c851ae467c371dea8861612f"></a><!-- doxytag: member="geos::geom::Coordinate::z" ref="af0c1b234c851ae467c371dea8861612f" args="" --> double </td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1geom_1_1Coordinate.html#af0c1b234c851ae467c371dea8861612f">z</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">z-coordinate <br/></td></tr> </table> <hr/><a name="_details"></a><h2>Detailed Description</h2> <p><a class="el" href="classgeos_1_1geom_1_1Coordinate.html" title="Coordinate is the lightweight class used to store coordinates.">Coordinate</a> is the lightweight class used to store coordinates. </p> <p>It is distinct from <a class="el" href="classgeos_1_1geom_1_1Point.html" title="Basic implementation of Point.">Point</a>, which is a subclass of <a class="el" href="classgeos_1_1geom_1_1Geometry.html" title="Basic implementation of Geometry, constructed and destructed by GeometryFactory.">Geometry</a>. Unlike objects of type <a class="el" href="classgeos_1_1geom_1_1Point.html" title="Basic implementation of Point.">Point</a> (which contain additional information such as an envelope, a precision model, and spatial reference system information), a <a class="el" href="classgeos_1_1geom_1_1Coordinate.html" title="Coordinate is the lightweight class used to store coordinates.">Coordinate</a> only contains ordinate values and accessor methods.</p> <p><a class="el" href="classgeos_1_1geom_1_1Coordinate.html" title="Coordinate is the lightweight class used to store coordinates.">Coordinate</a> objects are two-dimensional points, with an additional z-ordinate. JTS does not support any operations on the z-ordinate except the basic accessor functions.</p> <p>Constructed coordinates will have a z-ordinate of DoubleNotANumber. The standard comparison functions will ignore the z-ordinate. </p> <hr/><h2>Member Function Documentation</h2> <a class="anchor" id="a9a30687133579e261178d099a238ef19"></a><!-- doxytag: member="geos::geom::Coordinate::distance" ref="a9a30687133579e261178d099a238ef19" args="(const Coordinate &p) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">double geos::geom::Coordinate::distance </td> <td>(</td> <td class="paramtype">const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a> & </td> <td class="paramname"> <em>p</em></td> <td> ) </td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <p>TODO: obsoleted this, can use PrecisionModel::makePrecise(Coordinate*) instead </p> </div> </div> <a class="anchor" id="a64687866bf3834250beb3ade914be7ca"></a><!-- doxytag: member="geos::geom::Coordinate::hashCode" ref="a64687866bf3834250beb3ade914be7ca" args="(double d)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static int geos::geom::Coordinate::hashCode </td> <td>(</td> <td class="paramtype">double </td> <td class="paramname"> <em>d</em></td> <td> ) </td> <td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Returns a hash code for a double value, using the algorithm from Joshua Bloch's book <em>Effective Java</em> </p> </div> </div> <hr/>The documentation for this class was generated from the following file:<ul> <li><a class="el" href="Coordinate_8h_source.html">Coordinate.h</a></li> </ul> </div> <hr class="footer"/><address class="footer"><small>Generated on Thu Jul 22 2010 for GEOS by <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address> </body> </html>