File: structXapian_1_1LatLongCoord.html

package info (click to toggle)
xapian-core 1.4.22-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 22,816 kB
  • sloc: cpp: 92,138; ansic: 9,983; sh: 4,929; perl: 850; makefile: 503; javascript: 331; tcl: 319; python: 40
file content (299 lines) | stat: -rw-r--r-- 17,515 bytes parent folder | download
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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://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.9.4"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Xapian: API Documentation: Xapian::LatLongCoord Struct 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 id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">xapian-core
   &#160;<span id="projectnumber">1.4.22</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.4 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',false,false,'search.php','Search');
});
/* @license-end */
</script>
<div id="main-nav"></div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespaceXapian.html">Xapian</a></li><li class="navelem"><a class="el" href="structXapian_1_1LatLongCoord.html">LatLongCoord</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="structXapian_1_1LatLongCoord-members.html">List of all members</a>  </div>
  <div class="headertitle"><div class="title">Xapian::LatLongCoord Struct Reference</div></div>
</div><!--header-->
<div class="contents">

<p>A latitude-longitude coordinate.  
 <a href="structXapian_1_1LatLongCoord.html#details">More...</a></p>

<p><code>#include &lt;geospatial.h&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a5fef42bbf984daabba74fa95334a6e6c"><td class="memItemLeft" align="right" valign="top"><a id="a5fef42bbf984daabba74fa95334a6e6c" name="a5fef42bbf984daabba74fa95334a6e6c"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>LatLongCoord</b> ()</td></tr>
<tr class="memdesc:a5fef42bbf984daabba74fa95334a6e6c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Construct an uninitialised coordinate. <br /></td></tr>
<tr class="separator:a5fef42bbf984daabba74fa95334a6e6c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab31f8e6b5ebd707c95a636352bb7e4a1"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structXapian_1_1LatLongCoord.html#ab31f8e6b5ebd707c95a636352bb7e4a1">LatLongCoord</a> (double latitude_, double longitude_)</td></tr>
<tr class="memdesc:ab31f8e6b5ebd707c95a636352bb7e4a1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Construct a coordinate.  <a href="structXapian_1_1LatLongCoord.html#ab31f8e6b5ebd707c95a636352bb7e4a1">More...</a><br /></td></tr>
<tr class="separator:ab31f8e6b5ebd707c95a636352bb7e4a1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7cc5473cd7be8dba82478534f70835e7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structXapian_1_1LatLongCoord.html#a7cc5473cd7be8dba82478534f70835e7">unserialise</a> (const std::string &amp;serialised)</td></tr>
<tr class="memdesc:a7cc5473cd7be8dba82478534f70835e7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Unserialise a string and set this object to its coordinate.  <a href="structXapian_1_1LatLongCoord.html#a7cc5473cd7be8dba82478534f70835e7">More...</a><br /></td></tr>
<tr class="separator:a7cc5473cd7be8dba82478534f70835e7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad0367049c501fb26030526e89f502d8c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structXapian_1_1LatLongCoord.html#ad0367049c501fb26030526e89f502d8c">unserialise</a> (const char **ptr, const char *end)</td></tr>
<tr class="memdesc:ad0367049c501fb26030526e89f502d8c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Unserialise a buffer and set this object to its coordinate.  <a href="structXapian_1_1LatLongCoord.html#ad0367049c501fb26030526e89f502d8c">More...</a><br /></td></tr>
<tr class="separator:ad0367049c501fb26030526e89f502d8c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4724686094315a25d3232d4ea09dc649"><td class="memItemLeft" align="right" valign="top"><a id="a4724686094315a25d3232d4ea09dc649" name="a4724686094315a25d3232d4ea09dc649"></a>
std::string&#160;</td><td class="memItemRight" valign="bottom"><b>serialise</b> () const</td></tr>
<tr class="memdesc:a4724686094315a25d3232d4ea09dc649"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return a serialised representation of the coordinate. <br /></td></tr>
<tr class="separator:a4724686094315a25d3232d4ea09dc649"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a235b8096e784538782d28b77812a20e6"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structXapian_1_1LatLongCoord.html#a235b8096e784538782d28b77812a20e6">operator&lt;</a> (const <a class="el" href="structXapian_1_1LatLongCoord.html">LatLongCoord</a> &amp;other) const</td></tr>
<tr class="memdesc:a235b8096e784538782d28b77812a20e6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compare with another <a class="el" href="structXapian_1_1LatLongCoord.html" title="A latitude-longitude coordinate.">LatLongCoord</a>.  <a href="structXapian_1_1LatLongCoord.html#a235b8096e784538782d28b77812a20e6">More...</a><br /></td></tr>
<tr class="separator:a235b8096e784538782d28b77812a20e6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad0a2f845114e1fe45ae0b2b062b1dbc8"><td class="memItemLeft" align="right" valign="top"><a id="ad0a2f845114e1fe45ae0b2b062b1dbc8" name="ad0a2f845114e1fe45ae0b2b062b1dbc8"></a>
std::string&#160;</td><td class="memItemRight" valign="bottom"><b>get_description</b> () const</td></tr>
<tr class="memdesc:ad0a2f845114e1fe45ae0b2b062b1dbc8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return a string describing this object. <br /></td></tr>
<tr class="separator:ad0a2f845114e1fe45ae0b2b062b1dbc8"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:a705f1b24fb91b13cb9acf60b5590b06b"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structXapian_1_1LatLongCoord.html#a705f1b24fb91b13cb9acf60b5590b06b">latitude</a></td></tr>
<tr class="memdesc:a705f1b24fb91b13cb9acf60b5590b06b"><td class="mdescLeft">&#160;</td><td class="mdescRight">A latitude, as decimal degrees.  <a href="structXapian_1_1LatLongCoord.html#a705f1b24fb91b13cb9acf60b5590b06b">More...</a><br /></td></tr>
<tr class="separator:a705f1b24fb91b13cb9acf60b5590b06b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a93e68444e7227a5e3838d965c30a47f4"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structXapian_1_1LatLongCoord.html#a93e68444e7227a5e3838d965c30a47f4">longitude</a></td></tr>
<tr class="memdesc:a93e68444e7227a5e3838d965c30a47f4"><td class="mdescLeft">&#160;</td><td class="mdescRight">A longitude, as decimal degrees.  <a href="structXapian_1_1LatLongCoord.html#a93e68444e7227a5e3838d965c30a47f4">More...</a><br /></td></tr>
<tr class="separator:a93e68444e7227a5e3838d965c30a47f4"><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 >A latitude-longitude coordinate. </p>
<p >Experimental - see <a href="https://xapian.org/docs/deprecation#experimental-features">https://xapian.org/docs/deprecation#experimental-features</a></p>
<p >Note that latitude-longitude coordinates are only precisely meaningful if the datum used to define them is specified. This class ignores this issue - it is up to the caller to ensure that the datum used for each coordinate in a system is consistent. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="ab31f8e6b5ebd707c95a636352bb7e4a1" name="ab31f8e6b5ebd707c95a636352bb7e4a1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab31f8e6b5ebd707c95a636352bb7e4a1">&#9670;&nbsp;</a></span>LatLongCoord()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Xapian::LatLongCoord::LatLongCoord </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>latitude_</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>longitude_</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Construct a coordinate. </p>
<p >If the supplied longitude is out of the standard range, it will be normalised to the range 0 &lt;= longitude &lt; 360.</p>
<p >If you want to avoid the checks (for example, you know that your values are already in range), you can use the alternate constructor to construct an uninitialised coordinate, and then set the latitude and longitude directly.</p>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname"><a class="el" href="classXapian_1_1InvalidArgumentError.html" title="InvalidArgumentError indicates an invalid parameter value was passed to the API.">InvalidArgumentError</a></td><td>the supplied latitude is out of range. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a235b8096e784538782d28b77812a20e6" name="a235b8096e784538782d28b77812a20e6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a235b8096e784538782d28b77812a20e6">&#9670;&nbsp;</a></span>operator&lt;()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool Xapian::LatLongCoord::operator&lt; </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structXapian_1_1LatLongCoord.html">LatLongCoord</a> &amp;&#160;</td>
          <td class="paramname"><em>other</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Compare with another <a class="el" href="structXapian_1_1LatLongCoord.html" title="A latitude-longitude coordinate.">LatLongCoord</a>. </p>
