shptree not faster than no index

Ed McNierney ed at TOPOZONE.COM
Thu Sep 23 20:33:06 PDT 2004


John -

The only piece of advice I can find to add to the excellent advice you've received is a reminder of the value of indexes.  An index helps you quickly locate the small subset of a larger dataset that is required for rendering a specific map request.  It does not speed up drawing; it simply helps you more quickly discard those objects that don't need to be drawn at all.

If your test case is a map of the entire United States, you need to draw all the counties and therefore there is no benefit in quickly calculating which ones you need to draw - they are all drawn.  If you zoom in on a very small area, you will be able to very quickly identify the two or three county polygons - the only two or three polygons that can possibly intersect the map rectangle you're drawing.

        - Ed

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

-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Frank Warmerdam
Sent: Thursday, September 23, 2004 7:54 PM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: Re: [UMN_MAPSERVER-USERS] shptree not faster than no index

John Bolster wrote:
> Thank you for your quick response.
>
> In terms of the county outlines, do you think that one county per
> file, and selecting which files to use with only a tileindex would be
> faster than all counties being in one huge file of over 3000 counties
> and selecting which counties to draw using a qix index?

John,

I think having them in one file would be more efficient.  3000 features isn't a particularly large dataset, though I suppose if the county outlines are very detailed it might get fairly large.

> Also, does the qix index on the actual tileindex do anything to speed
> up the tileindex?

Yes, a .qix file on a tileindex will help if there are many entries in the tileindex.

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    | Geospatial Programmer for Rent



More information about the MapServer-users mailing list