PostGIS  3.4.0dev-r@@SVN_REVISION@@

◆ test_geohash_point_as_int()

static void test_geohash_point_as_int ( void  )
static

Definition at line 1126 of file cu_algorithm.c.

1127 {
1128  unsigned int gh;
1129  POINT2D p;
1130  unsigned long long rs;
1131 
1132  p.x = 50; p.y = 35;
1133  gh = geohash_point_as_int(&p);
1134  rs = 3440103613;
1135  CU_ASSERT_EQUAL(gh, rs);
1136  p.x = 140; p.y = 45;
1137  gh = geohash_point_as_int(&p);
1138  rs = 3982480893;
1139  CU_ASSERT_EQUAL(gh, rs);
1140  p.x = 140; p.y = 55;
1141  gh = geohash_point_as_int(&p);
1142  rs = 4166944232;
1143  CU_ASSERT_EQUAL(gh, rs);
1144 }
unsigned int geohash_point_as_int(POINT2D *pt)
Definition: lwalgorithm.c:661
double y
Definition: liblwgeom.h:390
double x
Definition: liblwgeom.h:390

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: