This file is indexed.

/usr/share/doc/geographiclib/html/start.html is in geographiclib-tools 1.21-1ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
<!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"/>
<title>GeographicLib: Getting started</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">GeographicLib
   &#160;<span id="projectnumber">1.21</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><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>
    </ul>
  </div>
</div>
<div class="header">
  <div class="headertitle">
<div class="title">Getting started </div>  </div>
</div>
<div class="contents">
<div class="textblock"><center> Back to <a class="el" href="install.html">Installing GeographicLib</a>. Forward to <a class="el" href="utilities.html">Utility programs</a>. Up to <a class="el" href="index.html#contents">Contents</a>. </center><p>Much (but not all!) of the useful functionality of GeographicLib is available via simple command line utilities. Interfaces to some of them are available via the web. See <a class="el" href="utilities.html">Utility programs</a> for documentation on these.</p>
<p>In order to use GeographicLib from C++ code, you will need to</p>
<ul>
<li>Include the header files for the GeographicLib classes in your code. E.g., <div class="fragment"><pre class="fragment"><span class="preprocessor">  #include &lt;<a class="code" href="LambertConformalConic_8hpp.html" title="Header for GeographicLib::LambertConformalConic class.">GeographicLib/LambertConformalConic.hpp</a>&gt;</span> 
</pre></div></li>
<li>Include the <a class="el" href="namespaceGeographicLib.html" title="Namespace for GeographicLib.">GeographicLib</a>:: namespace prefix to the GeographicLib classes, or include <div class="fragment"><pre class="fragment">  <span class="keyword">using namespace </span>GeographicLib; 
</pre></div> in your code.</li>
<li>Tell the compiler where to find the header files. With g++ and with /usr/local specified as the installation directory, this is accomplished with <div class="fragment"><pre class="fragment">
  g++ -c -g -O3 -I/usr/local/include testprogram.cpp
</pre></div> With Visual Studio, specify the include directory in the IDE via, e.g., <div class="fragment"><pre class="fragment">
C/C++ -&gt; General -&gt; Additional Include Directories = C:\pkg-vc10\GeographicLib\include
</pre></div></li>
<li>Tell the linker the name, Geographic, and location of the library. Using g++ as the linker, you would use <div class="fragment"><pre class="fragment">
  g++ -g -o testprogram testprogram.o -L/usr/local/lib -lGeographic
</pre></div> With Visual Studio, you supply this information in the IDE via, e.g., <div class="fragment"><pre class="fragment">
Linker -&gt; Input -&gt; Additional Dependencies = Geographic.lib
Linker -&gt; General -&gt; Additional Library Directories = C:\pkg-vc10\GeographicLib\lib
</pre></div> Note that the library name is <b>Geographic</b> and not GeographicLib. If the library was configured and built with cmake, then the debug version of the library is called Geographic_d.lib.</li>
<li>Tell the runtime environment where to find the shared library (assuming you compiled GeographicLib as a shared library). With g++, this is accomplished by modifying the link line above to read <div class="fragment"><pre class="fragment">
  g++ -g -o testprogram testprogram.o -Wl,-rpath=/usr/local/lib -L/usr/local/lib -lGeographic
</pre></div> (There are two other ways to specify the location of shared libraries at runtime: (1) define the environment variable <code>LD_LIBRARY_PATH</code> to be a colon-separated list of directories to search; (2) as <b>root</b>, specify /usr/local/lib as a directory searched by ldconfig(8).) On Windows, you need to ensure that Geographic.dll is in the same directory as your executable or else include the directory containing the dll in your <code>PATH</code>.</li>
<li>If you're using cmake to configure and build your project, then instead of the previous three steps, insert <div class="fragment"><pre class="fragment">
  # Put in your top-level CMakeLists.txt
  find_package (GeographicLib 1.9 REQUIRED)
  # In the top-level CMakeLists.txt or wherever your code is compiled
  include_directories (${GeographicLib_INCLUDE_DIRS})
  # In the CMakeLists.txt where you define your executable targets
  target_link_libraries (program1 ${GeographicLib_LIBRARIES})
  target_link_libraries (program2 ${GeographicLib_LIBRARIES}) </pre></div> in your CMakeLists.txt files (as noted). find_package command should find the library and set the required cmake variables (including <code>GEOGRAPHICLIB_FOUND = TRUE</code>). For find_package to be able to locate GeographicLib, it may be necessary for GeographicLib to be built and installed with cmake (see <a class="el" href="install.html#cmake">Installation with cmake</a>) instead of using some other installation method. In addition, on Windows systems, you should specify <code>CMAKE_PREFIX_PATH</code> with, for example, <div class="fragment"><pre class="fragment">
  cmake -G "Visual Studio 10" -D CMAKE_PREFIX_PATH=C:/pkg-vc10 -D CMAKE_INSTALL_PREFIX=C:/pkg-vc10/XYZProject ..
</pre></div> (If you used some other method of installing GeographicLib, you can try copying cmake/FindGeographicLib.cmake to somewhere in your <code>CMAKE_MODULE_PATH</code> in order for find_package to work. However, this method has not been thoroughly tested.)</li>
<li>For Windows, ensure that you build the library with the same version of the compiler and you use for your code. In addition, you have to build a separate debug version of the library when you can compiling your code in debug mode. The configuration of cmake described above ensures that the right version of the compiler is used and, assuming you built and installed GeographicLib in debug mode, the debug version of the library Geographic_d.lib will be used.</li>
</ul>
<p>Here is a very simple test code, which uses the <a class="el" href="classGeographicLib_1_1Geodesic.html" title="Geodesic calculations">GeographicLib::Geodesic</a> class: </p>
<div class="fragment"><pre class="fragment"><span class="comment">// Small example of using the GeographicLib::Geodesic class</span>
<span class="comment">// $Id: 23959b26e8023e42f76afabf7a2d7b593666a71a $</span>

<span class="preprocessor">#include &lt;iostream&gt;</span>
<span class="preprocessor">#include &lt;<a class="code" href="Geodesic_8hpp.html" title="Header for GeographicLib::Geodesic class.">GeographicLib/Geodesic.hpp</a>&gt;</span>

<span class="keyword">using namespace </span>std;
<span class="keyword">using namespace </span>GeographicLib;

<span class="keywordtype">int</span> <a class="code" href="CartConvert_8cpp.html#a0ddf1224851353fc92bfbff6f499fa97">main</a>() {
  <span class="keyword">const</span> <a class="code" href="classGeographicLib_1_1Geodesic.html" title="Geodesic calculations">Geodesic</a>&amp; geod = <a class="code" href="classGeographicLib_1_1Geodesic.html" title="Geodesic calculations">Geodesic</a>::WGS84;
  <span class="comment">// Distance from JFK to LHR</span>
  <span class="keywordtype">double</span>
    lat1 = 40.6, lon1 = -73.8, <span class="comment">// JFK Airport</span>
    lat2 = 51.6, lon2 = -0.5;  <span class="comment">// LHR Airport</span>
  <span class="keywordtype">double</span> s12;
  geod.<a class="code" href="classGeographicLib_1_1Geodesic.html#ad7e59a242125a35a95c96cdb20573081">Inverse</a>(lat1, lon1, lat2, lon2, s12);
  cout &lt;&lt; s12 / 1000 &lt;&lt; <span class="stringliteral">&quot; km\n&quot;</span>;
  <span class="keywordflow">return</span> 0;
}
</pre></div><p> This example is <code>examples/example-Geodesic-small.cpp</code>. If you compile, link, and run it according to the instructions above, it should print out </p>
<div class="fragment"><pre class="fragment">
  5551.76 km
</pre></div><p>The next steps are:</p>
<ul>
<li>Learn about and run the <a class="el" href="utilities.html">Utility programs</a>.</li>
<li>Read the section, <a class="el" href="organization.html">Code organization</a>, for an overview of the library.</li>
<li>Browse the <a href="annotated.html">Class List</a> for full documentation on the classes in the library.</li>
<li>Look at the example code in the examples directory. Each file provides a very simple standalone example of using one GeographicLib class. These are included in the descriptions of the classes.</li>
<li>Look at the source code for the utilities in the tools directory for more examples of using GeographicLib from C++ code, e.g., <a class="el" href="GeodesicProj_8cpp.html" title="Command line utility for geodesic projections.">GeodesicProj.cpp</a> is a program to performing various geodesic projections.</li>
</ul>
<p>Here's a list of some of the abbreviations used here with links to the corresponding Wikipedia articles:</p>
<ul>
<li><a href="http://en.wikipedia.org/wiki/WGS84">WGS84</a>, World Geodetic System 1984.</li>
<li><a href="http://en.wikipedia.org/wiki/Universal_Transverse_Mercator_coordinate_system">UTM</a>, Universal Transverse Mercator coordinate system.</li>
<li><a href="http://en.wikipedia.org/wiki/Universal_Polar_Stereographic">UPS</a>, Universal Polar Stereographic coordinate system.</li>
<li><a href="http://en.wikipedia.org/wiki/Military_grid_reference_system">MGRS</a>, Military Grid Reference System.</li>
<li><a href="http://en.wikipedia.org/wiki/Geoid">EGM</a>, Earth Gravity Model.</li>
<li><a href="http://en.wikipedia.org/wiki/World_Magnetic_Model">WMM</a>, World Magnetic Model.</li>
<li><a href="http://en.wikipedia.org/wiki/IGRF">IGRF</a>, International Geomagnetic Reference Field.</li>
</ul>
<center> Back to <a class="el" href="install.html">Installing GeographicLib</a>. Forward to <a class="el" href="utilities.html">Utility programs</a>. Up to <a class="el" href="index.html#contents">Contents</a>. </center> </div></div>


<hr class="footer"/><address class="footer"><small>
Generated on Tue Apr 24 2012 17:54:16 for GeographicLib by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.5
</small></address>

</body>
</html>