Sophie

Sophie

distrib > Mageia > 5 > x86_64 > media > core-release > by-pkgid > 1113753f4f1993337154e9a221eac889 > files > 42

geotiff-1.2.5-9.mga5.x86_64.rpm

<!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"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.8"/>
<title>libgeotiff: geotiff.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">libgeotiff
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.8 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;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 id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">geotiff.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &quot;geo_config.h&quot;</code><br />
<code>#include &quot;geokeys.h&quot;</code><br />
</div>
<p><a href="geotiff_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a67d3b43f2a73c0129f8346804e2d038c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structgtiff.html">GTIF</a> CPL_DLL *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="geotiff_8h.html#a67d3b43f2a73c0129f8346804e2d038c">GTIFNew</a> (void *tif)</td></tr>
<tr class="separator:a67d3b43f2a73c0129f8346804e2d038c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac9c0043c33ec4e16361d61e1ed79e96f"><td class="memItemLeft" align="right" valign="top">void CPL_DLL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="geotiff_8h.html#ac9c0043c33ec4e16361d61e1ed79e96f">GTIFFree</a> (<a class="el" href="structgtiff.html">GTIF</a> *gtif)</td></tr>
<tr class="separator:ac9c0043c33ec4e16361d61e1ed79e96f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3fa3e3e55cf8ddb6aa035b8f17a25f35"><td class="memItemLeft" align="right" valign="top">int CPL_DLL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="geotiff_8h.html#a3fa3e3e55cf8ddb6aa035b8f17a25f35">GTIFWriteKeys</a> (<a class="el" href="structgtiff.html">GTIF</a> *gtif)</td></tr>
<tr class="separator:a3fa3e3e55cf8ddb6aa035b8f17a25f35"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab458fd42dd037d86ddc2d74758588903"><td class="memItemLeft" align="right" valign="top">int CPL_DLL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="geotiff_8h.html#ab458fd42dd037d86ddc2d74758588903">GTIFKeyGet</a> (<a class="el" href="structgtiff.html">GTIF</a> *gtif, geokey_t key, void *val, int index, int count)</td></tr>
<tr class="separator:ab458fd42dd037d86ddc2d74758588903"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a642241ece835de8b4dd1be0a656df8a5"><td class="memItemLeft" align="right" valign="top">int CPL_DLL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="geotiff_8h.html#a642241ece835de8b4dd1be0a656df8a5">GTIFKeySet</a> (<a class="el" href="structgtiff.html">GTIF</a> *gtif, geokey_t keyID, tagtype_t type, int count,...)</td></tr>
<tr class="separator:a642241ece835de8b4dd1be0a656df8a5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae21e795fb9ef06021b08861f0c8f98be"><td class="memItemLeft" align="right" valign="top">int CPL_DLL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="geotiff_8h.html#ae21e795fb9ef06021b08861f0c8f98be">GTIFImageToPCS</a> (<a class="el" href="structgtiff.html">GTIF</a> *gtif, double *x, double *y)</td></tr>
<tr class="separator:ae21e795fb9ef06021b08861f0c8f98be"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab31b8a0715726a108e9779c009efd425"><td class="memItemLeft" align="right" valign="top">int CPL_DLL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="geotiff_8h.html#ab31b8a0715726a108e9779c009efd425">GTIFPCSToImage</a> (<a class="el" href="structgtiff.html">GTIF</a> *gtif, double *x, double *y)</td></tr>
<tr class="separator:ab31b8a0715726a108e9779c009efd425"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Primary libgeotiff include file.</p>
<p>This is the defacto registry for valid GEOTIFF GeoKeys and their associated symbolic values. This is also the only file of the GeoTIFF library which needs to be included in client source code. </p>
</div><h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ac9c0043c33ec4e16361d61e1ed79e96f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CPL_DLL GTIFFree </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structgtiff.html">GTIF</a> *&#160;</td>
          <td class="paramname"><em>gtif</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function deallocates an existing GeoTIFF access handle previously created with <a class="el" href="geotiff_8h.html#a67d3b43f2a73c0129f8346804e2d038c">GTIFNew()</a>. If the handle was used to write GeoTIFF keys to the TIFF file, the <a class="el" href="geotiff_8h.html#a3fa3e3e55cf8ddb6aa035b8f17a25f35">GTIFWriteKeys()</a> function should be used to flush results to the file before calling <a class="el" href="geotiff_8h.html#ac9c0043c33ec4e16361d61e1ed79e96f">GTIFFree()</a>. <a class="el" href="geotiff_8h.html#ac9c0043c33ec4e16361d61e1ed79e96f">GTIFFree()</a> should be called before <a class="el" href="xtiffio_8h.html#a9fa88015726dd9c805368e7623d7e86a">XTIFFClose()</a> is called on the corresponding TIFF file handle.</p>

