[Mapserver-users] optimizing shapefiles with the mapserver utilities?

Eric Davies eric at barrodale.com
Tue Feb 11 13:17:02 PST 2003


--=====================_1884222390==.ALT
Content-Type: text/plain; charset="us-ascii"; format=flowed


I've got some fairly large shapefiles (> 100M) which I'm asking mapserver 
to display.
I'd like to improve the speed at which it processes these large files.
I've already done the level-of-detail stuff (setting the minimum and 
maximum scales at
which a layer is displayed), and I've built up the quadtree index with 
shptree. However,
the latter didn't make much change to the speed.

My suspicion is that my shapefiles are relatively unordered, so that 
elements for any particular small region are likely scattered across the 
entire shapefile. What I'd like to do is order the shapefile so that 
geometries that are geographically close together are more likely to be 
close together in the shapefile.

The functionality to do perform this ordering is already present in the 
utilities: shptree maps geometry locations to a linear key (the tile 
number), and sortshp can reorder a shapefile based on a key. However, I 
don't see any way to make the two talk to each other.

It shouldn't be too difficult for me modify sortshp to read in the shptree 
produced index file, but before  I do, I should ask if there is a way to do 
this type of thing out of the box, without writing more code.

Thank you.
Eric.

**********************************************

Eric Davies, M.Sc.
Barrodale Computing Services Ltd.
Tel: (250) 472-4372 Fax: (250) 472-4373
Web: http://www.barrodale.com
Email: eric at barrodale.com
**********************************************
Mailing Address:
P.O. Box 3075 STN CSC
Victoria BC Canada V8W 3W2

Shipping Address:
Hut R, McKenzie Avenue
University of Victoria
Victoria BC Canada V8W 3W2
**********************************************



--=====================_1884222390==.ALT
Content-Type: text/html; charset="us-ascii"

<html>
<body>
<br>
I've got some fairly large shapefiles (> 100M) which I'm asking
mapserver to display.<br>
I'd like to improve the speed at which it processes these large
files.<br>
I've already done the level-of-detail stuff (setting the minimum and
maximum scales at<br>
which a layer is displayed), and I've built up the quadtree index with
shptree. However,<br>
the latter didn't make much change to the speed. <br><br>
My suspicion is that my shapefiles are relatively unordered, so that
elements for any particular small region are likely scattered across the
entire shapefile. What I'd like to do is order the shapefile so that
geometries that are geographically close together are more likely to be
close together in the shapefile.<br><br>
The functionality to do perform this ordering is already present in the
utilities: shptree maps geometry locations to a linear key (the tile
number), and sortshp can reorder a shapefile based on a key. However, I
don't see any way to make the two talk to each other. <br><br>
It shouldn't be too difficult for me modify sortshp to read in the
shptree produced index file, but before  I do, I should ask if there
is a way to do this type of thing out of the box, without writing more
code. <br><br>
Thank you.<br>
Eric.<br><br>
********************************************** <br>
<x-sigsep><p></x-sigsep>
Eric Davies, M.Sc. <br>
Barrodale Computing Services Ltd. <br>
Tel: (250) 472-4372 Fax: (250) 472-4373 <br>
Web:
<a href="http://www.barrodale.com/" eudora="autourl"><font color="#0000FF"><u>http://www.barrodale.com</a></u></font>
<br>
Email: eric at barrodale.com <br>
********************************************** <br>
Mailing Address: <br>
P.O. Box 3075 STN CSC <br>
Victoria BC Canada V8W 3W2<br><br>
Shipping Address: <br>
Hut R, McKenzie Avenue <br>
University of Victoria <br>
Victoria BC Canada V8W 3W2 <br>
**********************************************<br><br>
<br>
</body>
</html>

--=====================_1884222390==.ALT--




More information about the MapServer-users mailing list