Sophie

Sophie

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

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: BufferParameters.h Source File</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><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<h1>BufferParameters.h</h1>  </div>
</div>
<div class="contents">
<div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/**********************************************************************</span>
<a name="l00002"></a>00002 <span class="comment"> * $Id: BufferParameters.h 2809 2009-12-06 01:05:24Z mloskot $</span>
<a name="l00003"></a>00003 <span class="comment"> *</span>
<a name="l00004"></a>00004 <span class="comment"> * GEOS - Geometry Engine Open Source</span>
<a name="l00005"></a>00005 <span class="comment"> * http://geos.refractions.net</span>
<a name="l00006"></a>00006 <span class="comment"> *</span>
<a name="l00007"></a>00007 <span class="comment"> * Copyright (C) 2009  Sandro Santilli &lt;strk@keybit.net&gt;</span>
<a name="l00008"></a>00008 <span class="comment"> *</span>
<a name="l00009"></a>00009 <span class="comment"> * This is free software; you can redistribute and/or modify it under</span>
<a name="l00010"></a>00010 <span class="comment"> * the terms of the GNU Lesser General Public Licence as published</span>
<a name="l00011"></a>00011 <span class="comment"> * by the Free Software Foundation. </span>
<a name="l00012"></a>00012 <span class="comment"> * See the COPYING file for more information.</span>
<a name="l00013"></a>00013 <span class="comment"> *</span>
<a name="l00014"></a>00014 <span class="comment"> **********************************************************************</span>
<a name="l00015"></a>00015 <span class="comment"> *</span>
<a name="l00016"></a>00016 <span class="comment"> * Last port: operation/buffer/BufferParameters.java rev 1.5 (JTS-1.10)</span>
<a name="l00017"></a>00017 <span class="comment"> *</span>
<a name="l00018"></a>00018 <span class="comment"> **********************************************************************/</span>
<a name="l00019"></a>00019 
<a name="l00020"></a>00020 <span class="preprocessor">#ifndef GEOS_OP_BUFFER_BUFFERPARAMETERS_H</span>
<a name="l00021"></a>00021 <span class="preprocessor"></span><span class="preprocessor">#define GEOS_OP_BUFFER_BUFFERPARAMETERS_H</span>
<a name="l00022"></a>00022 <span class="preprocessor"></span>
<a name="l00023"></a>00023 <span class="comment">//#include &lt;vector&gt;</span>
<a name="l00024"></a>00024 
<a name="l00025"></a>00025 <span class="comment">//#include &lt;geos/algorithm/LineIntersector.h&gt; // for composition</span>
<a name="l00026"></a>00026 <span class="comment">//#include &lt;geos/geom/Coordinate.h&gt; // for composition</span>
<a name="l00027"></a>00027 <span class="comment">//#include &lt;geos/geom/LineSegment.h&gt; // for composition</span>
<a name="l00028"></a>00028 
<a name="l00029"></a>00029 <span class="comment">// Forward declarations</span>
<a name="l00030"></a>00030 <span class="keyword">namespace </span>geos {
<a name="l00031"></a>00031         <span class="keyword">namespace </span>geom {
<a name="l00032"></a>00032                 <span class="keyword">class </span>CoordinateSequence;
<a name="l00033"></a>00033                 <span class="keyword">class </span>PrecisionModel;
<a name="l00034"></a>00034         }
<a name="l00035"></a>00035         <span class="keyword">namespace </span>operation {
<a name="l00036"></a>00036                 <span class="keyword">namespace </span>buffer {
<a name="l00037"></a>00037                         <span class="keyword">class </span>OffsetCurveVertexList;
<a name="l00038"></a>00038                 }
<a name="l00039"></a>00039         }
<a name="l00040"></a>00040 }
<a name="l00041"></a>00041 
<a name="l00042"></a>00042 <span class="keyword">namespace </span>geos {
<a name="l00043"></a>00043 <span class="keyword">namespace </span>operation { <span class="comment">// geos.operation</span>
<a name="l00044"></a>00044 <span class="keyword">namespace </span>buffer { <span class="comment">// geos.operation.buffer</span>
<a name="l00045"></a>00045 
<a name="l00051"></a><a class="code" href="classgeos_1_1operation_1_1buffer_1_1BufferParameters.html">00051</a> <span class="keyword">class </span><a class="code" href="classgeos_1_1operation_1_1buffer_1_1BufferParameters.html" title="Contains the parameters which describe how a buffer should be constructed.">BufferParameters</a>
<a name="l00052"></a>00052 {
<a name="l00053"></a>00053 
<a name="l00054"></a>00054 <span class="keyword">public</span>:
<a name="l00055"></a>00055 
<a name="l00057"></a><a class="code" href="classgeos_1_1operation_1_1buffer_1_1BufferParameters.html#a4712bec3a5a2bb5c28ab43b3fe327950">00057</a>         <span class="keyword">enum</span> <a class="code" href="classgeos_1_1operation_1_1buffer_1_1BufferParameters.html#a4712bec3a5a2bb5c28ab43b3fe327950" title="End cap styles.">EndCapStyle</a> {
<a name="l00058"></a>00058 
<a name="l00060"></a><a class="code" href="classgeos_1_1operation_1_1buffer_1_1BufferParameters.html#a4712bec3a5a2bb5c28ab43b3fe327950a2115b456f33264168ae298f31cd10e84">00060</a>                 <a class="code" href="classgeos_1_1operation_1_1buffer_1_1BufferParameters.html#a4712bec3a5a2bb5c28ab43b3fe327950a2115b456f33264168ae298f31cd10e84" title="Specifies a round line buffer end cap style.">CAP_ROUND</a>=1,
<a name="l00061"></a>00061 
<a name="l00063"></a><a class="code" href="classgeos_1_1operation_1_1buffer_1_1BufferParameters.html#a4712bec3a5a2bb5c28ab43b3fe327950aedd88ac809cfcc7b2cc5e0300d6056a0">00063</a>                 <a class="code" href="classgeos_1_1operation_1_1buffer_1_1BufferParameters.html#a4712bec3a5a2bb5c28ab43b3fe327950aedd88ac809cfcc7b2cc5e0300d6056a0" title="Specifies a flat line buffer end cap style.">CAP_FLAT</a>=2,
<a name="l00064"></a>00064 
<a name="l00066"></a><a class="code" href="classgeos_1_1operation_1_1buffer_1_1BufferParameters.html#a4712bec3a5a2bb5c28ab43b3fe327950a1915b38145310e6c86cb0dc5231dd545">00066</a>                 <a class="code" href="classgeos_1_1operation_1_1buffer_1_1BufferParameters.html#a4712bec3a5a2bb5c28ab43b3fe327950a1915b38145310e6c86cb0dc5231dd545" title="Specifies a square line buffer end cap style.">CAP_SQUARE</a>=3
<a name="l00067"></a>00067         };
<a name="l00068"></a>00068 
<a name="l00070"></a><a class="code" href="classgeos_1_1operation_1_1buffer_1_1BufferParameters.html#ae40a3908d24a3ac91212b35f8464b9c7">00070</a>         <span class="keyword">enum</span> <a class="code" href="classgeos_1_1operation_1_1buffer_1_1BufferParameters.html#ae40a3908d24a3ac91212b35f8464b9c7" title="Join styles.">JoinStyle</a> {
<a name="l00071"></a>00071 
<a name="l00073"></a><a class="code" href="classgeos_1_1operation_1_1buffer_1_1BufferParameters.html#ae40a3908d24a3ac91212b35f8464b9c7a9ded695910037ff23c849ddc68e73023">00073</a>                 <a class="code" href="classgeos_1_1operation_1_1buffer_1_1BufferParameters.html#ae40a3908d24a3ac91212b35f8464b9c7a9ded695910037ff23c849ddc68e73023" title="Specifies a round join style.">JOIN_ROUND</a>=1,
<a name="l00074"></a>00074 
<a name="l00076"></a><a class="code" href="classgeos_1_1operation_1_1buffer_1_1BufferParameters.html#ae40a3908d24a3ac91212b35f8464b9c7a4f2854d8ec73a4843a22a51b8a2ecc09">00076</a>                 <a class="code" href="classgeos_1_1operation_1_1buffer_1_1BufferParameters.html#ae40a3908d24a3ac91212b35f8464b9c7a4f2854d8ec73a4843a22a51b8a2ecc09" title="Specifies a mitre join style.">JOIN_MITRE</a>=2,
<a name="l00077"></a>00077 
<a name="l00079"></a><a class="code" href="classgeos_1_1operation_1_1buffer_1_1BufferParameters.html#ae40a3908d24a3ac91212b35f8464b9c7ac2a1117219d301712e949c2257f7b3d1">00079</a>                 <a class="code" href="classgeos_1_1operation_1_1buffer_1_1BufferParameters.html#ae40a3908d24a3ac91212b35f8464b9c7ac2a1117219d301712e949c2257f7b3d1" title="Specifies a bevel join style.">JOIN_BEVEL</a>=3
<a name="l00080"></a>00080         };
<a name="l00081"></a>00081 
<a name="l00085"></a>00085         <span class="comment">//</span>
<a name="l00090"></a><a class="code" href="classgeos_1_1operation_1_1buffer_1_1BufferParameters.html#ab0a64ab1030d5dc576449dbf9ecde9e8">00090</a> <span class="comment"></span>        <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">int</span> <a class="code" href="classgeos_1_1operation_1_1buffer_1_1BufferParameters.html#ab0a64ab1030d5dc576449dbf9ecde9e8" title="The default number of facets into which to divide a fillet of 90 degrees.">DEFAULT_QUADRANT_SEGMENTS</a> = 8;
<a name="l00091"></a>00091 
<a name="l00093"></a>00093         <span class="comment">//</span>
<a name="l00096"></a><a class="code" href="classgeos_1_1operation_1_1buffer_1_1BufferParameters.html#a5c2777985fa44e98de4d37b49956bad7">00096</a> <span class="comment"></span>        <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">double</span> <a class="code" href="classgeos_1_1operation_1_1buffer_1_1BufferParameters.html#a5c2777985fa44e98de4d37b49956bad7" title="The default mitre limit.">DEFAULT_MITRE_LIMIT</a>; <span class="comment">// 5.0 (in .cpp file)</span>
<a name="l00097"></a>00097 
<a name="l00099"></a><a class="code" href="classgeos_1_1operation_1_1buffer_1_1BufferParameters.html#ac5ad430885bae6431cc81818c8e829ca">00099</a>         <a class="code" href="classgeos_1_1operation_1_1buffer_1_1BufferParameters.html#ac5ad430885bae6431cc81818c8e829ca" title="Creates a default set of parameters.">BufferParameters</a>()
<a name="l00100"></a>00100                 :
<a name="l00101"></a>00101                 quadrantSegments(<a class="code" href="classgeos_1_1operation_1_1buffer_1_1BufferParameters.html#ab0a64ab1030d5dc576449dbf9ecde9e8" title="The default number of facets into which to divide a fillet of 90 degrees.">DEFAULT_QUADRANT_SEGMENTS</a>),
<a name="l00102"></a>00102                 endCapStyle(<a class="code" href="classgeos_1_1operation_1_1buffer_1_1BufferParameters.html#a4712bec3a5a2bb5c28ab43b3fe327950a2115b456f33264168ae298f31cd10e84" title="Specifies a round line buffer end cap style.">CAP_ROUND</a>),
<a name="l00103"></a>00103                 joinStyle(<a class="code" href="classgeos_1_1operation_1_1buffer_1_1BufferParameters.html#ae40a3908d24a3ac91212b35f8464b9c7a9ded695910037ff23c849ddc68e73023" title="Specifies a round join style.">JOIN_ROUND</a>),
<a name="l00104"></a>00104                 mitreLimit(<a class="code" href="classgeos_1_1operation_1_1buffer_1_1BufferParameters.html#a5c2777985fa44e98de4d37b49956bad7" title="The default mitre limit.">DEFAULT_MITRE_LIMIT</a>)
<a name="l00105"></a>00105         {}
<a name="l00106"></a>00106 
<a name="l00108"></a>00108         <span class="comment">//</span>
<a name="l00111"></a>00111 <span class="comment"></span>        <a class="code" href="classgeos_1_1operation_1_1buffer_1_1BufferParameters.html#ac5ad430885bae6431cc81818c8e829ca" title="Creates a default set of parameters.">BufferParameters</a>(<span class="keywordtype">int</span> quadrantSegments);
<a name="l00112"></a>00112 
<a name="l00116"></a>00116         <span class="comment">//</span>
<a name="l00120"></a>00120 <span class="comment"></span>        <a class="code" href="classgeos_1_1operation_1_1buffer_1_1BufferParameters.html#ac5ad430885bae6431cc81818c8e829ca" title="Creates a default set of parameters.">BufferParameters</a>(<span class="keywordtype">int</span> quadrantSegments, <a class="code" href="classgeos_1_1operation_1_1buffer_1_1BufferParameters.html#a4712bec3a5a2bb5c28ab43b3fe327950" title="End cap styles.">EndCapStyle</a> endCapStyle);
<a name="l00121"></a>00121 
<a name="l00125"></a>00125         <span class="comment">//</span>
<a name="l00131"></a>00131 <span class="comment"></span>        <a class="code" href="classgeos_1_1operation_1_1buffer_1_1BufferParameters.html#ac5ad430885bae6431cc81818c8e829ca" title="Creates a default set of parameters.">BufferParameters</a>(<span class="keywordtype">int</span> quadrantSegments, <a class="code" href="classgeos_1_1operation_1_1buffer_1_1BufferParameters.html#a4712bec3a5a2bb5c28ab43b3fe327950" title="End cap styles.">EndCapStyle</a> endCapStyle,
<a name="l00132"></a>00132                          <a class="code" href="classgeos_1_1operation_1_1buffer_1_1BufferParameters.html#ae40a3908d24a3ac91212b35f8464b9c7" title="Join styles.">JoinStyle</a> joinStyle, <span class="keywordtype">double</span> mitreLimit);
<a name="l00133"></a>00133 
<a name="l00135"></a>00135         <span class="comment">//</span>
<a name="l00138"></a><a class="code" href="classgeos_1_1operation_1_1buffer_1_1BufferParameters.html#aab767f98e62c4d1a5c85137d378e2837">00138</a> <span class="comment"></span>        <span class="keywordtype">int</span> <a class="code" href="classgeos_1_1operation_1_1buffer_1_1BufferParameters.html#aab767f98e62c4d1a5c85137d378e2837" title="Gets the number of quadrant segments which will be used.">getQuadrantSegments</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> quadrantSegments; }
<a name="l00139"></a>00139 
<a name="l00143"></a>00143         <span class="comment">// </span>
<a name="l00169"></a>00169 <span class="comment"></span>        <span class="keywordtype">void</span> <a class="code" href="classgeos_1_1operation_1_1buffer_1_1BufferParameters.html#adc5559aa27d60c7b40aba6d5c13c0c45" title="Sets the number of line segments used to approximate an angle fillet.">setQuadrantSegments</a>(<span class="keywordtype">int</span> quadSegs);
<a name="l00170"></a>00170 
<a name="l00174"></a>00174         <span class="comment">//</span>
<a name="l00179"></a>00179 <span class="comment"></span>        <span class="keyword">static</span> <span class="keywordtype">double</span> <a class="code" href="classgeos_1_1operation_1_1buffer_1_1BufferParameters.html#aa1c559bb2c9f731334878de316c1c6f1" title="Computes the maximum distance error due to a given level of approximation to a true arc...">bufferDistanceError</a>(<span class="keywordtype">int</span> quadSegs);
<a name="l00180"></a>00180 
<a name="l00182"></a>00182         <span class="comment">//</span>
<a name="l00185"></a><a class="code" href="classgeos_1_1operation_1_1buffer_1_1BufferParameters.html#ad5876a1313f20facf9bc652d9a32b2e3">00185</a> <span class="comment"></span>        <a class="code" href="classgeos_1_1operation_1_1buffer_1_1BufferParameters.html#a4712bec3a5a2bb5c28ab43b3fe327950" title="End cap styles.">EndCapStyle</a> <a class="code" href="classgeos_1_1operation_1_1buffer_1_1BufferParameters.html#ad5876a1313f20facf9bc652d9a32b2e3" title="Gets the end cap style.">getEndCapStyle</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> endCapStyle; }
<a name="l00186"></a>00186 
<a name="l00188"></a>00188         <span class="comment">//</span>
<a name="l00196"></a><a class="code" href="classgeos_1_1operation_1_1buffer_1_1BufferParameters.html#a1b884eaa4f6bb49cb7547f6cbf2035f7">00196</a> <span class="comment"></span>        <span class="keywordtype">void</span> <a class="code" href="classgeos_1_1operation_1_1buffer_1_1BufferParameters.html#a1b884eaa4f6bb49cb7547f6cbf2035f7" title="Specifies the end cap style of the generated buffer.">setEndCapStyle</a>(<a class="code" href="classgeos_1_1operation_1_1buffer_1_1BufferParameters.html#a4712bec3a5a2bb5c28ab43b3fe327950" title="End cap styles.">EndCapStyle</a> style)
<a name="l00197"></a>00197         {
<a name="l00198"></a>00198                 endCapStyle = style;
<a name="l00199"></a>00199         }
<a name="l00200"></a>00200 
<a name="l00202"></a>00202         <span class="comment">//</span>
<a name="l00205"></a><a class="code" href="classgeos_1_1operation_1_1buffer_1_1BufferParameters.html#a57d08288074f88337e300537912c91b4">00205</a> <span class="comment"></span>        <a class="code" href="classgeos_1_1operation_1_1buffer_1_1BufferParameters.html#ae40a3908d24a3ac91212b35f8464b9c7" title="Join styles.">JoinStyle</a> <a class="code" href="classgeos_1_1operation_1_1buffer_1_1BufferParameters.html#a57d08288074f88337e300537912c91b4" title="Gets the join style.">getJoinStyle</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> joinStyle; }
<a name="l00206"></a>00206 
<a name="l00210"></a>00210         <span class="comment">//</span>
<a name="l00213"></a>00213 <span class="comment"></span>        <span class="comment">//</span>
<a name="l00216"></a><a class="code" href="classgeos_1_1operation_1_1buffer_1_1BufferParameters.html#a9b8fb6b023de5b70e658c81dc7a78f8e">00216</a> <span class="comment"></span>        <span class="keywordtype">void</span> <a class="code" href="classgeos_1_1operation_1_1buffer_1_1BufferParameters.html#a9b8fb6b023de5b70e658c81dc7a78f8e" title="Sets the join style for outside (reflex) corners between line segments.">setJoinStyle</a>(<a class="code" href="classgeos_1_1operation_1_1buffer_1_1BufferParameters.html#ae40a3908d24a3ac91212b35f8464b9c7" title="Join styles.">JoinStyle</a> style)
<a name="l00217"></a>00217         {
<a name="l00218"></a>00218                 joinStyle = style;
<a name="l00219"></a>00219         }
<a name="l00220"></a>00220 
<a name="l00222"></a>00222         <span class="comment">//</span>
<a name="l00225"></a><a class="code" href="classgeos_1_1operation_1_1buffer_1_1BufferParameters.html#acbb8b435cb2d4ed8e66e3fa7a9c377e9">00225</a> <span class="comment"></span>        <span class="keywordtype">double</span> <a class="code" href="classgeos_1_1operation_1_1buffer_1_1BufferParameters.html#acbb8b435cb2d4ed8e66e3fa7a9c377e9" title="Gets the mitre ratio limit.">getMitreLimit</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> mitreLimit; }
<a name="l00226"></a>00226  
<a name="l00228"></a>00228         <span class="comment">//</span>
<a name="l00240"></a><a class="code" href="classgeos_1_1operation_1_1buffer_1_1BufferParameters.html#a1c30adfb1d8385b59b58073ec6213410">00240</a> <span class="comment"></span>        <span class="keywordtype">void</span> <a class="code" href="classgeos_1_1operation_1_1buffer_1_1BufferParameters.html#a1c30adfb1d8385b59b58073ec6213410" title="Sets the limit on the mitre ratio used for very sharp corners.">setMitreLimit</a>(<span class="keywordtype">double</span> limit)
<a name="l00241"></a>00241         {
<a name="l00242"></a>00242                 mitreLimit = limit;
<a name="l00243"></a>00243         }
<a name="l00244"></a>00244 
<a name="l00245"></a>00245 
<a name="l00246"></a>00246 <span class="keyword">private</span>:
<a name="l00247"></a>00247 
<a name="l00249"></a>00249         <span class="keywordtype">int</span> quadrantSegments;
<a name="l00250"></a>00250 
<a name="l00252"></a>00252         <a class="code" href="classgeos_1_1operation_1_1buffer_1_1BufferParameters.html#a4712bec3a5a2bb5c28ab43b3fe327950" title="End cap styles.">EndCapStyle</a> endCapStyle;
<a name="l00253"></a>00253 
<a name="l00254"></a>00254         <span class="comment">// Defaults to JOIN_ROUND;</span>
<a name="l00255"></a>00255         <a class="code" href="classgeos_1_1operation_1_1buffer_1_1BufferParameters.html#ae40a3908d24a3ac91212b35f8464b9c7" title="Join styles.">JoinStyle</a> joinStyle;
<a name="l00256"></a>00256 
<a name="l00257"></a>00257         <span class="comment">// Defaults to DEFAULT_MITRE_LIMIT;</span>
<a name="l00258"></a>00258         <span class="keywordtype">double</span> mitreLimit;
<a name="l00259"></a>00259 };
<a name="l00260"></a>00260 
<a name="l00261"></a>00261 
<a name="l00262"></a>00262 
<a name="l00263"></a>00263 } <span class="comment">// namespace geos::operation::buffer</span>
<a name="l00264"></a>00264 } <span class="comment">// namespace geos::operation</span>
<a name="l00265"></a>00265 } <span class="comment">// namespace geos</span>
<a name="l00266"></a>00266 
<a name="l00267"></a>00267 <span class="preprocessor">#endif // ndef GEOS_OP_BUFFER_BUFFERPARAMETERS_H</span>
<a name="l00268"></a>00268 <span class="preprocessor"></span>
</pre></div></div>
</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>