EVOLUTION-MANAGER
Edit File: classSDTSRawPolygon.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.5"/> <title>SDTS_AL: SDTSRawPolygon 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 style="padding-left: 0.5em;"> <div id="projectname">SDTS_AL </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.5 --> <div id="navrow1" 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 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 List</span></a></li> <li><a href="classes.html"><span>Class Index</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><!-- top --> <div class="header"> <div class="summary"> <a href="#pub-methods">Public Member Functions</a> | <a href="#pub-attribs">Public Attributes</a> | <a href="classSDTSRawPolygon-members.html">List of all members</a> </div> <div class="headertitle"> <div class="title">SDTSRawPolygon Class Reference</div> </div> </div><!--header--> <div class="contents"> <p><code>#include <<a class="el" href="sdts__al_8h_source.html">sdts_al.h</a>></code></p> <div class="dynheader"> Inheritance diagram for SDTSRawPolygon:</div> <div class="dyncontent"> <div class="center"> <img src="classSDTSRawPolygon.png" usemap="#SDTSRawPolygon_map" alt=""/> <map id="SDTSRawPolygon_map" name="SDTSRawPolygon_map"> <area href="classSDTSFeature.html" alt="SDTSFeature" shape="rect" coords="0,0,114,24"/> </map> </div></div> <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:a5a277ad841da78f0aff560c4418a8ff6"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classSDTSRawPolygon.html#a5a277ad841da78f0aff560c4418a8ff6">AssembleRings</a> ()</td></tr> <tr class="separator:a5a277ad841da78f0aff560c4418a8ff6"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a2e09a71a825b28c4245abf6b7e958ed1"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classSDTSRawPolygon.html#a2e09a71a825b28c4245abf6b7e958ed1">Dump</a> (FILE *)</td></tr> <tr class="separator:a2e09a71a825b28c4245abf6b7e958ed1"><td class="memSeparator" colspan="2"> </td></tr> </table><table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a> Public Attributes</h2></td></tr> <tr class="memitem:a3fa3fd600751a7a9d62ffc91453bd9d1"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classSDTSRawPolygon.html#a3fa3fd600751a7a9d62ffc91453bd9d1">nRings</a></td></tr> <tr class="separator:a3fa3fd600751a7a9d62ffc91453bd9d1"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a01fe8594f7b24ed15a0c2c0835188d27"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classSDTSRawPolygon.html#a01fe8594f7b24ed15a0c2c0835188d27">nVertices</a></td></tr> <tr class="separator:a01fe8594f7b24ed15a0c2c0835188d27"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a35527511ed9c8ab3cf9b6e71e9833be1"><td class="memItemLeft" align="right" valign="top">int * </td><td class="memItemRight" valign="bottom"><a class="el" href="classSDTSRawPolygon.html#a35527511ed9c8ab3cf9b6e71e9833be1">panRingStart</a></td></tr> <tr class="separator:a35527511ed9c8ab3cf9b6e71e9833be1"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:aaf5bba1eca16e9a27fcbff59f0bc4e4e"><td class="memItemLeft" align="right" valign="top">double * </td><td class="memItemRight" valign="bottom"><a class="el" href="classSDTSRawPolygon.html#aaf5bba1eca16e9a27fcbff59f0bc4e4e">padfX</a></td></tr> <tr class="separator:aaf5bba1eca16e9a27fcbff59f0bc4e4e"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ae48a87c0088e681cc3926dcbd3a37dc4"><td class="memItemLeft" align="right" valign="top">double * </td><td class="memItemRight" valign="bottom"><a class="el" href="classSDTSRawPolygon.html#ae48a87c0088e681cc3926dcbd3a37dc4">padfY</a></td></tr> <tr class="separator:ae48a87c0088e681cc3926dcbd3a37dc4"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ac181fc598f9243543a41165ec4908e91"><td class="memItemLeft" align="right" valign="top">double * </td><td class="memItemRight" valign="bottom"><a class="el" href="classSDTSRawPolygon.html#ac181fc598f9243543a41165ec4908e91">padfZ</a></td></tr> <tr class="separator:ac181fc598f9243543a41165ec4908e91"><td class="memSeparator" colspan="2"> </td></tr> <tr class="inherit_header pub_attribs_classSDTSFeature"><td colspan="2" onclick="javascript:toggleInherit('pub_attribs_classSDTSFeature')"><img src="closed.png" alt="-"/> Public Attributes inherited from <a class="el" href="classSDTSFeature.html">SDTSFeature</a></td></tr> <tr class="memitem:ab66b82d3476e99c450fa6f485d4ae44f inherit pub_attribs_classSDTSFeature"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classSDTSModId.html">SDTSModId</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classSDTSFeature.html#ab66b82d3476e99c450fa6f485d4ae44f">oModId</a></td></tr> <tr class="separator:ab66b82d3476e99c450fa6f485d4ae44f inherit pub_attribs_classSDTSFeature"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:aa5895c63334ebd42bee89be580561548 inherit pub_attribs_classSDTSFeature"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classSDTSFeature.html#aa5895c63334ebd42bee89be580561548">nAttributes</a></td></tr> <tr class="separator:aa5895c63334ebd42bee89be580561548 inherit pub_attribs_classSDTSFeature"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a506e3a8be93981a5c1092197b9440bc0 inherit pub_attribs_classSDTSFeature"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classSDTSModId.html">SDTSModId</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classSDTSFeature.html#a506e3a8be93981a5c1092197b9440bc0">paoATID</a></td></tr> <tr class="separator:a506e3a8be93981a5c1092197b9440bc0 inherit pub_attribs_classSDTSFeature"><td class="memSeparator" colspan="2"> </td></tr> </table> <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> <div class="textblock"><p>Class for holding information about a polygon feature.</p> <p>When directly read from a polygon module, the polygon has no concept of it's geometry. Just it's ID, and references to attribute records. However, if the <a class="el" href="classSDTSLineReader.html#afbace8b81ce89c0161ddf022907dbf0d">SDTSLineReader::AttachToPolygons()</a> method is called on the module containing the lines forming the polygon boundaries, then the nEdges/papoEdges information on the <a class="el" href="classSDTSRawPolygon.html">SDTSRawPolygon</a> will be filled in.</p> <p>Once this is complete the <a class="el" href="classSDTSRawPolygon.html#a5a277ad841da78f0aff560c4418a8ff6">AssembleRings()</a> method can be used to fill in the nRings/nVertices/panRingStart/padfX/padfY/padfZ information defining the ring geometry.</p> <p>Note that the rings may not appear in any particular order, nor with any meaningful direction (clockwise or counterclockwise). </p> </div><h2 class="groupheader">Member Function Documentation</h2> <a class="anchor" id="a5a277ad841da78f0aff560c4418a8ff6"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int SDTSRawPolygon::AssembleRings </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>This method will assemble the edges associated with a polygon into rings, returning FALSE if problems are encountered during assembly.</p> <p>Form border lines (arcs) into outer and inner rings.</p> <p>See SDTSPolygonReader::AssemblePolygons() for a simple one step process to assembling geometry for all polygons in a transfer.</p> <p>This method will assemble the lines attached to a polygon into an outer ring, and zero or more inner rings. Before calling it is necessary that all the lines associated with this polygon have already been attached. Normally this is accomplished by calling <a class="el" href="classSDTSLineReader.html#afbace8b81ce89c0161ddf022907dbf0d">SDTSLineReader::AttachToPolygons()</a> on all line layers that might contain edges related to this layer.</p> <p>This method then forms the lines into rings. Rings are formed by: </p> <ol> <li> Take a previously unconsumed line, and start a ring with it. Mark it as consumed, and keep track of it's start and end node ids as being the start and end node ids of the ring. </li> <li> If the rings start id is the same as the end node id then this ring is completely formed, return to step 1. </li> <li> Search all unconsumed lines for a line with the same start or end node id as the rings current node id. If none are found then the assembly has failed. Return to step 1 but report failure on completion. </li> <li> Once found, add the line to the current ring, dropping the duplicated vertex and reverse order if necessary. Mark the line as consumed, and update the rings end node id accordingly. </li> <li> go to step 2. </li> </ol> <p>Once ring assembly from lines is complete, another pass is made to order the rings such that the exterior ring is first, the first ring has counter-clockwise vertex ordering and the inner rings have clockwise vertex ordering. This is accomplished based on the assumption that the outer ring has the largest area, and using the +/- sign of area to establish direction of rings.</p> <dl class="section return"><dt>Returns</dt><dd>TRUE if all rings assembled without problems or FALSE if a problem occured. If a problem occurs rings are still formed from all lines, but some of the rings will not be closed, and rings will have no particular order or direction. </dd></dl> </div> </div> <a class="anchor" id="a2e09a71a825b28c4245abf6b7e958ed1"></a> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">void SDTSRawPolygon::Dump </td> <td>(</td> <td class="paramtype">FILE * </td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">virtual</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Dump reable description of feature to indicated stream. </p> <p>Implements <a class="el" href="classSDTSFeature.html#ae03f2fb85da38de3713e80b262e58476">SDTSFeature</a>.</p> </div> </div> <h2 class="groupheader">Member Data Documentation</h2> <a class="anchor" id="a3fa3fd600751a7a9d62ffc91453bd9d1"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int SDTSRawPolygon::nRings</td> </tr> </table> </div><div class="memdoc"> <p>Number of rings in assembled polygon. </p> </div> </div> <a class="anchor" id="a01fe8594f7b24ed15a0c2c0835188d27"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int SDTSRawPolygon::nVertices</td> </tr> </table> </div><div class="memdoc"> <p>Total number of vertices in all rings of assembled polygon. </p> </div> </div> <a class="anchor" id="aaf5bba1eca16e9a27fcbff59f0bc4e4e"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">double* SDTSRawPolygon::padfX</td> </tr> </table> </div><div class="memdoc"> <p>List of nVertices X coordinates for the polygon (split over multiple rings via panRingStart. </p> </div> </div> <a class="anchor" id="ae48a87c0088e681cc3926dcbd3a37dc4"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">double* SDTSRawPolygon::padfY</td> </tr> </table> </div><div class="memdoc"> <p>List of nVertices Y coordinates for the polygon (split over multiple rings via panRingStart. </p> </div> </div> <a class="anchor" id="ac181fc598f9243543a41165ec4908e91"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">double* SDTSRawPolygon::padfZ</td> </tr> </table> </div><div class="memdoc"> <p>List of nVertices Z coordinates for the polygon (split over multiple rings via panRingStart. The values are almost always zero. </p> </div> </div> <a class="anchor" id="a35527511ed9c8ab3cf9b6e71e9833be1"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int* SDTSRawPolygon::panRingStart</td> </tr> </table> </div><div class="memdoc"> <p>Offsets into padfX/padfY/padfZ for the beginning of each ring in the polygon. This array is nRings long. </p> </div> </div> <hr/>The documentation for this class was generated from the following files:<ul> <li><a class="el" href="sdts__al_8h_source.html">sdts_al.h</a></li> <li>sdtspolygonreader.cpp</li> </ul> </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> Generated by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.5 </small></address> </body> </html>