PostGIS 3.6.2dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ dbscan_test()

static void dbscan_test ( void  )
static

Definition at line 297 of file cu_geos_cluster.c.

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

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().

Here is the call graph for this function:
Here is the caller graph for this function: