📄 cpl__conv_8h.html
字号:
<tr><td valign="top"></td><td valign="top"><em>pnCount</em> </td><td>place to put the count of entries.</td></tr> </table></dl><dl class="return" compact><dt><b>Returns:</b></dt><dd>the pointer to the first in the array of shared file info structures. </dd></dl></div></div><p><a class="anchor" name="ffa4a3c8bb4ecbbb9ae3d7ffb35d3572"></a><!-- doxytag: member="cpl_conv.h::CPLGetSymbol" ref="ffa4a3c8bb4ecbbb9ae3d7ffb35d3572" args="(const char *, const char *)" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">void* CPLGetSymbol </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"> <em>pszLibrary</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"> <em>pszSymbolName</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"></td> </tr> </table></div><div class="memdoc"><p>Fetch a function pointer from a shared library / DLL.<p>This function is meant to abstract access to shared libraries and DLLs and performs functions similar to dlopen()/dlsym() on Unix and LoadLibrary() / GetProcAddress() on Windows.<p>If no support for loading entry points from a shared library is available this function will always return NULL. Rules on when this function issues a <a class="el" href="cpl__error_8h.html#ad2b98dd58e4de706a245faddac90403">CPLError()</a> or not are not currently well defined, and will have to be resolved in the future.<p>Currently <a class="el" href="cpl__conv_8h.html#ffa4a3c8bb4ecbbb9ae3d7ffb35d3572">CPLGetSymbol()</a> doesn't try to: <ul><li>prevent the reference count on the library from going up for every request, or given any opportunity to unload the library. </li><li>Attempt to look for the library in non-standard locations. </li><li>Attempt to try variations on the symbol name, like pre-prending or post-pending an underscore. </li></ul><p>Some of these issues may be worked on in the future.<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>pszLibrary</em> </td><td>the name of the shared library or DLL containing the function. May contain path to file. If not system supplies search paths will be used. </td></tr> <tr><td valign="top"></td><td valign="top"><em>pszSymbolName</em> </td><td>the name of the function to fetch a pointer to. </td></tr> </table></dl><dl class="return" compact><dt><b>Returns:</b></dt><dd>A pointer to the function if found, or NULL if the function isn't found, or the shared library can't be loaded. </dd></dl></div></div><p><a class="anchor" name="0cd8ae8d760125ec5b01958a776691ec"></a><!-- doxytag: member="cpl_conv.h::CPLIsFilenameRelative" ref="0cd8ae8d760125ec5b01958a776691ec" args="(const char *pszFilename)" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">int CPLIsFilenameRelative </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"> <em>pszFilename</em> </td> <td> ) </td> <td width="100%"></td> </tr> </table></div><div class="memdoc"><p>Is filename relative or absolute?<p>The test is filesystem convention agnostic. That is it will test for Unix style and windows style path conventions regardless of the actual system in use.<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>pszFilename</em> </td><td>the filename with path to test.</td></tr> </table></dl><dl class="return" compact><dt><b>Returns:</b></dt><dd>TRUE if the filename is relative or FALSE if it is absolute. </dd></dl></div></div><p><a class="anchor" name="9ebcdb25fc6ff90b0c7b01733d5ae6d3"></a><!-- doxytag: member="cpl_conv.h::CPLMalloc" ref="9ebcdb25fc6ff90b0c7b01733d5ae6d3" args="(size_t)" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">void* CPLMalloc </td> <td>(</td> <td class="paramtype">size_t </td> <td class="paramname"> <em>nSize</em> </td> <td> ) </td> <td width="100%"></td> </tr> </table></div><div class="memdoc"><p>Safe version of malloc().<p>This function is like the C library malloc(), but raises a CE_Fatal error with <a class="el" href="cpl__error_8h.html#ad2b98dd58e4de706a245faddac90403">CPLError()</a> if it fails to allocate the desired memory. It should be used for small memory allocations that are unlikely to fail and for which the application is unwilling to test for out of memory conditions. It uses VSIMalloc() to get the memory, so any hooking of VSIMalloc() will apply to <a class="el" href="cpl__conv_8h.html#9ebcdb25fc6ff90b0c7b01733d5ae6d3">CPLMalloc()</a> as well. CPLFree() or VSIFree() can be used free memory allocated by <a class="el" href="cpl__conv_8h.html#9ebcdb25fc6ff90b0c7b01733d5ae6d3">CPLMalloc()</a>.<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>nSize</em> </td><td>size (in bytes) of memory block to allocate. </td></tr> </table></dl><dl class="return" compact><dt><b>Returns:</b></dt><dd>pointer to newly allocated memory, only NULL if nSize is zero. </dd></dl></div></div><p><a class="anchor" name="f47485362aca554e37796c352a77fc71"></a><!-- doxytag: member="cpl_conv.h::CPLOpenShared" ref="f47485362aca554e37796c352a77fc71" args="(const char *, const char *, int)" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">FILE* CPLOpenShared </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"> <em>pszFilename</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"> <em>pszAccess</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>bLarge</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"></td> </tr> </table></div><div class="memdoc"><p>Open a shared file handle.<p>Some operating systems have limits on the number of file handles that can be open at one time. This function attempts to maintain a registry of already open file handles, and reuse existing ones if the same file is requested by another part of the application.<p>Note that access is only shared for access types "r", "rb", "r+" and "rb+". All others will just result in direct VSIOpen() calls. Keep in mind that a file is only reused if the file name is exactly the same. Different names referring to the same file will result in different handles.<p>The VSIFOpen() or <a class="el" href="cpl__vsi_8h.html#48b5fab6cc22a9d0a543c095ee358634">VSIFOpenL()</a> function is used to actually open the file, when an existing file handle can't be shared.<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>pszFilename</em> </td><td>the name of the file to open. </td></tr> <tr><td valign="top"></td><td valign="top"><em>pszAccess</em> </td><td>the normal fopen()/VSIFOpen() style access string. </td></tr> <tr><td valign="top"></td><td valign="top"><em>bLarge</em> </td><td>If TRUE <a class="el" href="cpl__vsi_8h.html#48b5fab6cc22a9d0a543c095ee358634">VSIFOpenL()</a> (for large files) will be used instead of VSIFOpen().</td></tr> </table></dl><dl class="return" compact><dt><b>Returns:</b></dt><dd>a file handle or NULL if opening fails. </dd></dl></div></div><p><a class="anchor" name="a4ffc8fd25881635e18d1a53e177a8e1"></a><!-- doxytag: member="cpl_conv.h::CPLPackedDMSToDec" ref="a4ffc8fd25881635e18d1a53e177a8e1" args="(double)" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">double CPLPackedDMSToDec </td> <td>(</td> <td class="paramtype">double </td> <td class="paramname"> <em>dfPacked</em> </td> <td> ) </td> <td width="100%"></td> </tr> </table></div><div class="memdoc"><p>Convert a packed DMS value (DDDMMMSSS.SS) into decimal degrees.<p>This function converts a packed DMS angle to seconds. The standard packed DMS format is:<p>degrees * 1000000 + minutes * 1000 + seconds<p>Example: ang = 120025045.25 yields deg = 120 min = 25 sec = 45.25<p>The algorithm used for the conversion is as follows:<p>1. The absolute value of the angle is used.<p>2. The degrees are separated out: deg = ang/1000000 (fractional portion truncated)<p>3. The minutes are separated out: min = (ang - deg * 1000000) / 1000 (fractional portion truncated)<p>4. The seconds are then computed: sec = ang - deg * 1000000 - min * 1000<p>5. The total angle in seconds is computed: sec = deg * 3600.0 + min * 60.0 + sec<p>6. The sign of sec is set to that of the input angle.<p>Packed DMS values used by the USGS GCTP package and probably by other software.<p>NOTE: This code does not validate input value. If you give the wrong value, you will get the wrong result.<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>dfPacked</em> </td><td>Angle in packed DMS format.</td></tr> </table></dl><dl class="return" compact><dt><b>Returns:</b></dt><dd>Angle in decimal degrees. </dd></dl></div></div><p><a class="anchor" name="8a5d5d7101cd22feabd56344e62aa98b"></a><!-- doxytag: member="cpl_conv.h::CPLPrintDouble" ref="8a5d5d7101cd22feabd56344e62aa98b" args="(char *, const char *, double, char *)" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">int CPLPrintDouble </td> <td>(</td> <td class="paramtype">char * </td> <td class="paramname"> <em>pszBuffer</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"> <em>pszFormat</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class=
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -