xapian-core
1.4.27
|
A sequence of latitude-longitude coordinates. More...
#include <geospatial.h>
Public Member Functions | |
LatLongCoordsIterator | begin () const |
Get a begin iterator for the coordinates. More... | |
LatLongCoordsIterator | end () const |
Get an end iterator for the coordinates. More... | |
size_t | size () const |
Get the number of coordinates in the container. More... | |
bool | empty () const |
Return true if and only if there are no coordinates in the container. More... | |
void | append (const LatLongCoord &coord) |
Append a coordinate to the end of the sequence. More... | |
LatLongCoords () | |
Construct an empty container. More... | |
LatLongCoords (const LatLongCoord &coord) | |
Construct a container holding one coordinate. More... | |
void | unserialise (const std::string &serialised) |
Unserialise a string and set this object to the coordinates in it. More... | |
std::string | serialise () const |
Return a serialised form of the coordinate list. More... | |
std::string | get_description () const |
Return a string describing this object. More... | |
Private Attributes | |
std::vector< LatLongCoord > | coords |
The coordinates. More... | |
A sequence of latitude-longitude coordinates.
Experimental - see https://xapian.org/docs/deprecation#experimental-features
Definition at line 232 of file geospatial.h.
|
inline |
Construct an empty container.
Definition at line 266 of file geospatial.h.
|
inline |
Construct a container holding one coordinate.
Definition at line 269 of file geospatial.h.
|
inline |
Append a coordinate to the end of the sequence.
Definition at line 260 of file geospatial.h.
Referenced by DEFINE_TESTCASE(), and Xapian::LatLongDistanceKeyMaker::LatLongDistanceKeyMaker().
|
inline |
Get a begin iterator for the coordinates.
Definition at line 238 of file geospatial.h.
Referenced by DEFINE_TESTCASE(), and Xapian::LatLongMetric::operator()().
|
inline |
Return true if and only if there are no coordinates in the container.
Definition at line 254 of file geospatial.h.
Referenced by DEFINE_TESTCASE(), and Xapian::LatLongMetric::operator()().
|
inline |
Get an end iterator for the coordinates.
Definition at line 243 of file geospatial.h.
Referenced by DEFINE_TESTCASE(), and Xapian::LatLongMetric::operator()().
string LatLongCoords::get_description | ( | ) | const |
Return a string describing this object.
Definition at line 118 of file latlongcoord.cc.
References Xapian::Internal::str().
Referenced by DEFINE_TESTCASE().
string LatLongCoords::serialise | ( | ) | const |
Return a serialised form of the coordinate list.
Definition at line 106 of file latlongcoord.cc.
References GeoEncode::encode().
Referenced by DEFINE_TESTCASE(), and Xapian::LatLongDistancePostingSource::serialise().
|
inline |
Get the number of coordinates in the container.
Definition at line 248 of file geospatial.h.
Referenced by DEFINE_TESTCASE(), and Xapian::LatLongMetric::operator()().
void LatLongCoords::unserialise | ( | const std::string & | serialised | ) |
Unserialise a string and set this object to the coordinates in it.
serialised | the string to unserialise the coordinates from. |
Xapian::SerialisationError | if the string does not contain a valid serialised latitude-longitude pair, or contains junk at the end of it. |
Definition at line 94 of file latlongcoord.cc.
Referenced by Xapian::LatLongDistanceKeyMaker::operator()(), and Xapian::LatLongDistancePostingSource::unserialise_with_registry().
|
private |
The coordinates.
Definition at line 234 of file geospatial.h.