26 #ifndef XAPIAN_INCLUDED_GEOENCODE_H
27 #define XAPIAN_INCLUDED_GEOENCODE_H
47 encode(
double lat,
double lon, std::string & result);
64 decode(
const char * value,
size_t len,
double & lat_ref,
double & lon_ref);
80 decode(
const std::string & value,
double & lat_ref,
double & lon_ref)
153 bool decode(
const std::string & value,
154 double & lat_ref,
double & lon_ref)
const;
A class for decoding coordinates within a bounding box.
bool decode(const std::string &value, double &lat_ref, double &lon_ref) const
Decode a coordinate.
unsigned char start1
First byte of encoded form of coordinates with lon1.
double lon2
Longitude at eastern edge of bounding box.
double min_lat
Minimum latitude in bounding box.
unsigned char start2
First byte of encoded form of coordinates with lon2.
bool include_poles
True if either of the poles are included in the range.
double max_lat
Maximum latitude in bounding box.
double lon1
Longitude at western edge of bounding box.
DecoderWithBoundingBox(double lat1, double lon1, double lat2, double lon2)
Create a decoder with a bounding box.
bool discontinuous_longitude_range
Flag; true if the longitude range is discontinuous (ie, goes over the boundary at which longitudes wr...
bool encode(double lat, double lon, std::string &result)
Encode a coordinate and append it to a string.
void decode(const char *value, size_t len, double &lat_ref, double &lon_ref)
Decode a coordinate from a buffer.