3 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
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)">
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>
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>
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>
30 <a class="indexterm" name="idm46186984996064"></a>
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>
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.
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>
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>
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>
60 <div class="informaltable"><table class="table">
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>
93 The default constructor.
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
105 <div class="informaltable"><table class="table">
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>
144 Returns the explanatory string.
151 Pointer to a null-terminated string with explanatory information.
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>
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>
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>
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
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
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>)
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>