From: Paul Ramsey Date: Sun, 8 Mar 2015 23:42:54 +0000 (+0000) Subject: Comments and notes X-Git-Tag: 2.2.0rc1~604 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fd8a0a853f28f163b631f9fa2b149be4b7594b93;p=postgis Comments and notes git-svn-id: http://svn.osgeo.org/postgis/trunk@13326 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/liblwgeom/lwgeom.c b/liblwgeom/lwgeom.c index fa17c31ac..5a9032525 100644 --- a/liblwgeom/lwgeom.c +++ b/liblwgeom/lwgeom.c @@ -1899,7 +1899,9 @@ lwgeom_subdivide_recursive(const LWGEOM *geom, int maxvertices, LWCOLLECTION *co return 1; } - /* Haven't set up a clipping box yet? Make one then recurse again */ + /* Haven't set up a clipping box yet? Make one, then recurse again */ + /* We make the initial box the smallest perfect square that can contain */ + /* the geometry, for easy quad-subdivision as we recurse */ if ( ! clip ) { double height, width; @@ -1940,6 +1942,8 @@ lwgeom_subdivide_recursive(const LWGEOM *geom, int maxvertices, LWCOLLECTION *co pt.y = clip->ymin; if ( lwpoly_contains_point((LWPOLY*)geom, &pt) ) { + /* TODO: Probably just making the clipping box into a polygon is a more */ + /* efficient way to do this? */ LWGEOM *clipped = lwgeom_clip_by_rect(geom, clip->xmin, clip->ymin, clip->xmax, clip->ymax); /* Hm, clipping left nothing behind, skip it */ if ( lwgeom_is_empty(clipped) )