[Mapserver-users] Re: Use of shptree

Ed McNierney ed at topozone.com
Sat Aug 2 13:14:50 PDT 2003


Zamil -

Remember that shptree indexes help MapServer quickly locate the small
portion of a large file that is needed to draw a particular map.  If
your map request requires that the entire shapefile be drawn, indexing
won't help at all - the entire file needs to be used anyway.

IF that's the case, then tiling the data will only make things worse.

	- Ed

Ed McNierney
President and Chief Mapmaker
TopoZone.com / Maps a la carte, Inc.
73 Princeton Street, Suite 305
North Chelmsford, MA  01863
Phone: (978) 251-4242  Fax: (978) 251-1396
ed at topozone.com


-----Original Message-----
From: Zamil Murji [mailto:Zamil.Murji at divestco.com] 
Sent: Friday, August 01, 2003 4:38 PM
To: pkishor_98; mapserver-users at lists.gis.umn.edu
Subject: RE: [Mapserver-users] Re: Use of shptree

Did some experimentation already.
Seems that I got the fastest times with a depth of 1. I started at 10
and decreased by 1 each time. Still at 1 it was loading the image at the
same speed as without any indexes. I'm going to try tiling my data and
then adding indexes to my tiled data.

Zamil

-----Original Message-----
From: pkishor_98 [mailto:pkishor at geoanalytics.com]
Sent: Friday, August 01, 2003 2:17 PM
To: mapserver-users at lists.gis.umn.edu
Subject: [Mapserver-users] Re: Use of shptree


--- In mapserver-users at yahoogroups.com, "Zamil Murji"
<Zamil.Murji at d...> wrote:
> Hello list,
> 
> I am using shptree to index my shapefiles. I have a 
> funny case. Using shptree on one of my pointfiles 
> actually increases the time to load an image by 0.5 
> seconds. I have a feeling it has something to do with 
> the depth factor. How can I see what depth the index 
> is created at? 
> This shapefile has 1.6 million point 
> shapes. Should the depth be higher or lower than what 
> the shptree uses?

You created the shptree index, no? When you created it, you specified
the index. If you didn't, it used the default depth. From shptree
documentation --

shptree

Purpose: Creates a quadtree-based spatial index for a shapefile.   The
default tree depth is calculated so that each tree node (quadtree
cell) contains 8 shapes. Do not use the default with point files, a
value between 6 and 10 seems to work ok.  Your millage may vary and
you'll need to do some experimenting.
Syntax: shptree [shpfile] {depth} 


Do some experimentation with different depths. Hope this helps.


_______________________________________________
Mapserver-users mailing list
Mapserver-users at lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users

_______________________________________________
Mapserver-users mailing list
Mapserver-users at lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users




More information about the MapServer-users mailing list