</div>
</div>
<a class="anchor" id="ae21e795fb9ef06021b08861f0c8f98be"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int CPL_DLL GTIFImageToPCS </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structgtiff.html">GTIF</a> *&#160;</td>
          <td class="paramname"><em>gtif</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double *&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double *&#160;</td>
          <td class="paramname"><em>y</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Translate a pixel/line coordinate to projection coordinates.</p>
<p>At this time this function does not support image to PCS translations for tiepoints-only definitions, only pixelscale and transformation matrix formulations.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">gtif</td><td>The handle from <a class="el" href="geotiff_8h.html#a67d3b43f2a73c0129f8346804e2d038c">GTIFNew()</a> indicating the target file. </td></tr>
    <tr><td class="paramname">x</td><td>A pointer to the double containing the pixel offset on input, and into which the easting/longitude will be put on completion. </td></tr>
    <tr><td class="paramname">y</td><td>A pointer to the double containing the line offset on input, and into which the northing/latitude will be put on completion.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>TRUE if the transformation succeeds, or FALSE if it fails. It may fail if the file doesn't have properly setup transformation information, or it is in a form unsupported by this function. </dd></dl>

</div>
</div>
<a class="anchor" id="ab458fd42dd037d86ddc2d74758588903"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int CPL_DLL GTIFKeyGet </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structgtiff.html">GTIF</a> *&#160;</td>
          <td class="paramname"><em>gtif</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">geokey_t&#160;</td>
          <td class="paramname"><em>thekey</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>val</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>index</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>count</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function reads the value of a single <a class="el" href="structGeoKey.html">GeoKey</a> from a GeoTIFF file.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">gtif</td><td>The geotiff information handle from <a class="el" href="geotiff_8h.html#a67d3b43f2a73c0129f8346804e2d038c">GTIFNew()</a>.</td></tr>
    <tr><td class="paramname">thekey</td><td>The geokey_t name (such as ProjectedCSTypeGeoKey). This must come from the list of legal geokey_t values (an enumeration) listed below.</td></tr>
    <tr><td class="paramname">val</td><td>The <b>val</b> argument is a pointer to the variable into which the value should be read. The type of the variable varies depending on the geokey_t given. While there is no ready mapping of geokey_t values onto types, in general code values are of type <em>short</em>, citations are strings, and everything else is of type <em>double</em>. Note that pointer's to <em>int</em> should never be passed to <a class="el" href="geotiff_8h.html#ab458fd42dd037d86ddc2d74758588903">GTIFKeyGet()</a> for integer values as they will be shorts, and the int's may not be properly initialized (and will be grossly wrong on MSB systems).</td></tr>
    <tr><td class="paramname">index</td><td>Indicates how far into the list of values for this geokey to offset. Should normally be zero.</td></tr>
    <tr><td class="paramname">count</td><td>Indicates how many values to read. At this time all keys except for strings have only one value, so <b>index</b> should be zero, and <b>count</b> should be one.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The <a class="el" href="geotiff_8h.html#ab458fd42dd037d86ddc2d74758588903">GTIFKeyGet()</a> function returns the number of values read. Normally this would be one if successful or zero if the key doesn't exist for this file.</dd></dl>
<p>From geokeys.inc we see the following geokey_t values are possible:</p>
<pre>
&ndash; 6.2.1 GeoTIFF Configuration Keys &ndash;</pre><pre>ValuePair(  GTModelTypeGeoKey,  1024) &ndash; Section 6.3.1.1 Codes       &ndash;
ValuePair(  GTRasterTypeGeoKey, 1025) &ndash; Section 6.3.1.2 Codes       &ndash;
ValuePair(  GTCitationGeoKey,   1026) &ndash; documentation &ndash;</pre><pre>&ndash; 6.2.2 Geographic CS Parameter Keys &ndash;</pre><pre>ValuePair(  GeographicTypeGeoKey,   2048) &ndash; Section 6.3.2.1 Codes     &ndash;
ValuePair(  GeogCitationGeoKey, 2049) &ndash; documentation             &ndash;
ValuePair(  GeogGeodeticDatumGeoKey,    2050) &ndash; Section 6.3.2.2 Codes     &ndash;
ValuePair(  GeogPrimeMeridianGeoKey,    2051) &ndash; Section 6.3.2.4 codes     &ndash;
ValuePair(  GeogLinearUnitsGeoKey,  2052) &ndash; Section 6.3.1.3 Codes     &ndash;
ValuePair(  GeogLinearUnitSizeGeoKey,   2053) &ndash; meters                    &ndash;
ValuePair(  GeogAngularUnitsGeoKey, 2054) &ndash; Section 6.3.1.4 Codes     &ndash;
ValuePair(  GeogAngularUnitSizeGeoKey,  2055) &ndash; radians                   &ndash;
ValuePair(  GeogEllipsoidGeoKey,    2056) &ndash; Section 6.3.2.3 Codes     &ndash;
ValuePair(  GeogSemiMajorAxisGeoKey,    2057) &ndash; GeogLinearUnits           &ndash;
ValuePair(  GeogSemiMinorAxisGeoKey,    2058) &ndash; GeogLinearUnits           &ndash;
ValuePair(  GeogInvFlatteningGeoKey,    2059) &ndash; ratio                     &ndash;
ValuePair(  GeogAzimuthUnitsGeoKey, 2060) &ndash; Section 6.3.1.4 Codes     &ndash;
ValuePair(  GeogPrimeMeridianLongGeoKey,    2061) &ndash; GeoAngularUnit            &ndash;</pre><pre>&ndash; 6.2.3 Projected CS Parameter Keys &ndash;
&ndash;    Several keys have been renamed,&ndash;
&ndash;    and the deprecated names aliased for backward compatibility &ndash;</pre><pre>ValuePair(  ProjectedCSTypeGeoKey,  3072)     &ndash; Section 6.3.3.1 codes   &ndash;
ValuePair(  PCSCitationGeoKey,  3073)     &ndash; documentation           &ndash;
ValuePair(  ProjectionGeoKey,   3074)     &ndash; Section 6.3.3.2 codes   &ndash;
ValuePair(  ProjCoordTransGeoKey,   3075)     &ndash; Section 6.3.3.3 codes   &ndash;
ValuePair(  ProjLinearUnitsGeoKey,  3076)     &ndash; Section 6.3.1.3 codes   &ndash;
ValuePair(  ProjLinearUnitSizeGeoKey,   3077)     &ndash; meters                  &ndash;
ValuePair(  ProjStdParallel1GeoKey, 3078)     &ndash; GeogAngularUnit &ndash;
ValuePair(  ProjStdParallelGeoKey,ProjStdParallel1GeoKey) &ndash; ** alias **   &ndash;
ValuePair(  ProjStdParallel2GeoKey, 3079)     &ndash; GeogAngularUnit &ndash;
ValuePair(  ProjNatOriginLongGeoKey,    3080)     &ndash; GeogAngularUnit &ndash;
ValuePair(  ProjOriginLongGeoKey,ProjNatOriginLongGeoKey) &ndash; ** alias **     &ndash;
ValuePair(  ProjNatOriginLatGeoKey, 3081)     &ndash; GeogAngularUnit &ndash;
ValuePair(  ProjOriginLatGeoKey,ProjNatOriginLatGeoKey)   &ndash; ** alias **     &ndash;
ValuePair(  ProjFalseEastingGeoKey, 3082)     &ndash; ProjLinearUnits &ndash;
ValuePair(  ProjFalseNorthingGeoKey,    3083)     &ndash; ProjLinearUnits &ndash;
ValuePair(  ProjFalseOriginLongGeoKey,  3084)     &ndash; GeogAngularUnit &ndash;
ValuePair(  ProjFalseOriginLatGeoKey,   3085)     &ndash; GeogAngularUnit &ndash;
ValuePair(  ProjFalseOriginEastingGeoKey,   3086)     &ndash; ProjLinearUnits &ndash;
ValuePair(  ProjFalseOriginNorthingGeoKey,  3087)     &ndash; ProjLinearUnits &ndash;
ValuePair(  ProjCenterLongGeoKey,   3088)     &ndash; GeogAngularUnit &ndash;
ValuePair(  ProjCenterLatGeoKey,    3089)     &ndash; GeogAngularUnit &ndash;
ValuePair(  ProjCenterEastingGeoKey,    3090)     &ndash; ProjLinearUnits &ndash;
ValuePair(  ProjCenterNorthingGeoKey,   3091)     &ndash; ProjLinearUnits &ndash;
ValuePair(  ProjScaleAtNatOriginGeoKey, 3092)     &ndash; ratio   &ndash;
ValuePair(  ProjScaleAtOriginGeoKey,ProjScaleAtNatOriginGeoKey)  &ndash; ** alias **   &ndash;
ValuePair(  ProjScaleAtCenterGeoKey,    3093)     &ndash; ratio   &ndash;
ValuePair(  ProjAzimuthAngleGeoKey, 3094)     &ndash; GeogAzimuthUnit &ndash;
ValuePair(  ProjStraightVertPoleLongGeoKey, 3095)     &ndash; GeogAngularUnit &ndash;</pre><pre> 6.2.4 Vertical CS Keys</pre><pre>ValuePair(  VerticalCSTypeGeoKey,   4096)  &ndash; Section 6.3.4.1 codes   &ndash;
ValuePair(  VerticalCitationGeoKey, 4097)  &ndash; documentation &ndash;
ValuePair(  VerticalDatumGeoKey,    4098)  &ndash; Section 6.3.4.2 codes   &ndash;
ValuePair(  VerticalUnitsGeoKey,    4099)  &ndash; Section 6.3.1 (.x) codes   &ndash;
</pre> 
</div>
</div>
<a class="anchor" id="a642241ece835de8b4dd1be0a656df8a5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int CPL_DLL GTIFKeySet </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structgtiff.html">GTIF</a> *&#160;</td>
          <td class="paramname"><em>gtif</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">geokey_t&#160;</td>
          <td class="paramname"><em>keyID</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">tagtype_t&#160;</td>
          <td class="paramname"><em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>count</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>...</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function writes a geokey_t value to a GeoTIFF file.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">gtif</td><td>The geotiff information handle from <a class="el" href="geotiff_8h.html#a67d3b43f2a73c0129f8346804e2d038c">GTIFNew()</a>.</td></tr>
    <tr><td class="paramname">keyID</td><td>The geokey_t name (such as ProjectedCSTypeGeoKey). This must come from the list of legal geokey_t values (an enumeration) listed below.</td></tr>
    <tr><td class="paramname">val</td><td>The <b>val</b> argument is a pointer to the variable into which the value should be read. The type of the variable varies depending on the geokey_t given. While there is no ready mapping of geokey_t values onto types, in general code values are of type <em>short</em>, citations are strings, and everything else is of type <em>double</em>. Note that pointer's to <em>int</em> should never be passed to <a class="el" href="geotiff_8h.html#ab458fd42dd037d86ddc2d74758588903">GTIFKeyGet()</a> for integer values as they will be shorts, and the int's may not be properly initialized (and will be grossly wrong on MSB systems).</td></tr>
    <tr><td class="paramname">index</td><td>Indicates how far into the list of values for this geokey to offset. Should normally be zero.</td></tr>
    <tr><td class="paramname">count</td><td>Indicates how many values to read. At this time all keys except for strings have only one value, so <b>index</b> should be zero, and <b>count</b> should be one.</td></tr>
  </table>
  </dd>
