remove points that are irrelevant for rendering the geometry within a view specified by rectangular bounds.
2D-(MULTI)POLYGONs and (MULTI)LINESTRINGs are evaluated, others keep untouched.
Definition at line 318 of file liblwgeom/lwgeom_remove_irrelevant_points_for_view.c.
318 {
319
320 unsigned int i, j, iw, jw;
321
323
326 }
327
329
331 iw = 0;
332 for (i=0; i<mline->
ngeoms; i++) {
335
337
338 mline->
geoms[iw++] = line;
339 }
340 else {
341
343 }
344 }
346 }
347
349
351 iw = 0;
352 for (i=0; i<polygon->
nrings; i++) {
354
356
358 }
359 else {
360 if (!i) {
361
362 unsigned int k;
363 for (k=0; k<polygon->
nrings; k++) {
365 }
366 break;
367 }
368 else {
369
371 }
372 }
373 }
375 }
376
378
380 jw = 0;
381 for (j=0; j<mpolygon->
ngeoms; j++) {
382
384 iw = 0;
385 for (i=0; i<polygon->
nrings; i++) {
387
389
391 }
392 else {
393 if (!i) {
394
395 unsigned int k;
396 for (k=0; k<polygon->
nrings; k++) {
398 }
399 break;
400 }
401 else {
402
404 }
405 }
406 }
408
409 if (iw) {
410 mpolygon->
geoms[jw++] = polygon;
411 }
412 else {
413
415 }
416 }
418 }
419}
void removePoints(POINTARRAY *points, GBOX *bounds, bool closed, bool cartesian_hint)
References LWMLINE::geoms, LWMPOLY::geoms, LINETYPE, lwfree(), MULTILINETYPE, MULTIPOLYGONTYPE, LWMLINE::ngeoms, LWMPOLY::ngeoms, POINTARRAY::npoints, LWPOLY::nrings, LWLINE::points, POLYGONTYPE, removePoints(), LWPOLY::rings, and LWGEOM::type.
Referenced by ST_RemoveIrrelevantPointsForView(), and test_lwgeom_remove_irrelevant_points_for_view().