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

◆ test_lwline_crossing_short_lines()

static void test_lwline_crossing_short_lines ( void  )
static

Definition at line 262 of file cu_algorithm.c.

263{
264
265 POINT4D p;
266
267 /*
268 ** Simple test, two two-point lines
269 */
270
271 /* Vertical line from 0,0 to 1,1 */
272 p.x = 0.0;
273 p.y = 0.0;
275 p.y = 1.0;
277
278 /* Horizontal, crossing mid-segment */
279 p.x = -0.5;
280 p.y = 0.5;
282 p.x = 0.5;
284
286
287 /* Horizontal, crossing at top end vertex (end crossings don't count) */
288 p.x = -0.5;
289 p.y = 1.0;
291 p.x = 0.5;
293
295
296 /* Horizontal, crossing at bottom end vertex */
297 p.x = -0.5;
298 p.y = 0.0;
300 p.x = 0.5;
302
304
305 /* Horizontal, no crossing */
306 p.x = -0.5;
307 p.y = 2.0;
309 p.x = 0.5;
311
313
314 /* Vertical, no crossing */
315 p.x = -0.5;
316 p.y = 0.0;
318 p.y = 1.0;
320
322
323}
POINTARRAY * pa22
LWLINE * l21
POINTARRAY * pa21
LWLINE * l22
int lwline_crossing_direction(const LWLINE *l1, const LWLINE *l2)
Given two lines, characterize how (and if) they cross each other.
@ LINE_CROSS_RIGHT
Definition liblwgeom.h:1690
@ LINE_NO_CROSS
Definition liblwgeom.h:1688
void ptarray_set_point4d(POINTARRAY *pa, uint32_t n, const POINT4D *p4d)
Definition lwgeom_api.c:369
double x
Definition liblwgeom.h:414
double y
Definition liblwgeom.h:414

References l21, l22, LINE_CROSS_RIGHT, LINE_NO_CROSS, lwline_crossing_direction(), pa21, pa22, ptarray_set_point4d(), POINT4D::x, and POINT4D::y.

Referenced by algorithms_suite_setup().

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