</dl>
<p>The <b>key</b> indicates the key name to be written to the file and should from the geokey_t enumeration (eg. <code>ProjectedCSTypeGeoKey</code>). The full list of possible geokey_t values can be found in geokeys.inc, or in the online documentation for <a class="el" href="geotiff_8h.html#ab458fd42dd037d86ddc2d74758588903">GTIFKeyGet()</a>.</p>
<p>The <b>type</b> should be one of TYPE_SHORT, TYPE_ASCII, or TYPE_DOUBLE and will indicate the type of value being passed at the end of the argument list (the key value). The <b>count</b> should be one except for strings when it should be the length of the string (or zero to for this to be computed internally). As a special case a <b>count</b> of -1 can be used to request an existing key be deleted, in which no value is passed.</p>
<p>The actual value is passed at the end of the argument list, and should be a short, a double, or a char * value. Note that short and double values are passed by value rather than as pointers when count is 1, but as pointers if count is larger than 1.</p>
<p>Note that key values aren't actually flushed to the file until <a class="el" href="geotiff_8h.html#a3fa3e3e55cf8ddb6aa035b8f17a25f35">GTIFWriteKeys()</a> is called. Till then the new values are just kept with the GTIF structure.</p>
<p><b>Example:</b></p>
<pre>
    GTIFKeySet(gtif, GTRasterTypeGeoKey, TYPE_SHORT, 1, 
               RasterPixelIsArea);
    GTIFKeySet(gtif, GTCitationGeoKey, TYPE_ASCII, 0, 
               "UTM 11 North / NAD27" );
