PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ test_geohash_point()

static void test_geohash_point ( void  )
static

Definition at line 818 of file cu_algorithm.c.

819 {
820  char *geohash;
821 
822  geohash = geohash_point(0, 0, 16);
823  //printf("\ngeohash %s\n",geohash);
824  CU_ASSERT_STRING_EQUAL(geohash, "s000000000000000");
825  lwfree(geohash);
826 
827  geohash = geohash_point(90, 0, 16);
828  //printf("\ngeohash %s\n",geohash);
829  CU_ASSERT_STRING_EQUAL(geohash, "w000000000000000");
830  lwfree(geohash);
831 
832  geohash = geohash_point(20.012345, -20.012345, 15);
833  //printf("\ngeohash %s\n",geohash);
834  CU_ASSERT_STRING_EQUAL(geohash, "kkqnpkue9ktbpe5");
835  lwfree(geohash);
836 
837 }
void lwfree(void *mem)
Definition: lwutil.c:244
char * geohash_point(double longitude, double latitude, int precision)
Definition: lwalgorithm.c:591

References geohash_point(), and lwfree().

Referenced by algorithms_suite_setup().

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