PostGIS  2.5.0dev-r@@SVN_REVISION@@
static void dbscan_test ( void  )
static

Definition at line 295 of file cu_geos_cluster.c.

References do_dbscan_test(), dbscan_test_info::eps, dbscan_test_info::expected_ids, dbscan_test_info::expected_in_cluster, dbscan_test_info::min_points, dbscan_test_info::num_geoms, and dbscan_test_info::wkt_inputs.

Referenced by geos_cluster_suite_setup().

296 {
297  struct dbscan_test_info test;
298  char* wkt_inputs[] = { "POINT (0 0)", "POINT (-1 0)", "POINT (-1 -0.1)", "POINT (-1 0.1)",
299  "POINT (1 0)",
300  "POINT (2 0)", "POINT (3 0)", "POINT ( 3 -0.1)", "POINT ( 3 0.1)" };
301  /* Although POINT (1 0) and POINT (2 0) are within eps distance of each other,
302  * they do not connect the two clusters because POINT (1 0) is not a core point.
303  * See #3572
304  */
305  test.eps = 1.01;
306  test.min_points = 5;
307  uint32_t expected_ids[] = { 0, 0, 0, 0, 0, 1, 1, 1, 1, 1 };
308  int expected_in_cluster[] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
309  test.num_geoms = sizeof(wkt_inputs) / sizeof(char*);
310 
311  test.expected_ids = expected_ids;
312  test.wkt_inputs = wkt_inputs;
313  test.expected_in_cluster = expected_in_cluster;
314  do_dbscan_test(test);
315 }
static void do_dbscan_test(struct dbscan_test_info test)
unsigned int uint32_t
Definition: uthash.h:78
uint32_t * expected_ids

Here is the call graph for this function:

Here is the caller graph for this function: