PostGIS  2.1.10dev-r@@SVN_REVISION@@
static void test_geohash_point ( void  )
static

Definition at line 736 of file cu_algorithm.c.

References geohash_point(), and lwfree().

Referenced by algorithms_suite_setup().

737 {
738  char *geohash;
739 
740  geohash = geohash_point(0, 0, 16);
741  //printf("\ngeohash %s\n",geohash);
742  CU_ASSERT_STRING_EQUAL(geohash, "s000000000000000");
743  lwfree(geohash);
744 
745  geohash = geohash_point(90, 0, 16);
746  //printf("\ngeohash %s\n",geohash);
747  CU_ASSERT_STRING_EQUAL(geohash, "w000000000000000");
748  lwfree(geohash);
749 
750  geohash = geohash_point(20.012345, -20.012345, 15);
751  //printf("\ngeohash %s\n",geohash);
752  CU_ASSERT_STRING_EQUAL(geohash, "kkqnpkue9ktbpe5");
753  lwfree(geohash);
754 
755 }
void lwfree(void *mem)
Definition: lwutil.c:190
char * geohash_point(double longitude, double latitude, int precision)
Definition: lwalgorithm.c:582

Here is the call graph for this function:

Here is the caller graph for this function: