<!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>OGR: OGRMultiPolygon Class Reference</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.6.2-20100208 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <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> <li><a href="dirs.html"><span>Directories</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="annotated.html"><span>Class List</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> <div class="contents"> <h1>OGRMultiPolygon Class Reference</h1><!-- doxytag: class="OGRMultiPolygon" --><!-- doxytag: inherits="OGRGeometryCollection" --> <p><code>#include <<a class="el" href="ogr__geometry_8h_source.html">ogr_geometry.h</a>></code></p> <div class="dynheader"> Inheritance diagram for OGRMultiPolygon:</div> <div class="dynsection"> <div class="center"> <img src="classOGRMultiPolygon.png" usemap="#OGRMultiPolygon_map" alt=""/> <map id="OGRMultiPolygon_map" name="OGRMultiPolygon_map"> <area href="classOGRGeometryCollection.html" alt="OGRGeometryCollection" shape="rect" coords="0,56,149,80"/> <area href="classOGRGeometry.html" alt="OGRGeometry" shape="rect" coords="0,0,149,24"/> </map> </div> </div> <p><a href="classOGRMultiPolygon-members.html">List of all members.</a></p> <table border="0" cellpadding="0" cellspacing="0"> <tr><td colspan="2"><h2>Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRMultiPolygon.html#a3819c81ad80e967decf4fd5896d54919">getGeometryName</a> () const </td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="ogr__core_8h.html#a800236a0d460ef66e687b7b65610f12a">OGRwkbGeometryType</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRMultiPolygon.html#a3d06dca158cbe0375bfe1baf0927b13b">getGeometryType</a> () const </td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classOGRGeometry.html">OGRGeometry</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRMultiPolygon.html#a4ef6848b2988b29c9387897debc85cc0">clone</a> () const </td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual OGRErr </td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRMultiPolygon.html#a23b4a553c2b3ccde257359c78782eaf8">importFromWkt</a> (char **)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual OGRErr </td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRMultiPolygon.html#a21f4a8e2e947c55e9e83b563240bf63e">exportToWkt</a> (char **) const </td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual OGRErr </td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRMultiPolygon.html#a246ff65cee942960a98f64539ebbf7ad">addGeometryDirectly</a> (<a class="el" href="classOGRGeometry.html">OGRGeometry</a> *)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual double </td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRMultiPolygon.html#af62f5cde29360891cfadcb42c714941d">get_Area</a> () const </td></tr> </table> <hr/><a name="_details"></a><h2>Detailed Description</h2> <p>A collection of non-overlapping OGRPolygons.</p> <p>Note that the IMultiSurface class hasn't been modelled, nor have any of it's methods. </p> <hr/><h2>Member Function Documentation</h2> <a class="anchor" id="a246ff65cee942960a98f64539ebbf7ad"></a><!-- doxytag: member="OGRMultiPolygon::addGeometryDirectly" ref="a246ff65cee942960a98f64539ebbf7ad" args="(OGRGeometry *)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">OGRErr OGRMultiPolygon::addGeometryDirectly </td> <td>(</td> <td class="paramtype"><a class="el" href="classOGRGeometry.html">OGRGeometry</a> * </td> <td class="paramname"> <em>poNewGeom</em></td> <td> ) </td> <td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Add a geometry directly to the container.</p> <p>Some subclasses of <a class="el" href="classOGRGeometryCollection.html">OGRGeometryCollection</a> restrict the types of geometry that can be added, and may return an error. Ownership of the passed geometry is taken by the container rather than cloning as <a class="el" href="classOGRGeometryCollection.html#a3da519655d14346e591d22a547562b0c">addGeometry()</a> does.</p> <p>This method is the same as the C function <a class="el" href="ogr__api_8h.html#aff56cae8305396a9c5b690d8356e39c9">OGR_G_AddGeometryDirectly()</a>.</p> <p>There is no SFCOM analog to this method.</p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>poNewGeom</em> </td><td>geometry to add to the container.</td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>OGRERR_NONE if successful, or OGRERR_UNSUPPORTED_GEOMETRY_TYPE if the geometry type is illegal for the type of geometry container. </dd></dl> <p>Reimplemented from <a class="el" href="classOGRGeometryCollection.html#a8422907a01d088ec5ef916382bea8eb3">OGRGeometryCollection</a>.</p> <p>References <a class="el" href="classOGRGeometry.html#a5c6bca18682cb933e3227552d480e1a5">OGRGeometry::getGeometryType()</a>, <a class="el" href="ogr__core_8h_source.html#l00150">wkbPolygon</a>, and <a class="el" href="ogr__core_8h_source.html#l00162">wkbPolygon25D</a>.</p> <p>Referenced by <a class="el" href="ogrgeometryfactory_8cpp_source.html#l00536">OGRGeometryFactory::forceToMultiPolygon()</a>, and <a class="el" href="ogrmultipolygon_8cpp_source.html#l00107">importFromWkt()</a>.</p> </div> </div> <a class="anchor" id="a4ef6848b2988b29c9387897debc85cc0"></a><!-- doxytag: member="OGRMultiPolygon::clone" ref="a4ef6848b2988b29c9387897debc85cc0" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classOGRGeometry.html">OGRGeometry</a> * OGRMultiPolygon::clone </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td> const<code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Make a copy of this object.</p> <p>This method relates to the SFCOM IGeometry::clone() method.</p> <p>This method is the same as the C function <a class="el" href="ogr__api_8h.html#a1725918932da7d59f9ee72829ac171fa">OGR_G_Clone()</a>.</p> <dl class="return"><dt><b>Returns:</b></dt><dd>a new object instance with the same geometry, and spatial reference system as the original. </dd></dl> <p>Reimplemented from <a class="el" href="classOGRGeometryCollection.html#ae007573cfec375b0fbb246a758b20b4c">OGRGeometryCollection</a>.</p> <p>References <a class="el" href="ogrgeometrycollection_8cpp_source.html#l00229">OGRGeometryCollection::addGeometry()</a>, <a class="el" href="ogrgeometry_8cpp_source.html#l00228">OGRGeometry::assignSpatialReference()</a>, <a class="el" href="ogrgeometrycollection_8cpp_source.html#l00186">OGRGeometryCollection::getGeometryRef()</a>, <a class="el" href="ogrgeometrycollection_8cpp_source.html#l00161">OGRGeometryCollection::getNumGeometries()</a>, and <a class="el" href="ogr__geometry_8h_source.html#l00116">OGRGeometry::getSpatialReference()</a>.</p> </div> </div> <a class="anchor" id="a21f4a8e2e947c55e9e83b563240bf63e"></a><!-- doxytag: member="OGRMultiPolygon::exportToWkt" ref="a21f4a8e2e947c55e9e83b563240bf63e" args="(char **) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">OGRErr OGRMultiPolygon::exportToWkt </td> <td>(</td> <td class="paramtype">char ** </td> <td class="paramname"> <em>ppszDstText</em></td> <td> ) </td> <td> const<code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Convert a geometry into well known text format.</p> <p>This method relates to the SFCOM IWks::ExportToWKT() method.</p> <p>This method is the same as the C function <a class="el" href="ogr__api_8h.html#a3bc9310302e2dbfaab1690de9e2fd2fb">OGR_G_ExportToWkt()</a>.</p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>ppszDstText</em> </td><td>a text buffer is allocated by the program, and assigned to the passed pointer.</td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>Currently OGRERR_NONE is always returned. </dd></dl> <p>Reimplemented from <a class="el" href="classOGRGeometryCollection.html#a6612b05d85871c92b24015457883de1c">OGRGeometryCollection</a>.</p> <p>References <a class="el" href="classOGRGeometry.html#a0c941d5efdff84666af5a6f6b540aafb">OGRGeometry::exportToWkt()</a>, <a class="el" href="ogrgeometrycollection_8cpp_source.html#l00186">OGRGeometryCollection::getGeometryRef()</a>, and <a class="el" href="ogrgeometrycollection_8cpp_source.html#l00161">OGRGeometryCollection::getNumGeometries()</a>.</p> </div> </div> <a class="anchor" id="af62f5cde29360891cfadcb42c714941d"></a><!-- doxytag: member="OGRMultiPolygon::get_Area" ref="af62f5cde29360891cfadcb42c714941d" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">double OGRMultiPolygon::get_Area </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td> const<code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Compute area of multipolygon.</p> <p>The area is computed as the sum of the areas of all polygon members in this collection.</p> <dl class="return"><dt><b>Returns:</b></dt><dd>computed area. </dd></dl> <p>Reimplemented from <a class="el" href="classOGRGeometryCollection.html#af39e7629c39cd27ce00a1ff750bda088">OGRGeometryCollection</a>.</p> <p>References <a class="el" href="ogrpolygon_8cpp_source.html#l00987">OGRPolygon::get_Area()</a>, <a class="el" href="ogrgeometrycollection_8cpp_source.html#l00186">OGRGeometryCollection::getGeometryRef()</a>, and <a class="el" href="ogrgeometrycollection_8cpp_source.html#l00161">OGRGeometryCollection::getNumGeometries()</a>.</p> </div> </div> <a class="anchor" id="a3819c81ad80e967decf4fd5896d54919"></a><!-- doxytag: member="OGRMultiPolygon::getGeometryName" ref="a3819c81ad80e967decf4fd5896d54919" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const char * OGRMultiPolygon::getGeometryName </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td> const<code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Fetch WKT name for geometry type.</p> <p>There is no SFCOM analog to this method.</p> <p>This method is the same as the C function <a class="el" href="ogr__api_8h.html#a18121f835b2fb724a0c1a87beb1a437a">OGR_G_GetGeometryName()</a>.</p> <dl class="return"><dt><b>Returns:</b></dt><dd>name used for this geometry type in well known text format. The returned pointer is to a static internal string and should not be modified or freed. </dd></dl> <p>Reimplemented from <a class="el" href="classOGRGeometryCollection.html#ad8a37b8aaa8506c59a0f6e361e33cfea">OGRGeometryCollection</a>.</p> <p>Referenced by <a class="el" href="ogrmultipolygon_8cpp_source.html#l00107">importFromWkt()</a>.</p> </div> </div> <a class="anchor" id="a3d06dca158cbe0375bfe1baf0927b13b"></a><!-- doxytag: member="OGRMultiPolygon::getGeometryType" ref="a3d06dca158cbe0375bfe1baf0927b13b" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="ogr__core_8h.html#a800236a0d460ef66e687b7b65610f12a">OGRwkbGeometryType</a> OGRMultiPolygon::getGeometryType </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td> const<code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Fetch geometry type.</p> <p>Note that the geometry type may include the 2.5D flag. To get a 2D flattened version of the geometry type apply the wkbFlatten() macro to the return result.</p> <p>This method is the same as the C function <a class="el" href="ogr__api_8h.html#a8fae58102f5c4a4cf2526e5ca8369a76">OGR_G_GetGeometryType()</a>.</p> <dl class="return"><dt><b>Returns:</b></dt><dd>the geometry type code. </dd></dl> <p>Reimplemented from <a class="el" href="classOGRGeometryCollection.html#ac0ce5876364a826479eb2a10815fea60">OGRGeometryCollection</a>.</p> <p>References <a class="el" href="ogrgeometry_8cpp_source.html#l00628">OGRGeometry::getCoordinateDimension()</a>, <a class="el" href="ogr__core_8h_source.html#l00155">wkbMultiPolygon</a>, and <a class="el" href="ogr__core_8h_source.html#l00165">wkbMultiPolygon25D</a>.</p> </div> </div> <a class="anchor" id="a23b4a553c2b3ccde257359c78782eaf8"></a><!-- doxytag: member="OGRMultiPolygon::importFromWkt" ref="a23b4a553c2b3ccde257359c78782eaf8" args="(char **)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">OGRErr OGRMultiPolygon::importFromWkt </td> <td>(</td> <td class="paramtype">char ** </td> <td class="paramname"> <em>ppszInput</em></td> <td> ) </td> <td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Assign geometry from well known text data.</p> <p>The object must have already been instantiated as the correct derived type of geometry object to match the text type. This method is used by the <a class="el" href="classOGRGeometryFactory.html">OGRGeometryFactory</a> class, but not normally called by application code.</p> <p>This method relates to the SFCOM IWks::ImportFromWKT() method.</p> <p>This method is the same as the C function <a class="el" href="ogr__api_8h.html#a4286ba243fb05a831a49f52aabcbc6f8">OGR_G_ImportFromWkt()</a>.</p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>ppszInput</em> </td><td>pointer to a pointer to the source text. The pointer is updated to pointer after the consumed text.</td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>OGRERR_NONE if all goes well, otherwise any of OGRERR_NOT_ENOUGH_DATA, OGRERR_UNSUPPORTED_GEOMETRY_TYPE, or OGRERR_CORRUPT_DATA may be returned. </dd></dl> <p>Reimplemented from <a class="el" href="classOGRGeometryCollection.html#a72381b58185cf0851db54067e3f3f2df">OGRGeometryCollection</a>.</p> <p>References <a class="el" href="ogrmultipolygon_8cpp_source.html#l00070">addGeometryDirectly()</a>, <a class="el" href="ogrpolygon_8cpp_source.html#l00292">OGRPolygon::addRingDirectly()</a>, <a class="el" href="ogrgeometrycollection_8cpp_source.html#l00064">OGRGeometryCollection::empty()</a>, <a class="el" href="ogrmultipolygon_8cpp_source.html#l00060">getGeometryName()</a>, and <a class="el" href="ogrlinestring_8cpp_source.html#l00480">OGRLineString::setPoints()</a>.</p> </div> </div> <hr/>The documentation for this class was generated from the following files:<ul> <li><a class="el" href="ogr__geometry_8h_source.html">ogr_geometry.h</a></li> <li>ogrmultipolygon.cpp</li> </ul> </div> <hr> Generated for GDAL by <a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.6.2-20100208. </body> </html>