</pre> 
</div>
</div>
<a class="anchor" id="a67d3b43f2a73c0129f8346804e2d038c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structgtiff.html">GTIF</a> CPL_DLL* GTIFNew </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>tif</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Given an open TIFF file, look for GTIF keys and values and return GTIF structure.</p>
<p>This function creates a GeoTIFF information interpretation handle (GTIF *) based on a passed in TIFF handle originally from <a class="el" href="xtiffio_8h.html#a0191e91b25f6a5f3f00806be37bf96c4">XTIFFOpen()</a>. Even though the argument (<b>tif</b>) is shown as type <code>void *</code>, it is really normally of type <code>TIFF *</code>.</p>
<p>The returned GTIF handle can be used to read or write GeoTIFF tags using the various GTIF functions. The handle should be destroyed using <a class="el" href="geotiff_8h.html#ac9c0043c33ec4e16361d61e1ed79e96f">GTIFFree()</a> before the file is closed with TIFFClose().</p>
<p>If the file accessed has no GeoTIFF keys, an valid (but empty) GTIF is still returned. <a class="el" href="geotiff_8h.html#a67d3b43f2a73c0129f8346804e2d038c">GTIFNew()</a> is used both for existing files being read, and for new TIFF files that will have GeoTIFF tags written to them.</p>

</div>
</div>
<a class="anchor" id="ab31b8a0715726a108e9779c009efd425"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int CPL_DLL GTIFPCSToImage </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structgtiff.html">GTIF</a> *&#160;</td>
          <td class="paramname"><em>gtif</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double *&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double *&#160;</td>
          <td class="paramname"><em>y</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Translate a projection coordinate to pixel/line coordinates.</p>
<p>At this time this function does not support PCS to image translations for tiepoints-only based definitions, only matrix and pixelscale/tiepoints formulations are supposed.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">gtif</td><td>The handle from <a class="el" href="geotiff_8h.html#a67d3b43f2a73c0129f8346804e2d038c">GTIFNew()</a> indicating the target file. </td></tr>
    <tr><td class="paramname">x</td><td>A pointer to the double containing the pixel offset on input, and into which the easting/longitude will be put on completion. </td></tr>
    <tr><td class="paramname">y</td><td>A pointer to the double containing the line offset on input, and into which the northing/latitude will be put on completion.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>TRUE if the transformation succeeds, or FALSE if it fails. It may fail if the file doesn't have properly setup transformation information, or it is in a form unsupported by this function. </dd></dl>

</div>
</div>
<a class="anchor" id="a3fa3e3e55cf8ddb6aa035b8f17a25f35"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int CPL_DLL GTIFWriteKeys </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structgtiff.html">GTIF</a> *&#160;</td>
          <td class="paramname"><em>gt</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function flushes all the GeoTIFF keys that have been set with the <a class="el" href="geotiff_8h.html#a642241ece835de8b4dd1be0a656df8a5">GTIFKeySet()</a> function into the associated TIFF file.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">gt</td><td>The GeoTIFF handle returned by GTIFNew.</td></tr>
  </table>
  </dd>
</dl>
<p><a class="el" href="geotiff_8h.html#a3fa3e3e55cf8ddb6aa035b8f17a25f35">GTIFWriteKeys()</a> should be called before <a class="el" href="geotiff_8h.html#ac9c0043c33ec4e16361d61e1ed79e96f">GTIFFree()</a> is used to deallocate a GeoTIFF access handle. </p>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Thu Oct 16 2014 11:17:58 for libgeotiff by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.8
</small></address>
</body>
</html>