• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html>
2<head>
3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4<title>model::multi_polygon</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="../models.html" title="Models">
9<link rel="prev" href="model_multi_linestring.html" title="model::multi_linestring">
10<link rel="next" href="model_box.html" title="model::box">
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="model_multi_linestring.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../models.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="model_box.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.models.model_multi_polygon"></a><a class="link" href="model_multi_polygon.html" title="model::multi_polygon">model::multi_polygon</a>
28</h4></div></div></div>
29<p>
30          <a class="indexterm" name="idm45635679149472"></a><a class="indexterm" name="idm45635679148784"></a>
31multi_polygon, a collection of polygons
32        </p>
33<h6>
34<a name="geometry.reference.models.model_multi_polygon.h0"></a>
35          <span class="phrase"><a name="geometry.reference.models.model_multi_polygon.description"></a></span><a class="link" href="model_multi_polygon.html#geometry.reference.models.model_multi_polygon.description">Description</a>
36        </h6>
37<p>
38          Multi-polygon can be used to group polygons belonging to each other, e.g.
39          Hawaii
40        </p>
41<h6>
42<a name="geometry.reference.models.model_multi_polygon.h1"></a>
43          <span class="phrase"><a name="geometry.reference.models.model_multi_polygon.model_of"></a></span><a class="link" href="model_multi_polygon.html#geometry.reference.models.model_multi_polygon.model_of">Model
44          of</a>
45        </h6>
46<p>
47          <a class="link" href="../concepts/concept_multi_polygon.html" title="MultiPolygon Concept">MultiPolygon
48          Concept</a>
49        </p>
50<h6>
51<a name="geometry.reference.models.model_multi_polygon.h2"></a>
52          <span class="phrase"><a name="geometry.reference.models.model_multi_polygon.synopsis"></a></span><a class="link" href="model_multi_polygon.html#geometry.reference.models.model_multi_polygon.synopsis">Synopsis</a>
53        </h6>
54<p>
55</p>
56<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Polygon</span><span class="special">,</span> <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">typename</span><span class="special">,</span> <span class="keyword">typename</span> <span class="special">&gt;</span> <span class="keyword">class</span> <span class="identifier">Container</span><span class="special">,</span> <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">typename</span> <span class="special">&gt;</span> <span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">&gt;</span>
57<span class="keyword">class</span> <span class="identifier">model</span><span class="special">::</span><span class="identifier">multi_polygon</span>
58      <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">Container</span><span class="special">&lt;</span> <span class="identifier">Polygon</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">&lt;</span> <span class="identifier">Polygon</span> <span class="special">&gt;</span> <span class="special">&gt;</span>
59<span class="special">{</span>
60  <span class="comment">// ...</span>
61<span class="special">};</span>
62</pre>
63<p>
64        </p>
65<h6>
66<a name="geometry.reference.models.model_multi_polygon.h3"></a>
67          <span class="phrase"><a name="geometry.reference.models.model_multi_polygon.template_parameter_s_"></a></span><a class="link" href="model_multi_polygon.html#geometry.reference.models.model_multi_polygon.template_parameter_s_">Template
68          parameter(s)</a>
69        </h6>
70<div class="informaltable"><table class="table">
71<colgroup>
72<col>
73<col>
74<col>
75</colgroup>
76<thead><tr>
77<th>
78                  <p>
79                    Parameter
80                  </p>
81                </th>
82<th>
83                  <p>
84                    Default
85                  </p>
86                </th>
87<th>
88                  <p>
89                    Description
90                  </p>
91                </th>
92</tr></thead>
93<tbody>
94<tr>
95<td>
96                  <p>
97                    typename Polygon
98                  </p>
99                </td>
100<td>
101                </td>
102<td>
103                </td>
104</tr>
105<tr>
106<td>
107                  <p>
108                    template&lt; typename, typename &gt; class Container
109                  </p>
110                </td>
111<td>
112                  <p>
113                    std::vector
114                  </p>
115                </td>
116<td>
117                </td>
118</tr>
119<tr>
120<td>
121                  <p>
122                    template&lt; typename &gt; class Allocator
123                  </p>
124                </td>
125<td>
126                  <p>
127                    std::allocator
128                  </p>
129                </td>
130<td>
131                </td>
132</tr>
133</tbody>
134</table></div>
135<h6>
136<a name="geometry.reference.models.model_multi_polygon.h4"></a>
137          <span class="phrase"><a name="geometry.reference.models.model_multi_polygon.constructor_s_"></a></span><a class="link" href="model_multi_polygon.html#geometry.reference.models.model_multi_polygon.constructor_s_">Constructor(s)</a>
138        </h6>
139<div class="informaltable"><table class="table">
140<colgroup>
141<col>
142<col>
143<col>
144</colgroup>
145<thead><tr>
146<th>
147                  <p>
148                    Function
149                  </p>
150                </th>
151<th>
152                  <p>
153                    Description
154                  </p>
155                </th>
156<th>
157                  <p>
158                    Parameters
159                  </p>
160                </th>
161</tr></thead>
162<tbody>
163<tr>
164<td>
165                  <p>
166</p>
167<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">multi_polygon</span><span class="special">()</span></pre>
168<p>
169                  </p>
170                </td>
171<td>
172                  <p>
173                    Default constructor, creating an empty multi_polygon.
174                  </p>
175                </td>
176<td>
177                </td>
178</tr>
179<tr>
180<td>
181                  <p>
182</p>
183<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">multi_polygon</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">initializer_list</span><span class="special">&lt;</span> <span class="identifier">Polygon</span> <span class="special">&gt;</span> <span class="identifier">l</span><span class="special">)</span></pre>
184<p>
185                  </p>
186                </td>
187<td>
188                  <p>
189                    Constructor taking std::initializer_list, filling the multi_polygon.
190                  </p>
191                </td>
192<td>
193                  <p>
194                    <span class="bold"><strong>std::initializer_list&lt; Polygon &gt;</strong></span>:
195                    <span class="emphasis"><em>l</em></span>:
196                  </p>
197                </td>
198</tr>
199</tbody>
200</table></div>
201<h6>
202<a name="geometry.reference.models.model_multi_polygon.h5"></a>
203          <span class="phrase"><a name="geometry.reference.models.model_multi_polygon.header"></a></span><a class="link" href="model_multi_polygon.html#geometry.reference.models.model_multi_polygon.header">Header</a>
204        </h6>
205<p>
206          Either
207        </p>
208<p>
209          <code class="computeroutput"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">geometry</span><span class="special">/</span><span class="identifier">geometries</span><span class="special">/</span><span class="identifier">geometries</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
210        </p>
211<p>
212          Or
213        </p>
214<p>
215          <code class="computeroutput"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">geometry</span><span class="special">/</span><span class="identifier">geometries</span><span class="special">/</span><span class="identifier">multi_polygon</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
216        </p>
217<h6>
218<a name="geometry.reference.models.model_multi_polygon.h6"></a>
219          <span class="phrase"><a name="geometry.reference.models.model_multi_polygon.examples"></a></span><a class="link" href="model_multi_polygon.html#geometry.reference.models.model_multi_polygon.examples">Examples</a>
220        </h6>
221<p>
222          Declaration and use of the Boost.Geometry model::multi_polygon, modelling
223          the MultiPolygon Concept
224        </p>
225<p>
226</p>
227<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
228<span class="preprocessor">#include</span> <span class="special">&lt;</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">&gt;</span>
229<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">geometry</span><span class="special">/</span><span class="identifier">geometries</span><span class="special">/</span><span class="identifier">geometries</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
230
231<span class="keyword">namespace</span> <span class="identifier">bg</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">geometry</span><span class="special">;</span>
232
233<span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span>
234<span class="special">{</span>
235    <span class="keyword">typedef</span> <span class="identifier">bg</span><span class="special">::</span><span class="identifier">model</span><span class="special">::</span><span class="identifier">point</span><span class="special">&lt;</span><span class="keyword">double</span><span class="special">,</span> <span class="number">2</span><span class="special">,</span> <span class="identifier">bg</span><span class="special">::</span><span class="identifier">cs</span><span class="special">::</span><span class="identifier">cartesian</span><span class="special">&gt;</span> <span class="identifier">point_t</span><span class="special">;</span>
236    <span class="keyword">typedef</span> <span class="identifier">bg</span><span class="special">::</span><span class="identifier">model</span><span class="special">::</span><span class="identifier">polygon</span><span class="special">&lt;</span><span class="identifier">point_t</span><span class="special">&gt;</span> <span class="identifier">polygon_t</span><span class="special">;</span> <a class="co" name="geometry.reference.models.model_multi_polygon.c0" href="model_multi_polygon.html#geometry.reference.models.model_multi_polygon.c1"><img src="../../../../../../../doc/src/images/callouts/1.png" alt="1" border="0"></a>
237    <span class="keyword">typedef</span> <span class="identifier">bg</span><span class="special">::</span><span class="identifier">model</span><span class="special">::</span><span class="identifier">multi_polygon</span><span class="special">&lt;</span><span class="identifier">polygon_t</span><span class="special">&gt;</span> <span class="identifier">mpolygon_t</span><span class="special">;</span> <a class="co" name="geometry.reference.models.model_multi_polygon.c2" href="model_multi_polygon.html#geometry.reference.models.model_multi_polygon.c3"><img src="../../../../../../../doc/src/images/callouts/2.png" alt="2" border="0"></a>
238
239    <span class="identifier">mpolygon_t</span> <span class="identifier">mpoly1</span><span class="special">;</span> <a class="co" name="geometry.reference.models.model_multi_polygon.c4" href="model_multi_polygon.html#geometry.reference.models.model_multi_polygon.c5"><img src="../../../../../../../doc/src/images/callouts/3.png" alt="3" border="0"></a>
240
241<span class="preprocessor">#if</span> <span class="special">!</span><span class="identifier">defined</span><span class="special">(</span><span class="identifier">BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX</span><span class="special">)</span> <span class="special">\</span>
242 <span class="special">&amp;&amp;</span> <span class="special">!</span><span class="identifier">defined</span><span class="special">(</span><span class="identifier">BOOST_NO_CXX11_HDR_INITIALIZER_LIST</span><span class="special">)</span>
243
244    <span class="identifier">mpolygon_t</span> <span class="identifier">mpoly2</span><span class="special">{{{{</span><span class="number">0.0</span><span class="special">,</span> <span class="number">0.0</span><span class="special">},</span> <span class="special">{</span><span class="number">0.0</span><span class="special">,</span> <span class="number">5.0</span><span class="special">},</span> <span class="special">{</span><span class="number">5.0</span><span class="special">,</span> <span class="number">5.0</span><span class="special">},</span> <span class="special">{</span><span class="number">5.0</span><span class="special">,</span> <span class="number">0.0</span><span class="special">},</span> <span class="special">{</span><span class="number">0.0</span><span class="special">,</span> <span class="number">0.0</span><span class="special">}},</span>
245                       <span class="special">{{</span><span class="number">1.0</span><span class="special">,</span> <span class="number">1.0</span><span class="special">},</span> <span class="special">{</span><span class="number">4.0</span><span class="special">,</span> <span class="number">1.0</span><span class="special">},</span> <span class="special">{</span><span class="number">4.0</span><span class="special">,</span> <span class="number">4.0</span><span class="special">},</span> <span class="special">{</span><span class="number">1.0</span><span class="special">,</span> <span class="number">4.0</span><span class="special">},</span> <span class="special">{</span><span class="number">1.0</span><span class="special">,</span> <span class="number">1.0</span><span class="special">}}},</span>
246                      <span class="special">{{{</span><span class="number">5.0</span><span class="special">,</span> <span class="number">5.0</span><span class="special">},</span> <span class="special">{</span><span class="number">5.0</span><span class="special">,</span> <span class="number">6.0</span><span class="special">},</span> <span class="special">{</span><span class="number">6.0</span><span class="special">,</span> <span class="number">6.0</span><span class="special">},</span> <span class="special">{</span><span class="number">6.0</span><span class="special">,</span> <span class="number">5.0</span><span class="special">},</span> <span class="special">{</span><span class="number">5.0</span><span class="special">,</span> <span class="number">5.0</span><span class="special">}}}};</span> <a class="co" name="geometry.reference.models.model_multi_polygon.c6" href="model_multi_polygon.html#geometry.reference.models.model_multi_polygon.c7"><img src="../../../../../../../doc/src/images/callouts/4.png" alt="4" border="0"></a>
247
248<span class="preprocessor">#endif</span>
249
250    <span class="identifier">mpoly1</span><span class="special">.</span><span class="identifier">resize</span><span class="special">(</span><span class="number">2</span><span class="special">);</span> <a class="co" name="geometry.reference.models.model_multi_polygon.c8" href="model_multi_polygon.html#geometry.reference.models.model_multi_polygon.c9"><img src="../../../../../../../doc/src/images/callouts/5.png" alt="5" border="0"></a>
251
252    <span class="identifier">bg</span><span class="special">::</span><span class="identifier">append</span><span class="special">(</span><span class="identifier">mpoly1</span><span class="special">[</span><span class="number">0</span><span class="special">].</span><span class="identifier">outer</span><span class="special">(),</span> <span class="identifier">point_t</span><span class="special">(</span><span class="number">0.0</span><span class="special">,</span> <span class="number">0.0</span><span class="special">));</span> <a class="co" name="geometry.reference.models.model_multi_polygon.c10" href="model_multi_polygon.html#geometry.reference.models.model_multi_polygon.c11"><img src="../../../../../../../doc/src/images/callouts/6.png" alt="6" border="0"></a>
253    <span class="identifier">bg</span><span class="special">::</span><span class="identifier">append</span><span class="special">(</span><span class="identifier">mpoly1</span><span class="special">[</span><span class="number">0</span><span class="special">].</span><span class="identifier">outer</span><span class="special">(),</span> <span class="identifier">point_t</span><span class="special">(</span><span class="number">0.0</span><span class="special">,</span> <span class="number">5.0</span><span class="special">));</span>
254    <span class="identifier">bg</span><span class="special">::</span><span class="identifier">append</span><span class="special">(</span><span class="identifier">mpoly1</span><span class="special">[</span><span class="number">0</span><span class="special">].</span><span class="identifier">outer</span><span class="special">(),</span> <span class="identifier">point_t</span><span class="special">(</span><span class="number">5.0</span><span class="special">,</span> <span class="number">5.0</span><span class="special">));</span>
255    <span class="identifier">bg</span><span class="special">::</span><span class="identifier">append</span><span class="special">(</span><span class="identifier">mpoly1</span><span class="special">[</span><span class="number">0</span><span class="special">].</span><span class="identifier">outer</span><span class="special">(),</span> <span class="identifier">point_t</span><span class="special">(</span><span class="number">5.0</span><span class="special">,</span> <span class="number">0.0</span><span class="special">));</span>
256    <span class="identifier">bg</span><span class="special">::</span><span class="identifier">append</span><span class="special">(</span><span class="identifier">mpoly1</span><span class="special">[</span><span class="number">0</span><span class="special">].</span><span class="identifier">outer</span><span class="special">(),</span> <span class="identifier">point_t</span><span class="special">(</span><span class="number">0.0</span><span class="special">,</span> <span class="number">0.0</span><span class="special">));</span>
257
258    <span class="identifier">mpoly1</span><span class="special">[</span><span class="number">0</span><span class="special">].</span><span class="identifier">inners</span><span class="special">().</span><span class="identifier">resize</span><span class="special">(</span><span class="number">1</span><span class="special">);</span> <a class="co" name="geometry.reference.models.model_multi_polygon.c12" href="model_multi_polygon.html#geometry.reference.models.model_multi_polygon.c13"><img src="../../../../../../../doc/src/images/callouts/7.png" alt="7" border="0"></a>
259    <span class="identifier">bg</span><span class="special">::</span><span class="identifier">append</span><span class="special">(</span><span class="identifier">mpoly1</span><span class="special">[</span><span class="number">0</span><span class="special">].</span><span class="identifier">inners</span><span class="special">()[</span><span class="number">0</span><span class="special">],</span> <span class="identifier">point_t</span><span class="special">(</span><span class="number">1.0</span><span class="special">,</span> <span class="number">1.0</span><span class="special">));</span> <a class="co" name="geometry.reference.models.model_multi_polygon.c14" href="model_multi_polygon.html#geometry.reference.models.model_multi_polygon.c15"><img src="../../../../../../../doc/src/images/callouts/8.png" alt="8" border="0"></a>
260    <span class="identifier">bg</span><span class="special">::</span><span class="identifier">append</span><span class="special">(</span><span class="identifier">mpoly1</span><span class="special">[</span><span class="number">0</span><span class="special">].</span><span class="identifier">inners</span><span class="special">()[</span><span class="number">0</span><span class="special">],</span> <span class="identifier">point_t</span><span class="special">(</span><span class="number">4.0</span><span class="special">,</span> <span class="number">1.0</span><span class="special">));</span>
261    <span class="identifier">bg</span><span class="special">::</span><span class="identifier">append</span><span class="special">(</span><span class="identifier">mpoly1</span><span class="special">[</span><span class="number">0</span><span class="special">].</span><span class="identifier">inners</span><span class="special">()[</span><span class="number">0</span><span class="special">],</span> <span class="identifier">point_t</span><span class="special">(</span><span class="number">4.0</span><span class="special">,</span> <span class="number">4.0</span><span class="special">));</span>
262    <span class="identifier">bg</span><span class="special">::</span><span class="identifier">append</span><span class="special">(</span><span class="identifier">mpoly1</span><span class="special">[</span><span class="number">0</span><span class="special">].</span><span class="identifier">inners</span><span class="special">()[</span><span class="number">0</span><span class="special">],</span> <span class="identifier">point_t</span><span class="special">(</span><span class="number">1.0</span><span class="special">,</span> <span class="number">4.0</span><span class="special">));</span>
263    <span class="identifier">bg</span><span class="special">::</span><span class="identifier">append</span><span class="special">(</span><span class="identifier">mpoly1</span><span class="special">[</span><span class="number">0</span><span class="special">].</span><span class="identifier">inners</span><span class="special">()[</span><span class="number">0</span><span class="special">],</span> <span class="identifier">point_t</span><span class="special">(</span><span class="number">1.0</span><span class="special">,</span> <span class="number">1.0</span><span class="special">));</span>
264
265    <span class="identifier">bg</span><span class="special">::</span><span class="identifier">append</span><span class="special">(</span><span class="identifier">mpoly1</span><span class="special">[</span><span class="number">1</span><span class="special">].</span><span class="identifier">outer</span><span class="special">(),</span> <span class="identifier">point_t</span><span class="special">(</span><span class="number">5.0</span><span class="special">,</span> <span class="number">5.0</span><span class="special">));</span> <a class="co" name="geometry.reference.models.model_multi_polygon.c16" href="model_multi_polygon.html#geometry.reference.models.model_multi_polygon.c17"><img src="../../../../../../../doc/src/images/callouts/9.png" alt="9" border="0"></a>
266    <span class="identifier">bg</span><span class="special">::</span><span class="identifier">append</span><span class="special">(</span><span class="identifier">mpoly1</span><span class="special">[</span><span class="number">1</span><span class="special">].</span><span class="identifier">outer</span><span class="special">(),</span> <span class="identifier">point_t</span><span class="special">(</span><span class="number">5.0</span><span class="special">,</span> <span class="number">6.0</span><span class="special">));</span>
267    <span class="identifier">bg</span><span class="special">::</span><span class="identifier">append</span><span class="special">(</span><span class="identifier">mpoly1</span><span class="special">[</span><span class="number">1</span><span class="special">].</span><span class="identifier">outer</span><span class="special">(),</span> <span class="identifier">point_t</span><span class="special">(</span><span class="number">6.0</span><span class="special">,</span> <span class="number">6.0</span><span class="special">));</span>
268    <span class="identifier">bg</span><span class="special">::</span><span class="identifier">append</span><span class="special">(</span><span class="identifier">mpoly1</span><span class="special">[</span><span class="number">1</span><span class="special">].</span><span class="identifier">outer</span><span class="special">(),</span> <span class="identifier">point_t</span><span class="special">(</span><span class="number">6.0</span><span class="special">,</span> <span class="number">5.0</span><span class="special">));</span>
269    <span class="identifier">bg</span><span class="special">::</span><span class="identifier">append</span><span class="special">(</span><span class="identifier">mpoly1</span><span class="special">[</span><span class="number">1</span><span class="special">].</span><span class="identifier">outer</span><span class="special">(),</span> <span class="identifier">point_t</span><span class="special">(</span><span class="number">5.0</span><span class="special">,</span> <span class="number">5.0</span><span class="special">));</span>
270
271    <span class="keyword">double</span> <span class="identifier">a</span> <span class="special">=</span> <span class="identifier">bg</span><span class="special">::</span><span class="identifier">area</span><span class="special">(</span><span class="identifier">mpoly1</span><span class="special">);</span>
272
273    <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">a</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
274
275    <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
276<span class="special">}</span>
277</pre>
278<p>
279        </p>
280<div class="calloutlist"><table border="0" summary="Callout list">
281<tr>
282<td width="5%" valign="top" align="left"><p><a name="geometry.reference.models.model_multi_polygon.c1"></a><a href="#geometry.reference.models.model_multi_polygon.c0"><img src="../../../../../../../doc/src/images/callouts/1.png" alt="1" border="0"></a> </p></td>
283<td valign="top" align="left"><p>
284              Default parameters, clockwise, closed polygon.
285            </p></td>
286</tr>
287<tr>
288<td width="5%" valign="top" align="left"><p><a name="geometry.reference.models.model_multi_polygon.c3"></a><a href="#geometry.reference.models.model_multi_polygon.c2"><img src="../../../../../../../doc/src/images/callouts/2.png" alt="2" border="0"></a> </p></td>
289<td valign="top" align="left"><p>
290              Clockwise, closed multi_polygon.
291            </p></td>
292</tr>
293<tr>
294<td width="5%" valign="top" align="left"><p><a name="geometry.reference.models.model_multi_polygon.c5"></a><a href="#geometry.reference.models.model_multi_polygon.c4"><img src="../../../../../../../doc/src/images/callouts/3.png" alt="3" border="0"></a> </p></td>
295<td valign="top" align="left"><p>
296              Default-construct a multi_polygon.
297            </p></td>
298</tr>
299<tr>
300<td width="5%" valign="top" align="left"><p><a name="geometry.reference.models.model_multi_polygon.c7"></a><a href="#geometry.reference.models.model_multi_polygon.c6"><img src="../../../../../../../doc/src/images/callouts/4.png" alt="4" border="0"></a> </p></td>
301<td valign="top" align="left"><p>
302              Construct a multi_polygon containing two polygons, using C++11 unified
303              initialization syntax.
304            </p></td>
305</tr>
306<tr>
307<td width="5%" valign="top" align="left"><p><a name="geometry.reference.models.model_multi_polygon.c9"></a><a href="#geometry.reference.models.model_multi_polygon.c8"><img src="../../../../../../../doc/src/images/callouts/5.png" alt="5" border="0"></a> </p></td>
308<td valign="top" align="left"><p>
309              Resize a multi_polygon, store two polygons.
310            </p></td>
311</tr>
312<tr>
313<td width="5%" valign="top" align="left"><p><a name="geometry.reference.models.model_multi_polygon.c11"></a><a href="#geometry.reference.models.model_multi_polygon.c10"><img src="../../../../../../../doc/src/images/callouts/6.png" alt="6" border="0"></a> </p></td>
314<td valign="top" align="left"><p>
315              Append point to the exterior ring of the first polygon.
316            </p></td>
317</tr>
318<tr>
319<td width="5%" valign="top" align="left"><p><a name="geometry.reference.models.model_multi_polygon.c13"></a><a href="#geometry.reference.models.model_multi_polygon.c12"><img src="../../../../../../../doc/src/images/callouts/7.png" alt="7" border="0"></a> </p></td>
320<td valign="top" align="left"><p>
321              Resize a container of interior rings of the first polygon.
322            </p></td>
323</tr>
324<tr>
325<td width="5%" valign="top" align="left"><p><a name="geometry.reference.models.model_multi_polygon.c15"></a><a href="#geometry.reference.models.model_multi_polygon.c14"><img src="../../../../../../../doc/src/images/callouts/8.png" alt="8" border="0"></a> </p></td>
326<td valign="top" align="left"><p>
327              Append point to the interior ring of the first polygon.
328            </p></td>
329</tr>
330<tr>
331<td width="5%" valign="top" align="left"><p><a name="geometry.reference.models.model_multi_polygon.c17"></a><a href="#geometry.reference.models.model_multi_polygon.c16"><img src="../../../../../../../doc/src/images/callouts/9.png" alt="9" border="0"></a> </p></td>
332<td valign="top" align="left"><p>
333              Append point to the exterior ring of the second polygon.
334            </p></td>
335</tr>
336</table></div>
337<p>
338          Output:
339        </p>
340<pre class="programlisting">17
341</pre>
342</div>
343<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
344<td align="left"></td>
345<td align="right"><div class="copyright-footer">Copyright © 2009-2019 Barend Gehrels, Bruno Lalande, Mateusz Loskot, Adam
346      Wulkiewicz, Oracle and/or its affiliates<p>
347        Distributed under the Boost Software License, Version 1.0. (See accompanying
348        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>)
349      </p>
350</div></td>
351</tr></table>
352<hr>
353<div class="spirit-nav">
354<a accesskey="p" href="model_multi_linestring.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../models.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="model_box.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
355</div>
356</body>
357</html>
358