2014-05-12 14:38:17 -04:00
|
|
|
#ifndef __GEO_H__
|
|
|
|
#define __GEO_H__
|
|
|
|
|
2015-07-26 09:14:57 -04:00
|
|
|
#include "server.h"
|
2014-05-12 14:38:17 -04:00
|
|
|
|
2015-06-22 12:08:06 -04:00
|
|
|
/* Structures used inside geo.c in order to represent points and array of
|
|
|
|
* points on the earth. */
|
|
|
|
typedef struct geoPoint {
|
2015-06-22 05:53:14 -04:00
|
|
|
double longitude;
|
2015-06-25 12:05:45 -04:00
|
|
|
double latitude;
|
2015-06-22 05:53:14 -04:00
|
|
|
double dist;
|
2015-06-22 12:08:06 -04:00
|
|
|
double score;
|
2015-06-22 05:53:14 -04:00
|
|
|
char *member;
|
2015-06-22 12:08:06 -04:00
|
|
|
} geoPoint;
|
|
|
|
|
|
|
|
typedef struct geoArray {
|
|
|
|
struct geoPoint *array;
|
|
|
|
size_t buckets;
|
|
|
|
size_t used;
|
|
|
|
} geoArray;
|
2015-06-22 05:53:14 -04:00
|
|
|
|
2014-05-12 14:38:17 -04:00
|
|
|
#endif
|