PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ test_geohash_point()

static void test_geohash_point ( void  )
static

Definition at line 739 of file cu_algorithm.c.

References geohash_point(), and lwfree().

Referenced by algorithms_suite_setup().

740 {
741  char *geohash;
742 
743  geohash = geohash_point(0, 0, 16);
744  //printf("\ngeohash %s\n",geohash);
745  CU_ASSERT_STRING_EQUAL(geohash, "s000000000000000");
746  lwfree(geohash);
747 
748  geohash = geohash_point(90, 0, 16);
749  //printf("\ngeohash %s\n",geohash);
750  CU_ASSERT_STRING_EQUAL(geohash, "w000000000000000");
751  lwfree(geohash);
752 
753  geohash = geohash_point(20.012345, -20.012345, 15);
754  //printf("\ngeohash %s\n",geohash);
755  CU_ASSERT_STRING_EQUAL(geohash, "kkqnpkue9ktbpe5");
756  lwfree(geohash);
757 
758 }
void lwfree(void *mem)
Definition: lwutil.c:244
char * geohash_point(double longitude, double latitude, int precision)
Definition: lwalgorithm.c:581
Here is the call graph for this function:
Here is the caller graph for this function: