[mapserver-dev] Re: [mapserver-users] testing mapserver large files rendering improvements

Frank Warmerdam warmerdam at pobox.com
Thu May 15 13:43:57 EDT 2008


Paul Ramsey wrote:
> Frank,
> 
> For a point-based tree, does every point end up in a node at max depth?

Paul,

Yes. And the maximum depth is a heuristic as follows if not given
explicitly as an argument to shptree:

   /* -------------------------------------------------------------------- */
   /*      If no max depth was defined, try to select a reasonable one     */
   /*      that implies approximately 8 shapes per node.                   */
   /* -------------------------------------------------------------------- */
   if( tree->maxdepth == 0 ) {
     int numnodes = 1;

     while(numnodes*4 < shapefile->numshapes) {
       tree->maxdepth += 1;
       numnodes = numnodes * 2;
     }
   }

No long ago the default maxdepth was 16 and .qix files for small .shp files
were awfully large (deep).

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org



More information about the mapserver-dev mailing list