<!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_normalize.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 Page</span></a></li> <li><a href="pages.html"><span>Related 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 List</span></a></li> <li><a href="globals.html"><span>File Members</span></a></li> </ul> </div> <h1>geo_normalize.h</h1><a href="geo__normalize_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/******************************************************************************</span> <a name="l00002"></a>00002 <span class="comment"> * $Id: geo_normalize.h,v 1.13 2008/05/21 04:12:57 fwarmerdam Exp $</span> <a name="l00003"></a>00003 <span class="comment"> *</span> <a name="l00004"></a>00004 <span class="comment"> * Project: libgeotiff</span> <a name="l00005"></a>00005 <span class="comment"> * Purpose: Include file related to geo_normalize.c containing Code to</span> <a name="l00006"></a>00006 <span class="comment"> * normalize PCS and other composite codes in a GeoTIFF file.</span> <a name="l00007"></a>00007 <span class="comment"> * Author: Frank Warmerdam, warmerda@home.com</span> <a name="l00008"></a>00008 <span class="comment"> *</span> <a name="l00009"></a>00009 <span class="comment"> ******************************************************************************</span> <a name="l00010"></a>00010 <span class="comment"> * Copyright (c) 1999, Frank Warmerdam</span> <a name="l00011"></a>00011 <span class="comment"> *</span> <a name="l00012"></a>00012 <span class="comment"> * Permission is hereby granted, free of charge, to any person obtaining a</span> <a name="l00013"></a>00013 <span class="comment"> * copy of this software and associated documentation files (the "Software"),</span> <a name="l00014"></a>00014 <span class="comment"> * to deal in the Software without restriction, including without limitation</span> <a name="l00015"></a>00015 <span class="comment"> * the rights to use, copy, modify, merge, publish, distribute, sublicense,</span> <a name="l00016"></a>00016 <span class="comment"> * and/or sell copies of the Software, and to permit persons to whom the</span> <a name="l00017"></a>00017 <span class="comment"> * Software is furnished to do so, subject to the following conditions:</span> <a name="l00018"></a>00018 <span class="comment"> *</span> <a name="l00019"></a>00019 <span class="comment"> * The above copyright notice and this permission notice shall be included</span> <a name="l00020"></a>00020 <span class="comment"> * in all copies or substantial portions of the Software.</span> <a name="l00021"></a>00021 <span class="comment"> *</span> <a name="l00022"></a>00022 <span class="comment"> * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS</span> <a name="l00023"></a>00023 <span class="comment"> * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,</span> <a name="l00024"></a>00024 <span class="comment"> * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL</span> <a name="l00025"></a>00025 <span class="comment"> * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER</span> <a name="l00026"></a>00026 <span class="comment"> * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING</span> <a name="l00027"></a>00027 <span class="comment"> * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER</span> <a name="l00028"></a>00028 <span class="comment"> * DEALINGS IN THE SOFTWARE.</span> <a name="l00029"></a>00029 <span class="comment"> ******************************************************************************</span> <a name="l00030"></a>00030 <span class="comment"> *</span> <a name="l00031"></a>00031 <span class="comment"> * $Log: geo_normalize.h,v $</span> <a name="l00032"></a>00032 <span class="comment"> * Revision 1.13 2008/05/21 04:12:57 fwarmerdam</span> <a name="l00033"></a>00033 <span class="comment"> * added preliminary GTIFSetFromProj4() support</span> <a name="l00034"></a>00034 <span class="comment"> *</span> <a name="l00035"></a>00035 <span class="comment"> * Revision 1.12 2005/08/26 16:08:14 fwarmerdam</span> <a name="l00036"></a>00036 <span class="comment"> * Include void in empty argument list for prototype.</span> <a name="l00037"></a>00037 <span class="comment"> *</span> <a name="l00038"></a>00038 <span class="comment"> * Revision 1.11 2004/02/03 17:19:50 warmerda</span> <a name="l00039"></a>00039 <span class="comment"> * export GTIFAngleToDD() - used by GDAL mrsiddataset.cpp</span> <a name="l00040"></a>00040 <span class="comment"> *</span> <a name="l00041"></a>00041 <span class="comment"> * Revision 1.10 2003/01/15 04:39:16 warmerda</span> <a name="l00042"></a>00042 <span class="comment"> * Added GTIFDeaccessCSV</span> <a name="l00043"></a>00043 <span class="comment"> *</span> <a name="l00044"></a>00044 <span class="comment"> * Revision 1.9 2003/01/15 03:37:40 warmerda</span> <a name="l00045"></a>00045 <span class="comment"> * added GTIFFreeMemory()</span> <a name="l00046"></a>00046 <span class="comment"> *</span> <a name="l00047"></a>00047 <span class="comment"> * Revision 1.8 2002/11/28 22:27:42 warmerda</span> <a name="l00048"></a>00048 <span class="comment"> * preliminary upgrade to EPSG 6.2.2 tables</span> <a name="l00049"></a>00049 <span class="comment"> *</span> <a name="l00050"></a>00050 <span class="comment"> * Revision 1.7 1999/09/17 00:55:26 warmerda</span> <a name="l00051"></a>00051 <span class="comment"> * added GTIFGetUOMAngleInfo(), and UOMAngle in GTIFDefn</span> <a name="l00052"></a>00052 <span class="comment"> *</span> <a name="l00053"></a>00053 <span class="comment"> * Revision 1.6 1999/05/04 03:13:42 warmerda</span> <a name="l00054"></a>00054 <span class="comment"> * Added prototype</span> <a name="l00055"></a>00055 <span class="comment"> *</span> <a name="l00056"></a>00056 <span class="comment"> * Revision 1.5 1999/04/29 23:02:55 warmerda</span> <a name="l00057"></a>00057 <span class="comment"> * added docs, and MapSys related stuff</span> <a name="l00058"></a>00058 <span class="comment"> *</span> <a name="l00059"></a>00059 <span class="comment"> * Revision 1.4 1999/03/18 21:35:19 geotiff</span> <a name="l00060"></a>00060 <span class="comment"> * Added PROJ.4 related stuff</span> <a name="l00061"></a>00061 <span class="comment"> *</span> <a name="l00062"></a>00062 <span class="comment"> * Revision 1.3 1999/03/17 20:44:04 geotiff</span> <a name="l00063"></a>00063 <span class="comment"> * added CPL_DLL related support</span> <a name="l00064"></a>00064 <span class="comment"> *</span> <a name="l00065"></a>00065 <span class="comment"> * Revision 1.2 1999/03/10 18:24:06 geotiff</span> <a name="l00066"></a>00066 <span class="comment"> * corrected to use int'</span> <a name="l00067"></a>00067 <span class="comment"> *</span> <a name="l00068"></a>00068 <span class="comment"> */</span> <a name="l00069"></a>00069 <a name="l00070"></a>00070 <span class="preprocessor">#ifndef GEO_NORMALIZE_H_INCLUDED</span> <a name="l00071"></a>00071 <span class="preprocessor"></span><span class="preprocessor">#define GEO_NORMALIZE_H_INCLUDED</span> <a name="l00072"></a>00072 <span class="preprocessor"></span> <a name="l00073"></a>00073 <span class="preprocessor">#include <stdio.h></span> <a name="l00074"></a>00074 <span class="preprocessor">#include "<a class="code" href="geotiff_8h.html">geotiff.h</a>"</span> <a name="l00075"></a>00075 <a name="l00076"></a>00076 <span class="preprocessor">#ifdef __cplusplus</span> <a name="l00077"></a>00077 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">"C"</span> { <a name="l00078"></a>00078 <span class="preprocessor">#endif</span> <a name="l00079"></a>00079 <span class="preprocessor"></span> <a name="l00086"></a>00086 <span class="preprocessor">#define MAX_GTIF_PROJPARMS 10</span> <a name="l00087"></a>00087 <span class="preprocessor"></span> <a name="l00092"></a><a class="code" href="structGTIFDefn.html">00092</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{ <a name="l00095"></a><a class="code" href="structGTIFDefn.html#01850dacb84e8905ce4c99fc54aba157">00095</a> <span class="keywordtype">short</span> Model; <a name="l00096"></a>00096 <a name="l00098"></a><a class="code" href="structGTIFDefn.html#e757491b5ee37c9842a8a8b9d2897ee9">00098</a> <span class="keywordtype">short</span> PCS; <a name="l00099"></a>00099 <a name="l00102"></a><a class="code" href="structGTIFDefn.html#50b4fcb6e99e0ff1cf1c17e48d300f0e">00102</a> <span class="keywordtype">short</span> GCS; <a name="l00103"></a>00103 <a name="l00105"></a><a class="code" href="structGTIFDefn.html#65a33a510b68b57bcb94e43b1545af01">00105</a> <span class="keywordtype">short</span> UOMLength; <a name="l00106"></a>00106 <a name="l00108"></a><a class="code" href="structGTIFDefn.html#4b7ae80e2f50a2f523af23724bbcc337">00108</a> <span class="keywordtype">double</span> UOMLengthInMeters; <a name="l00109"></a>00109 <a name="l00111"></a><a class="code" href="structGTIFDefn.html#474820bfad647ce54d89df9b59dcb418">00111</a> <span class="keywordtype">short</span> UOMAngle; <a name="l00112"></a>00112 <a name="l00114"></a><a class="code" href="structGTIFDefn.html#7ba067825990b7e4249a816e53793758">00114</a> <span class="keywordtype">double</span> UOMAngleInDegrees; <a name="l00115"></a>00115 <a name="l00117"></a><a class="code" href="structGTIFDefn.html#e0123d03b8c54502c708b1527e0db68e">00117</a> <span class="keywordtype">short</span> Datum; <a name="l00118"></a>00118 <a name="l00121"></a><a class="code" href="structGTIFDefn.html#d0f07cfbc769bc04e3a01cf74b0d30c2">00121</a> <span class="keywordtype">short</span> PM; <a name="l00122"></a>00122 <a name="l00125"></a><a class="code" href="structGTIFDefn.html#86883237779a3889471a80ffab94fbf1">00125</a> <span class="keywordtype">double</span> PMLongToGreenwich; <a name="l00126"></a>00126 <a name="l00129"></a><a class="code" href="structGTIFDefn.html#e8f1893133056039de76577140c323a8">00129</a> <span class="keywordtype">short</span> Ellipsoid; <a name="l00130"></a>00130 <a name="l00132"></a><a class="code" href="structGTIFDefn.html#dbf867f6d777826904646508200da63f">00132</a> <span class="keywordtype">double</span> SemiMajor; <a name="l00133"></a>00133 <a name="l00135"></a><a class="code" href="structGTIFDefn.html#b4c0025f091c6e7ad0a549348bb4df51">00135</a> <span class="keywordtype">double</span> SemiMinor; <a name="l00136"></a>00136 <a name="l00138"></a><a class="code" href="structGTIFDefn.html#3c2fc10aeaf944f43cfefd06c31e72f2">00138</a> <span class="keywordtype">short</span> ProjCode; <a name="l00139"></a>00139 <a name="l00142"></a><a class="code" href="structGTIFDefn.html#b5c58e2bea809f5ff33c371e6a876ebb">00142</a> <span class="keywordtype">short</span> Projection; <a name="l00143"></a>00143 <a name="l00147"></a><a class="code" href="structGTIFDefn.html#eb532b6ad2b2979c693a4940c386e70c">00147</a> <span class="keywordtype">short</span> CTProjection; <a name="l00148"></a>00148 <a name="l00150"></a><a class="code" href="structGTIFDefn.html#6a0e98a86cefdf0a14a99865799de0ca">00150</a> <span class="keywordtype">int</span> nParms; <a name="l00151"></a>00151 <a name="l00156"></a><a class="code" href="structGTIFDefn.html#555f8d472808c2910fddf3269dd78d67">00156</a> <span class="keywordtype">double</span> ProjParm[MAX_GTIF_PROJPARMS]; <a name="l00157"></a>00157 <a name="l00160"></a><a class="code" href="structGTIFDefn.html#c0ba000217e21cd1a6ceac8a9944849a">00160</a> <span class="keywordtype">int</span> ProjParmId[MAX_GTIF_PROJPARMS]; <span class="comment">/* geokey identifier,</span> <a name="l00161"></a>00161 <span class="comment"> eg. ProjFalseEastingGeoKey*/</span> <a name="l00162"></a>00162 <a name="l00165"></a><a class="code" href="structGTIFDefn.html#b99fb2666bfafdfc2b4cd6815466a94b">00165</a> <span class="keywordtype">int</span> MapSys; <a name="l00166"></a>00166 <a name="l00168"></a><a class="code" href="structGTIFDefn.html#d85928b9e8f6f6cc14eb2618eeed73d8">00168</a> <span class="keywordtype">int</span> Zone; <a name="l00169"></a>00169 <a name="l00170"></a>00170 } <a class="code" href="structGTIFDefn.html">GTIFDefn</a>; <a name="l00171"></a>00171 <a name="l00172"></a>00172 <span class="keywordtype">int</span> CPL_DLL GTIFGetPCSInfo( <span class="keywordtype">int</span> nPCSCode, <span class="keywordtype">char</span> **ppszEPSGName, <a name="l00173"></a>00173 <span class="keywordtype">short</span> *pnProjOp, <a name="l00174"></a>00174 <span class="keywordtype">short</span> *pnUOMLengthCode, <span class="keywordtype">short</span> *pnGeogCS ); <a name="l00175"></a>00175 <span class="keywordtype">int</span> CPL_DLL GTIFGetProjTRFInfo( <span class="keywordtype">int</span> nProjTRFCode, <a name="l00176"></a>00176 <span class="keywordtype">char</span> ** ppszProjTRFName, <a name="l00177"></a>00177 <span class="keywordtype">short</span> * pnProjMethod, <a name="l00178"></a>00178 <span class="keywordtype">double</span> * padfProjParms ); <a name="l00179"></a>00179 <span class="keywordtype">int</span> CPL_DLL GTIFGetGCSInfo( <span class="keywordtype">int</span> nGCSCode, <span class="keywordtype">char</span> **ppszName, <a name="l00180"></a>00180 <span class="keywordtype">short</span> *pnDatum, <span class="keywordtype">short</span> *pnPM, <span class="keywordtype">short</span> *pnUOMAngle ); <a name="l00181"></a>00181 <span class="keywordtype">int</span> CPL_DLL GTIFGetDatumInfo( <span class="keywordtype">int</span> nDatumCode, <span class="keywordtype">char</span> **ppszName, <a name="l00182"></a>00182 <span class="keywordtype">short</span> * pnEllipsoid ); <a name="l00183"></a>00183 <span class="keywordtype">int</span> CPL_DLL GTIFGetEllipsoidInfo( <span class="keywordtype">int</span> nEllipsoid, <span class="keywordtype">char</span> ** ppszName, <a name="l00184"></a>00184 <span class="keywordtype">double</span> * pdfSemiMajor, <a name="l00185"></a>00185 <span class="keywordtype">double</span> * pdfSemiMinor ); <a name="l00186"></a>00186 <span class="keywordtype">int</span> CPL_DLL GTIFGetPMInfo( <span class="keywordtype">int</span> nPM, <span class="keywordtype">char</span> **ppszName, <a name="l00187"></a>00187 <span class="keywordtype">double</span> * pdfLongToGreenwich ); <a name="l00188"></a>00188 <a name="l00189"></a>00189 <span class="keywordtype">double</span> CPL_DLL GTIFAngleStringToDD( <span class="keyword">const</span> <span class="keywordtype">char</span> *pszAngle, <span class="keywordtype">int</span> nUOMAngle ); <a name="l00190"></a>00190 <span class="keywordtype">int</span> CPL_DLL GTIFGetUOMLengthInfo( <span class="keywordtype">int</span> nUOMLengthCode, <a name="l00191"></a>00191 <span class="keywordtype">char</span> **ppszUOMName, <a name="l00192"></a>00192 <span class="keywordtype">double</span> * pdfInMeters ); <a name="l00193"></a>00193 <span class="keywordtype">int</span> CPL_DLL GTIFGetUOMAngleInfo( <span class="keywordtype">int</span> nUOMAngleCode, <a name="l00194"></a>00194 <span class="keywordtype">char</span> **ppszUOMName, <a name="l00195"></a>00195 <span class="keywordtype">double</span> * pdfInDegrees ); <a name="l00196"></a>00196 <span class="keywordtype">double</span> CPL_DLL GTIFAngleToDD( <span class="keywordtype">double</span> dfAngle, <span class="keywordtype">int</span> nUOMAngle ); <a name="l00197"></a>00197 <a name="l00198"></a>00198 <a name="l00199"></a>00199 <span class="comment">/* this should be used to free strings returned by GTIFGet... funcs */</span> <a name="l00200"></a>00200 <span class="keywordtype">void</span> CPL_DLL GTIFFreeMemory( <span class="keywordtype">char</span> * ); <a name="l00201"></a>00201 <span class="keywordtype">void</span> CPL_DLL GTIFDeaccessCSV( <span class="keywordtype">void</span> ); <a name="l00202"></a>00202 <a name="l00203"></a>00203 <span class="keywordtype">int</span> CPL_DLL GTIFGetDefn( GTIF *psGTIF, <a class="code" href="structGTIFDefn.html">GTIFDefn</a> * psDefn ); <a name="l00204"></a>00204 <span class="keywordtype">void</span> CPL_DLL GTIFPrintDefn( <a class="code" href="structGTIFDefn.html">GTIFDefn</a> *, FILE * ); <a name="l00205"></a>00205 <span class="keywordtype">void</span> CPL_DLL GTIFFreeDefn( GTIF * ); <a name="l00206"></a>00206 <a name="l00207"></a>00207 <span class="keywordtype">void</span> CPL_DLL SetCSVFilenameHook( <span class="keyword">const</span> <span class="keywordtype">char</span> *(*CSVFileOverride)(<span class="keyword">const</span> <span class="keywordtype">char</span> *) ); <a name="l00208"></a>00208 <a name="l00209"></a>00209 <span class="keyword">const</span> <span class="keywordtype">char</span> CPL_DLL *GTIFDecToDMS( <span class="keywordtype">double</span>, <span class="keyword">const</span> <span class="keywordtype">char</span> *, <span class="keywordtype">int</span> ); <a name="l00210"></a>00210 <a name="l00211"></a>00211 <span class="comment">/*</span> <a name="l00212"></a>00212 <span class="comment"> * These are useful for recognising UTM and State Plane, with or without</span> <a name="l00213"></a>00213 <span class="comment"> * CSV files being found.</span> <a name="l00214"></a>00214 <span class="comment"> */</span> <a name="l00215"></a>00215 <a name="l00216"></a>00216 <span class="preprocessor">#define MapSys_UTM_North -9001</span> <a name="l00217"></a>00217 <span class="preprocessor"></span><span class="preprocessor">#define MapSys_UTM_South -9002</span> <a name="l00218"></a>00218 <span class="preprocessor"></span><span class="preprocessor">#define MapSys_State_Plane_27 -9003</span> <a name="l00219"></a>00219 <span class="preprocessor"></span><span class="preprocessor">#define MapSys_State_Plane_83 -9004</span> <a name="l00220"></a>00220 <span class="preprocessor"></span> <a name="l00221"></a>00221 <span class="keywordtype">int</span> CPL_DLL GTIFMapSysToPCS( <span class="keywordtype">int</span> MapSys, <span class="keywordtype">int</span> Datum, <span class="keywordtype">int</span> nZone ); <a name="l00222"></a>00222 <span class="keywordtype">int</span> CPL_DLL GTIFMapSysToProj( <span class="keywordtype">int</span> MapSys, <span class="keywordtype">int</span> nZone ); <a name="l00223"></a>00223 <span class="keywordtype">int</span> CPL_DLL GTIFPCSToMapSys( <span class="keywordtype">int</span> PCSCode, <span class="keywordtype">int</span> * pDatum, <span class="keywordtype">int</span> * pZone ); <a name="l00224"></a>00224 <span class="keywordtype">int</span> CPL_DLL GTIFProjToMapSys( <span class="keywordtype">int</span> ProjCode, <span class="keywordtype">int</span> * pZone ); <a name="l00225"></a>00225 <a name="l00226"></a>00226 <span class="comment">/*</span> <a name="l00227"></a>00227 <span class="comment"> * These are only useful if using libgeotiff with libproj (PROJ.4+).</span> <a name="l00228"></a>00228 <span class="comment"> */</span> <a name="l00229"></a>00229 <span class="keywordtype">char</span> CPL_DLL *GTIFGetProj4Defn( <a class="code" href="structGTIFDefn.html">GTIFDefn</a> * ); <a name="l00230"></a>00230 <a name="l00231"></a>00231 <span class="keywordtype">int</span> CPL_DLL GTIFProj4ToLatLong( <a class="code" href="structGTIFDefn.html">GTIFDefn</a> *, <span class="keywordtype">int</span>, <span class="keywordtype">double</span> *, <span class="keywordtype">double</span> * ); <a name="l00232"></a>00232 <span class="keywordtype">int</span> CPL_DLL GTIFProj4FromLatLong( <a class="code" href="structGTIFDefn.html">GTIFDefn</a> *, <span class="keywordtype">int</span>, <span class="keywordtype">double</span> *, <span class="keywordtype">double</span> * ); <a name="l00233"></a>00233 <a name="l00234"></a>00234 <span class="keywordtype">int</span> CPL_DLL GTIFSetFromProj4( GTIF *gtif, <span class="keyword">const</span> <span class="keywordtype">char</span> *proj4 ); <a name="l00235"></a>00235 <a name="l00236"></a>00236 <span class="preprocessor">#if defined(HAVE_LIBPROJ) && defined(HAVE_PROJECTS_H)</span> <a name="l00237"></a>00237 <span class="preprocessor"></span><span class="preprocessor"># define HAVE_GTIFPROJ4</span> <a name="l00238"></a>00238 <span class="preprocessor"></span><span class="preprocessor">#endif</span> <a name="l00239"></a>00239 <span class="preprocessor"></span> <a name="l00240"></a>00240 <span class="preprocessor">#ifdef __cplusplus</span> <a name="l00241"></a>00241 <span class="preprocessor"></span>} <a name="l00242"></a>00242 <span class="preprocessor">#endif</span> <a name="l00243"></a>00243 <span class="preprocessor"></span> <a name="l00244"></a>00244 <span class="preprocessor">#endif </span><span class="comment">/* ndef GEO_NORMALIZE_H_INCLUDED */</span> </pre></div></div> <hr size="1"><address style="text-align: right;"><small> Generated for libgeotiff by <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>