PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ basic_distance_test()

static void basic_distance_test ( void  )
static

Definition at line 189 of file cu_geos_cluster.c.

References perform_cluster_within_distance_test().

Referenced by geos_cluster_suite_setup().

190 {
191  char* a = "LINESTRING (0 0, 1 1)";
192  char* b = "LINESTRING (1 1, 2 2)";
193  char* c = "LINESTRING (5 5, 6 6)";
194 
195  char* wkt_inputs[] = {a, b, c};
196 
197  char* expected_outputs_all[] = {"GEOMETRYCOLLECTION(LINESTRING(0 0, 1 1), LINESTRING(1 1, 2 2), LINESTRING(5 5, 6 6))"};
198  char* expected_outputs_partial[] = {"GEOMETRYCOLLECTION(LINESTRING(0 0, 1 1), LINESTRING(1 1, 2 2))",
199  "GEOMETRYCOLLECTION(LINESTRING(5 5, 6 6))"
200  };
201 
202  perform_cluster_within_distance_test(0, wkt_inputs, 3, expected_outputs_partial, 2);
203  perform_cluster_within_distance_test(sqrt(18) - 0.0000001, wkt_inputs, 3, expected_outputs_partial, 2);
204  perform_cluster_within_distance_test(sqrt(18) + 0.0000001, wkt_inputs, 3, expected_outputs_all, 1);
205 }
static void perform_cluster_within_distance_test(double tolerance, char **wkt_inputs, uint32_t num_inputs, char **wkt_outputs, uint32_t num_outputs)
Here is the call graph for this function:
Here is the caller graph for this function: