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

Paul Ramsey pramsey at cleverelephant.ca
Thu May 15 15:42:31 EDT 2008


Why so few shapes per node? I was thinking about this walking downtown
and my internal guess was 128 would be a good number.  How did you
come to 8?

P

On Thu, May 15, 2008 at 10:43 AM, Frank Warmerdam <warmerdam at pobox.com> wrote:
> 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