PostGIS  2.2.8dev-r@@SVN_REVISION@@

◆ test_geohash_point_as_int()

static void test_geohash_point_as_int ( void  )
static

Definition at line 908 of file cu_algorithm.c.

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

Referenced by algorithms_suite_setup().

909 {
910  unsigned int gh;
911  POINT2D p;
912  unsigned long long rs;
913 
914  p.x = 50; p.y = 35;
915  gh = geohash_point_as_int(&p);
916  rs = 3440103613;
917  CU_ASSERT_EQUAL(gh, rs);
918  p.x = 140; p.y = 45;
919  gh = geohash_point_as_int(&p);
920  rs = 3982480893;
921  CU_ASSERT_EQUAL(gh, rs);
922  p.x = 140; p.y = 55;
923  gh = geohash_point_as_int(&p);
924  rs = 4166944232;
925  CU_ASSERT_EQUAL(gh, rs);
926 }
double x
Definition: liblwgeom.h:312
double y
Definition: liblwgeom.h:312
unsigned int geohash_point_as_int(POINT2D *pt)
Definition: lwalgorithm.c:633
Here is the call graph for this function:
Here is the caller graph for this function: