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

Definition at line 905 of file cu_algorithm.c.

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

Referenced by algorithms_suite_setup().

906 {
907  unsigned int gh;
908  POINT2D p;
909 
910  p.x = 50; p.y = 35;
911  gh = geohash_point_as_int(&p);
912  CU_ASSERT_EQUAL(gh, (unsigned int)3440103613);
913  p.x = 140; p.y = 45;
914  gh = geohash_point_as_int(&p);
915  CU_ASSERT_EQUAL(gh, (unsigned int)3982480893);
916  p.x = 140; p.y = 55;
917  gh = geohash_point_as_int(&p);
918  CU_ASSERT_EQUAL(gh, (unsigned int)4166944232);
919 }
double x
Definition: liblwgeom.h:284
double y
Definition: liblwgeom.h:284
unsigned int geohash_point_as_int(POINT2D *pt)
Definition: lwalgorithm.c:648

Here is the call graph for this function:

Here is the caller graph for this function: