PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ test_geohash_bbox()

static void test_geohash_bbox ( void  )
static

Definition at line 1146 of file cu_algorithm.c.

1147{
1148 double lat[2], lon[2];
1149
1150 /* SELECT ST_GeoHash(ST_SetSRID(ST_MakePoint(-126,48),4326)) */
1151 decode_geohash_bbox("c0w3hf1s70w3hf1s70w3", lat, lon, 100);
1152 CU_ASSERT_DOUBLE_EQUAL(lat[0], 48, 1e-11);
1153 CU_ASSERT_DOUBLE_EQUAL(lat[1], 48, 1e-11);
1154 CU_ASSERT_DOUBLE_EQUAL(lon[0], -126, 1e-11);
1155 CU_ASSERT_DOUBLE_EQUAL(lon[1], -126, 1e-11);
1156
1158 decode_geohash_bbox("@@@@@@", lat, lon, 100);
1159 ASSERT_STRING_EQUAL(cu_error_msg, "decode_geohash_bbox: Invalid character '@'");
1160}
void cu_error_msg_reset()
char cu_error_msg[MAX_CUNIT_ERROR_LENGTH+1]
#define ASSERT_STRING_EQUAL(o, e)
void decode_geohash_bbox(char *geohash, double *lat, double *lon, int precision)

References ASSERT_STRING_EQUAL, cu_error_msg, cu_error_msg_reset(), and decode_geohash_bbox().

Referenced by algorithms_suite_setup().

Here is the call graph for this function:
Here is the caller graph for this function: