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

◆ basic_distance_test()

static void basic_distance_test ( void  )
static

Definition at line 191 of file cu_geos_cluster.c.

192{
193 char* a = "LINESTRING (0 0, 1 1)";
194 char* b = "LINESTRING (1 1, 2 2)";
195 char* c = "LINESTRING (5 5, 6 6)";
196
197 char* wkt_inputs[] = {a, b, c};
198
199 char* expected_outputs_all[] = {"GEOMETRYCOLLECTION(LINESTRING(0 0, 1 1), LINESTRING(1 1, 2 2), LINESTRING(5 5, 6 6))"};
200 char* expected_outputs_partial[] = {"GEOMETRYCOLLECTION(LINESTRING(0 0, 1 1), LINESTRING(1 1, 2 2))",
201 "GEOMETRYCOLLECTION(LINESTRING(5 5, 6 6))"
202 };
203
204 perform_cluster_within_distance_test(0, wkt_inputs, 3, expected_outputs_partial, 2);
205 perform_cluster_within_distance_test(sqrt(18) - 0.0000001, wkt_inputs, 3, expected_outputs_partial, 2);
206 perform_cluster_within_distance_test(sqrt(18) + 0.0000001, wkt_inputs, 3, expected_outputs_all, 1);
207}
static void perform_cluster_within_distance_test(double tolerance, char **wkt_inputs, uint32_t num_inputs, char **wkt_outputs, uint32_t num_outputs)

References perform_cluster_within_distance_test().

Referenced by geos_cluster_suite_setup().

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