PostGIS  3.7.0dev-r@@SVN_REVISION@@

◆ test_geohash_point_as_int()

static void test_geohash_point_as_int ( void  )
static

Definition at line 1125 of file cu_algorithm.c.

1126 {
1127  unsigned int gh;
1128  POINT2D p;
1129  unsigned long long rs;
1130 
1131  p.x = 50; p.y = 35;
1132  gh = geohash_point_as_int(&p);
1133  rs = 3440103613;
1134  CU_ASSERT_EQUAL(gh, rs);
1135  p.x = 140; p.y = 45;
1136  gh = geohash_point_as_int(&p);
1137  rs = 3982480893;
1138  CU_ASSERT_EQUAL(gh, rs);
1139  p.x = 140; p.y = 55;
1140  gh = geohash_point_as_int(&p);
1141  rs = 4166944232;
1142  CU_ASSERT_EQUAL(gh, rs);
1143 }
unsigned int geohash_point_as_int(POINT2D *pt)
Definition: lwalgorithm.c:669
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: