⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 classogrgeometryfactory.html

📁 gdal库的学习文档
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>OGR: OGRGeometryFactory Class Reference</title><link href="doxygen.css" rel="stylesheet" type="text/css"><link href="tabs.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.5.1 --><div class="tabs">  <ul>    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>    <li id="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>    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>  </ul></div><div class="tabs">  <ul>    <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>    <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>  </ul></div><h1>OGRGeometryFactory Class Reference</h1><!-- doxytag: class="OGRGeometryFactory" --><code>#include &lt;<a class="el" href="ogr__geometry_8h-source.html">ogr_geometry.h</a>&gt;</code><p><a href="classOGRGeometryFactory-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"><tr><td></td></tr><tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">static OGRErr&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRGeometryFactory.html#699688dba97260f2eb29f802e39cb0ec">createFromWkb</a> (unsigned char *, <a class="el" href="classOGRSpatialReference.html">OGRSpatialReference</a> *, <a class="el" href="classOGRGeometry.html">OGRGeometry</a> **, int=-1)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">static OGRErr&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRGeometryFactory.html#9418f71bcfb1e334173882c38d89d070">createFromWkt</a> (char **, <a class="el" href="classOGRSpatialReference.html">OGRSpatialReference</a> *, <a class="el" href="classOGRGeometry.html">OGRGeometry</a> **)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">static <a class="el" href="classOGRGeometry.html">OGRGeometry</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRGeometryFactory.html#f8714df4e6b6c5d5b2cdbdeec78af08c">createFromGML</a> (const char *)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">static void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRGeometryFactory.html#ae001086e26985d95c36ccd255a8c6d5">destroyGeometry</a> (<a class="el" href="classOGRGeometry.html">OGRGeometry</a> *)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">static <a class="el" href="classOGRGeometry.html">OGRGeometry</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRGeometryFactory.html#e4887e270d5099357f9a19b1eda6027a">createGeometry</a> (OGRwkbGeometryType)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">static <a class="el" href="classOGRGeometry.html">OGRGeometry</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRGeometryFactory.html#fd61936e41ea69831b3196e817658d08">forceToPolygon</a> (<a class="el" href="classOGRGeometry.html">OGRGeometry</a> *)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">static <a class="el" href="classOGRGeometry.html">OGRGeometry</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRGeometryFactory.html#2a40032fa65cc71c028516bf8fc0df3e">forceToMultiPolygon</a> (<a class="el" href="classOGRGeometry.html">OGRGeometry</a> *)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">static <a class="el" href="classOGRGeometry.html">OGRGeometry</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRGeometryFactory.html#a97b7837101f6c56e476520d10a9f3c3">forceToMultiPoint</a> (<a class="el" href="classOGRGeometry.html">OGRGeometry</a> *)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">static <a class="el" href="classOGRGeometry.html">OGRGeometry</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRGeometryFactory.html#1c00a78cec110d71175726d6f26b1b39">forceToMultiLineString</a> (<a class="el" href="classOGRGeometry.html">OGRGeometry</a> *)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">static int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRGeometryFactory.html#04998dcdbb37aa37871891593c048544">haveGEOS</a> ()</td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2>Create geometry objects from well known text/binary. <p><hr><h2>Member Function Documentation</h2><a class="anchor" name="699688dba97260f2eb29f802e39cb0ec"></a><!-- doxytag: member="OGRGeometryFactory::createFromWkb" ref="699688dba97260f2eb29f802e39cb0ec" args="(unsigned char *, OGRSpatialReference *, OGRGeometry **, int=-1)" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">OGRErr OGRGeometryFactory::createFromWkb           </td>          <td>(</td>          <td class="paramtype">unsigned char *&nbsp;</td>          <td class="paramname"> <em>pabyData</em>, </td>        </tr>        <tr>          <td class="paramkey"></td>          <td></td>          <td class="paramtype"><a class="el" href="classOGRSpatialReference.html">OGRSpatialReference</a> *&nbsp;</td>          <td class="paramname"> <em>poSR</em>, </td>        </tr>        <tr>          <td class="paramkey"></td>          <td></td>          <td class="paramtype"><a class="el" href="classOGRGeometry.html">OGRGeometry</a> **&nbsp;</td>          <td class="paramname"> <em>ppoReturn</em>, </td>        </tr>        <tr>          <td class="paramkey"></td>          <td></td>          <td class="paramtype">int&nbsp;</td>          <td class="paramname"> <em>nBytes</em> = <code>-1</code></td><td>&nbsp;</td>        </tr>        <tr>          <td></td>          <td>)</td>          <td></td><td></td><td width="100%"><code> [static]</code></td>        </tr>      </table></div><div class="memdoc"><p>Create a geometry object of the appropriate type from it's well known binary representation.<p>Note that if nBytes is passed as zero, no checking can be done on whether the pabyData is sufficient. This can result in a crash if the input data is corrupt. This function returns no indication of the number of bytes from the data source actually used to represent the returned geometry object. Use <a class="el" href="classOGRGeometry.html#68215bd90d675b7627a798b162c54ab1">OGRGeometry::WkbSize()</a> on the returned geometry to establish the number of bytes it required in WKB format.<p>Also note that this is a static method, and that there is no need to instantiate an <a class="el" href="classOGRGeometryFactory.html">OGRGeometryFactory</a> object.<p>The C function <a class="el" href="ogr__api_8h.html#3172c8e5b8a094b8ce97fa5d44bcd204">OGR_G_CreateFromWkb()</a> is the same as this method.<p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>pabyData</em>&nbsp;</td><td>pointer to the input BLOB data. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>poSR</em>&nbsp;</td><td>pointer to the spatial reference to be assigned to the created geometry object. This may be NULL. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>ppoReturn</em>&nbsp;</td><td>the newly created geometry object will be assigned to the indicated pointer on return. This will be NULL in case of failure. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>nBytes</em>&nbsp;</td><td>the number of bytes available in pabyData, or -1 if it isn't known.</td></tr>  </table></dl><dl class="return" compact><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></div></div><p><a class="anchor" name="9418f71bcfb1e334173882c38d89d070"></a><!-- doxytag: member="OGRGeometryFactory::createFromWkt" ref="9418f71bcfb1e334173882c38d89d070" args="(char **, OGRSpatialReference *, OGRGeometry **)" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">OGRErr OGRGeometryFactory::createFromWkt           </td>          <td>(</td>          <td class="paramtype">char **&nbsp;</td>          <td class="paramname"> <em>ppszData</em>, </td>        </tr>        <tr>          <td class="paramkey"></td>          <td></td>          <td class="paramtype"><a class="el" href="classOGRSpatialReference.html">OGRSpatialReference</a> *&nbsp;</td>          <td class="paramname"> <em>poSR</em>, </td>        </tr>        <tr>          <td class="paramkey"></td>          <td></td>          <td class="paramtype"><a class="el" href="classOGRGeometry.html">OGRGeometry</a> **&nbsp;</td>          <td class="paramname"> <em>ppoReturn</em></td><td>&nbsp;</td>        </tr>        <tr>          <td></td>          <td>)</td>          <td></td><td></td><td width="100%"><code> [static]</code></td>        </tr>      </table></div><div class="memdoc"><p>Create a geometry object of the appropriate type from it's well known text representation.<p>The C function <a class="el" href="ogr__api_8h.html#c02c3ed5f7ebd5039dc2ae70154fd94a">OGR_G_CreateFromWkt()</a> is the same as this method.<p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>ppszData</em>&nbsp;</td><td>input zero terminated string containing well known text representation of the geometry to be created. The pointer is updated to point just beyond that last character consumed. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>poSR</em>&nbsp;</td><td>pointer to the spatial reference to be assigned to the created geometry object. This may be NULL. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>ppoReturn</em>&nbsp;</td><td>the newly created geometry object will be assigned to the indicated pointer on return. This will be NULL if the method fails.</td></tr>  </table></dl><b>Example:</b><p><pre>    const char* wkt= "POINT(0 0)";</pre><p><pre>    // cast because OGR_G_CreateFromWkt will move the pointer     char* pszWkt = (char*) wkt.c_str();     OGRSpatialReferenceH ref = OSRNewSpatialReference(NULL);    OGRGeometryH new_geom;    OGRErr err = OGR_G_CreateFromWkt(&amp;pszWkt, ref, &amp;new_geom);  </pre><p><dl class="return" compact><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></div></div><p><a class="anchor" name="f8714df4e6b6c5d5b2cdbdeec78af08c"></a><!-- doxytag: member="OGRGeometryFactory::createFromGML" ref="f8714df4e6b6c5d5b2cdbdeec78af08c" args="(const char *)" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname"><a class="el" href="classOGRGeometry.html">OGRGeometry</a> * OGRGeometryFactory::createFromGML           </td>          <td>(</td>          <td class="paramtype">const char *&nbsp;</td>          <td class="paramname"> <em>pszData</em>          </td>          <td>&nbsp;)&nbsp;</td>          <td width="100%"><code> [static]</code></td>        </tr>      </table></div><div class="memdoc"><p>Create geometry from GML.<p>This method translates a fragment of GML containing only the geometry portion into a corresponding <a class="el" href="classOGRGeometry.html">OGRGeometry</a>. There are many limitations on the forms of GML geometries supported by this parser, but they are too numerous to list here.<p>The C function OGR_G_CreateFromGML() is the same as this method.<p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>pszData</em>&nbsp;</td><td>The GML fragment for the geometry.</td></tr>  </table></dl>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -