]> granicus.if.org Git - postgis/commitdiff
Comments and notes
authorPaul Ramsey <pramsey@cleverelephant.ca>
Sun, 8 Mar 2015 23:42:54 +0000 (23:42 +0000)
committerPaul Ramsey <pramsey@cleverelephant.ca>
Sun, 8 Mar 2015 23:42:54 +0000 (23:42 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@13326 b70326c6-7e19-0410-871a-916f4a2858ee

liblwgeom/lwgeom.c

index fa17c31acf1f33cf8fbb6f9f24cfc0d9e07b76de..5a903252522b6edf5bb4b921c6c5032304400aa2 100644 (file)
@@ -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) )