Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > 5adb74720e36e34eaa8ce4283e642887 > files > 38

libgeotiff-devel-1.2.5-5.fc12.x86_64.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>libgeotiff: geo_keyp.h Source File</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.5.9 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
    </ul>
  </div>
<h1>geo_keyp.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/**********************************************************************</span>
<a name="l00002"></a>00002 <span class="comment"> *</span>
<a name="l00003"></a>00003 <span class="comment"> *  geo_keyp.h - private interface for GeoTIFF geokey tag parsing</span>
<a name="l00004"></a>00004 <span class="comment"> *</span>
<a name="l00005"></a>00005 <span class="comment"> *     Written by: Niles D. Ritter</span>
<a name="l00006"></a>00006 <span class="comment"> *</span>
<a name="l00007"></a>00007 <span class="comment"> **********************************************************************/</span>
<a name="l00008"></a>00008 
<a name="l00009"></a>00009 <span class="preprocessor">#ifndef __geo_keyp_h_</span>
<a name="l00010"></a>00010 <span class="preprocessor"></span><span class="preprocessor">#define __geo_keyp_h_</span>
<a name="l00011"></a>00011 <span class="preprocessor"></span>
<a name="l00012"></a>00012 <span class="preprocessor">#include &lt;stdlib.h&gt;</span> <span class="comment">/* for size_t */</span>
<a name="l00013"></a>00013 
<a name="l00014"></a>00014 <span class="comment">/*</span>
<a name="l00015"></a>00015 <span class="comment"> * This structure contains the internal program</span>
<a name="l00016"></a>00016 <span class="comment"> * representation of the key entry.</span>
<a name="l00017"></a>00017 <span class="comment"> */</span>
<a name="l00018"></a>00018 <span class="keyword">struct </span>GeoKey {
<a name="l00019"></a>00019         <span class="keywordtype">int</span>       gk_key;    <span class="comment">/* GeoKey ID        */</span>
<a name="l00020"></a>00020         <span class="keywordtype">size_t</span>    gk_size;   <span class="comment">/* data byte size   */</span>
<a name="l00021"></a>00021         tagtype_t gk_type;   <span class="comment">/* TIFF data type   */</span>
<a name="l00022"></a>00022         <span class="keywordtype">long</span>      gk_count;  <span class="comment">/* number of values */</span>
<a name="l00023"></a>00023         <span class="keywordtype">char</span>*     gk_data;   <span class="comment">/* pointer to data, or value */</span>
<a name="l00024"></a>00024 };
<a name="l00025"></a>00025 <span class="keyword">typedef</span> <span class="keyword">struct </span>GeoKey GeoKey;
<a name="l00026"></a>00026 
<a name="l00027"></a>00027 <span class="comment">/*</span>
<a name="l00028"></a>00028 <span class="comment"> *  This structure represents the file-organization of</span>
<a name="l00029"></a>00029 <span class="comment"> *  the key entry. Note that it assumes that short entries</span>
<a name="l00030"></a>00030 <span class="comment"> *  are aligned along 2-byte boundaries.</span>
<a name="l00031"></a>00031 <span class="comment"> */</span>
<a name="l00032"></a>00032 <span class="keyword">struct </span>KeyEntry {
<a name="l00033"></a>00033         pinfo_t ent_key;        <span class="comment">/* GeoKey ID            */</span>
<a name="l00034"></a>00034         pinfo_t ent_location;   <span class="comment">/* TIFF Tag ID or 0     */</span>
<a name="l00035"></a>00035         pinfo_t ent_count;      <span class="comment">/* GeoKey value count   */</span>
<a name="l00036"></a>00036         pinfo_t ent_val_offset; <span class="comment">/* value or tag offset  */</span>
<a name="l00037"></a>00037 };
<a name="l00038"></a>00038 <span class="keyword">typedef</span> <span class="keyword">struct </span>KeyEntry KeyEntry;
<a name="l00039"></a>00039 
<a name="l00040"></a>00040 <span class="comment">/*</span>
<a name="l00041"></a>00041 <span class="comment"> * This is the header of the CoordSystemInfoTag. The 'Version'</span>
<a name="l00042"></a>00042 <span class="comment"> *  will only change if the CoorSystemInfoTag structure changes;</span>
<a name="l00043"></a>00043 <span class="comment"> *  The Major Revision will be incremented whenever a new set of</span>
<a name="l00044"></a>00044 <span class="comment"> *  Keys is added or changed, while the Minor revision will be</span>
<a name="l00045"></a>00045 <span class="comment"> *  incremented when only the set of Key-values is increased.</span>
<a name="l00046"></a>00046 <span class="comment"> */</span>
<a name="l00047"></a>00047 <span class="keyword">struct </span>KeyHeader{
<a name="l00048"></a>00048         pinfo_t hdr_version;      <span class="comment">/* GeoTIFF Version          */</span>
<a name="l00049"></a>00049         pinfo_t hdr_rev_major;    <span class="comment">/* GeoKey Major Revision #  */</span>
<a name="l00050"></a>00050         pinfo_t hdr_rev_minor;    <span class="comment">/* GeoKey Minor Revision #  */</span>
<a name="l00051"></a>00051         pinfo_t hdr_num_keys;     <span class="comment">/* Number of GeoKeys        */</span>
<a name="l00052"></a>00052 };
<a name="l00053"></a>00053 <span class="keyword">typedef</span> <span class="keyword">struct </span>KeyHeader KeyHeader;
<a name="l00054"></a>00054 
<a name="l00055"></a>00055 <span class="comment">/*</span>
<a name="l00056"></a>00056 <span class="comment"> * This structure holds temporary data while reading or writing</span>
<a name="l00057"></a>00057 <span class="comment"> *  the tags.</span>
<a name="l00058"></a>00058 <span class="comment"> */</span>
<a name="l00059"></a>00059 <span class="keyword">struct </span>TempKeyData {
<a name="l00060"></a>00060     <span class="keywordtype">char</span>   *tk_asciiParams;
<a name="l00061"></a>00061     <span class="keywordtype">int</span>     tk_asciiParamsLength;
<a name="l00062"></a>00062     <span class="keywordtype">int</span>     tk_asciiParamsOffset;
<a name="l00063"></a>00063 };
<a name="l00064"></a>00064 <span class="keyword">typedef</span> <span class="keyword">struct </span>TempKeyData TempKeyData;
<a name="l00065"></a>00065 
<a name="l00066"></a>00066 
<a name="l00067"></a>00067 <span class="keyword">struct </span>gtiff {
<a name="l00068"></a>00068    tiff_t*    gt_tif;      <span class="comment">/* TIFF file descriptor  */</span>
<a name="l00069"></a>00069    <span class="keyword">struct </span>_TIFFMethod gt_methods;  <span class="comment">/* TIFF i/o methods      */</span>
<a name="l00070"></a>00070    <span class="keywordtype">int</span>        gt_flags;    <span class="comment">/* file flags            */</span>
<a name="l00071"></a>00071    
<a name="l00072"></a>00072    pinfo_t    gt_version;  <span class="comment">/* GeoTIFF Version       */</span>
<a name="l00073"></a>00073    pinfo_t    gt_rev_major;<span class="comment">/* GeoKey Key Revision   */</span>
<a name="l00074"></a>00074    pinfo_t    gt_rev_minor;<span class="comment">/* GeoKey Code Revision  */</span>
<a name="l00075"></a>00075    
<a name="l00076"></a>00076    <span class="keywordtype">int</span>        gt_num_keys; <span class="comment">/* number of keys        */</span>
<a name="l00077"></a>00077    GeoKey*    gt_keys;     <span class="comment">/* array of keys         */</span>
<a name="l00078"></a>00078    <span class="keywordtype">int</span>*       gt_keyindex; <span class="comment">/* index of a key, if set*/</span>
<a name="l00079"></a>00079    <span class="keywordtype">int</span>        gt_keymin;   <span class="comment">/* smallest key set      */</span>
<a name="l00080"></a>00080    <span class="keywordtype">int</span>        gt_keymax;   <span class="comment">/* largest key set       */</span>
<a name="l00081"></a>00081    
<a name="l00082"></a>00082    pinfo_t*   gt_short;    <span class="comment">/* array of SHORT vals   */</span>
<a name="l00083"></a>00083    <span class="keywordtype">double</span>*    gt_double;   <span class="comment">/* array of DOUBLE vals  */</span>
<a name="l00084"></a>00084    <span class="keywordtype">int</span>        gt_nshorts;  <span class="comment">/* number of SHORT vals  */</span>
<a name="l00085"></a>00085    <span class="keywordtype">int</span>        gt_ndoubles; <span class="comment">/* number of DOUBLE vals */</span>
<a name="l00086"></a>00086 };  
<a name="l00087"></a>00087 
<a name="l00088"></a>00088 <span class="keyword">typedef</span> <span class="keyword">enum</span> {
<a name="l00089"></a>00089         FLAG_FILE_OPEN=1,
<a name="l00090"></a>00090         FLAG_FILE_MODIFIED=2
<a name="l00091"></a>00091 } gtiff_flags;
<a name="l00092"></a>00092 
<a name="l00093"></a>00093 <span class="preprocessor">#define MAX_KEYINDEX 65535   </span><span class="comment">/* largest possible key    */</span>
<a name="l00094"></a>00094 <span class="preprocessor">#define MAX_KEYS 100         </span><span class="comment">/* maximum keys in a file  */</span>
<a name="l00095"></a>00095 <span class="preprocessor">#define MAX_VALUES 1000      </span><span class="comment">/* maximum values in a tag */</span>
<a name="l00096"></a>00096 
<a name="l00097"></a>00097 <span class="preprocessor">#endif </span><span class="comment">/* __geo_keyp_h_ */</span>
<a name="l00098"></a>00098 
</pre></div></div>
<hr size="1"><address style="text-align: right;"><small>
Generated for libgeotiff by&nbsp;<a href="http://www.doxygen.org/
index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 
1.5.9</small></address>
</body>
</html>