PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ test_geohash_point_as_int()

static void test_geohash_point_as_int ( void  )
static

Definition at line 987 of file cu_algorithm.c.

988 {
989  unsigned int gh;
990  POINT2D p;
991  unsigned long long rs;
992 
993  p.x = 50; p.y = 35;
994  gh = geohash_point_as_int(&p);
995  rs = 3440103613;
996  CU_ASSERT_EQUAL(gh, rs);
997  p.x = 140; p.y = 45;
998  gh = geohash_point_as_int(&p);
999  rs = 3982480893;
1000  CU_ASSERT_EQUAL(gh, rs);
1001  p.x = 140; p.y = 55;
1002  gh = geohash_point_as_int(&p);
1003  rs = 4166944232;
1004  CU_ASSERT_EQUAL(gh, rs);
1005 }
unsigned int geohash_point_as_int(POINT2D *pt)
Definition: lwalgorithm.c:657
double y
Definition: liblwgeom.h:331
double x
Definition: liblwgeom.h:331

References geohash_point_as_int(), POINT2D::x, and POINT2D::y.

Referenced by algorithms_suite_setup().

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