<p >This is mostly provided so that things like std::map&lt;LatLongCoord&gt; work</p><ul>
<li>the ordering isn't particularly meaningful. </li>
</ul>

<p class="reference">References <a class="el" href="structXapian_1_1LatLongCoord.html#a705f1b24fb91b13cb9acf60b5590b06b">latitude</a>, and <a class="el" href="structXapian_1_1LatLongCoord.html#a93e68444e7227a5e3838d965c30a47f4">longitude</a>.</p>

</div>
</div>
<a id="ad0367049c501fb26030526e89f502d8c" name="ad0367049c501fb26030526e89f502d8c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad0367049c501fb26030526e89f502d8c">&#9670;&nbsp;</a></span>unserialise() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Xapian::LatLongCoord::unserialise </td>
          <td>(</td>
          <td class="paramtype">const char **&#160;</td>
          <td class="paramname"><em>ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>end</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Unserialise a buffer and set this object to its coordinate. </p>
<p >The buffer may contain further data after that for the coordinate.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ptr</td><td>A pointer to the start of the string. This will be updated to point to the end of the data representing the coordinate. </td></tr>
    <tr><td class="paramname">end</td><td>A pointer to the end of the string.</td></tr>
  </table>
  </dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname"><a class="el" href="classXapian_1_1SerialisationError.html" title="Indicates an error in the std::string serialisation of an object.">Xapian::SerialisationError</a></td><td>if the string does not start with a valid serialised latitude-longitude pair. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a7cc5473cd7be8dba82478534f70835e7" name="a7cc5473cd7be8dba82478534f70835e7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7cc5473cd7be8dba82478534f70835e7">&#9670;&nbsp;</a></span>unserialise() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Xapian::LatLongCoord::unserialise </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>serialised</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Unserialise a string and set this object to its coordinate. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">serialised</td><td>the string to unserialise the coordinate from.</td></tr>
  </table>
  </dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname"><a class="el" href="classXapian_1_1SerialisationError.html" title="Indicates an error in the std::string serialisation of an object.">Xapian::SerialisationError</a></td><td>if the string does not contain a valid serialised latitude-longitude pair, or contains extra data at the end of it. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="a705f1b24fb91b13cb9acf60b5590b06b" name="a705f1b24fb91b13cb9acf60b5590b06b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a705f1b24fb91b13cb9acf60b5590b06b">&#9670;&nbsp;</a></span>latitude</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double Xapian::LatLongCoord::latitude</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>A latitude, as decimal degrees. </p>
<p >Should be in the range -90 &lt;= latitude &lt;= 90</p>
<p >Positive latitudes represent the northern hemisphere. </p>

<p class="reference">Referenced by <a class="el" href="structXapian_1_1LatLongCoord.html#a235b8096e784538782d28b77812a20e6">operator&lt;()</a>.</p>

</div>
</div>
<a id="a93e68444e7227a5e3838d965c30a47f4" name="a93e68444e7227a5e3838d965c30a47f4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a93e68444e7227a5e3838d965c30a47f4">&#9670;&nbsp;</a></span>longitude</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double Xapian::LatLongCoord::longitude</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>A longitude, as decimal degrees. </p>
<p >Will be wrapped around, so for example, -150 is equal to 210. When obtained from a serialised form, will be in the range 0 &lt;= longitude &lt; 360.</p>
<p >Longitudes increase as coordinates move eastwards. </p>

<p class="reference">Referenced by <a class="el" href="structXapian_1_1LatLongCoord.html#a235b8096e784538782d28b77812a20e6">operator&lt;()</a>.</p>

</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li>xapian/<a class="el" href="geospatial_8h.html">geospatial.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by <a href="https://www.doxygen.org/">Doxygen 1.9.4</a>
</small></address>
</body>
</html>