1<html> 2<head> 3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 4<title>centroid_exception</title> 5<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> 6<meta name="generator" content="DocBook XSL Stylesheets V1.79.1"> 7<link rel="home" href="../../../index.html" title="Chapter 1. Geometry"> 8<link rel="up" href="../exceptions.html" title="Exceptions"> 9<link rel="prev" href="exception.html" title="exception"> 10<link rel="next" href="../io.html" title="IO (input/output)"> 11</head> 12<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> 13<table cellpadding="2" width="100%"><tr> 14<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> 15<td align="center"><a href="../../../../../../../index.html">Home</a></td> 16<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> 17<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> 18<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> 19<td align="center"><a href="../../../../../../../more/index.htm">More</a></td> 20</tr></table> 21<hr> 22<div class="spirit-nav"> 23<a accesskey="p" href="exception.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../exceptions.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../io.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> 24</div> 25<div class="section"> 26<div class="titlepage"><div><div><h4 class="title"> 27<a name="geometry.reference.exceptions.centroid_exception"></a><a class="link" href="centroid_exception.html" title="centroid_exception">centroid_exception</a> 28</h4></div></div></div> 29<p> 30 <a class="indexterm" name="idm45635682032512"></a> 31Centroid Exception. 32 </p> 33<h6> 34<a name="geometry.reference.exceptions.centroid_exception.h0"></a> 35 <span class="phrase"><a name="geometry.reference.exceptions.centroid_exception.description"></a></span><a class="link" href="centroid_exception.html#geometry.reference.exceptions.centroid_exception.description">Description</a> 36 </h6> 37<p> 38 The centroid_exception is thrown if the free centroid function is called 39 with geometries for which the centroid cannot be calculated. For example: 40 a linestring without points, a polygon without points, an empty multi-geometry. 41 </p> 42<h6> 43<a name="geometry.reference.exceptions.centroid_exception.h1"></a> 44 <span class="phrase"><a name="geometry.reference.exceptions.centroid_exception.synopsis"></a></span><a class="link" href="centroid_exception.html#geometry.reference.exceptions.centroid_exception.synopsis">Synopsis</a> 45 </h6> 46<p> 47</p> 48<pre class="programlisting"><span class="keyword">class</span> <span class="identifier">centroid_exception</span> 49 <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">exception</span> 50<span class="special">{</span> 51 <span class="comment">// ...</span> 52<span class="special">};</span> 53</pre> 54<p> 55 </p> 56<h6> 57<a name="geometry.reference.exceptions.centroid_exception.h2"></a> 58 <span class="phrase"><a name="geometry.reference.exceptions.centroid_exception.constructor_s_"></a></span><a class="link" href="centroid_exception.html#geometry.reference.exceptions.centroid_exception.constructor_s_">Constructor(s)</a> 59 </h6> 60<div class="informaltable"><table class="table"> 61<colgroup> 62<col> 63<col> 64<col> 65</colgroup> 66<thead><tr> 67<th> 68 <p> 69 Function 70 </p> 71 </th> 72<th> 73 <p> 74 Description 75 </p> 76 </th> 77<th> 78 <p> 79 Parameters 80 </p> 81 </th> 82</tr></thead> 83<tbody><tr> 84<td> 85 <p> 86</p> 87<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">centroid_exception</span><span class="special">()</span></pre> 88<p> 89 </p> 90 </td> 91<td> 92 <p> 93 The default constructor. 94 </p> 95 </td> 96<td> 97 </td> 98</tr></tbody> 99</table></div> 100<h6> 101<a name="geometry.reference.exceptions.centroid_exception.h3"></a> 102 <span class="phrase"><a name="geometry.reference.exceptions.centroid_exception.member_function_s_"></a></span><a class="link" href="centroid_exception.html#geometry.reference.exceptions.centroid_exception.member_function_s_">Member 103 Function(s)</a> 104 </h6> 105<div class="informaltable"><table class="table"> 106<colgroup> 107<col> 108<col> 109<col> 110<col> 111</colgroup> 112<thead><tr> 113<th> 114 <p> 115 Function 116 </p> 117 </th> 118<th> 119 <p> 120 Description 121 </p> 122 </th> 123<th> 124 <p> 125 Parameters 126 </p> 127 </th> 128<th> 129 <p> 130 Returns 131 </p> 132 </th> 133</tr></thead> 134<tbody><tr> 135<td> 136 <p> 137</p> 138<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="keyword">char</span> <span class="keyword">const</span> <span class="special">*</span> <span class="identifier">what</span><span class="special">()</span></pre> 139<p> 140 </p> 141 </td> 142<td> 143 <p> 144 Returns the explanatory string. 145 </p> 146 </td> 147<td> 148 </td> 149<td> 150 <p> 151 Pointer to a null-terminated string with explanatory information. 152 </p> 153 </td> 154</tr></tbody> 155</table></div> 156<h6> 157<a name="geometry.reference.exceptions.centroid_exception.h4"></a> 158 <span class="phrase"><a name="geometry.reference.exceptions.centroid_exception.header"></a></span><a class="link" href="centroid_exception.html#geometry.reference.exceptions.centroid_exception.header">Header</a> 159 </h6> 160<p> 161 Either 162 </p> 163<p> 164 <code class="computeroutput"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">geometry</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code> 165 </p> 166<p> 167 Or 168 </p> 169<p> 170 <code class="computeroutput"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">geometry</span><span class="special">/</span><span class="identifier">algorithms</span><span class="special">/</span><span class="identifier">centroid</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code> 171 </p> 172<h6> 173<a name="geometry.reference.exceptions.centroid_exception.h5"></a> 174 <span class="phrase"><a name="geometry.reference.exceptions.centroid_exception.see_also"></a></span><a class="link" href="centroid_exception.html#geometry.reference.exceptions.centroid_exception.see_also">See 175 also</a> 176 </h6> 177<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"> 178 <a class="link" href="../algorithms/centroid.html" title="centroid">the centroid 179 function</a> 180 </li></ul></div> 181</div> 182<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> 183<td align="left"></td> 184<td align="right"><div class="copyright-footer">Copyright © 2009-2019 Barend Gehrels, Bruno Lalande, Mateusz Loskot, Adam 185 Wulkiewicz, Oracle and/or its affiliates<p> 186 Distributed under the Boost Software License, Version 1.0. (See accompanying 187 file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) 188 </p> 189</div></td> 190</tr></table> 191<hr> 192<div class="spirit-nav"> 193<a accesskey="p" href="exception.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../exceptions.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../io.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> 194</div> 195</body> 196</html> 197