[postgis-users] Performance compared to large shapefiles?

Jeff Dege jdege at korterra.com
Wed Apr 25 09:21:03 PDT 2007


> -----Original Message-----
> From: postgis-users-bounces at postgis.refractions.net 
> [mailto:postgis-users-bounces at postgis.refractions.net] On 
> Behalf Of Kralidis,Tom [Burlington]
> Sent: Wednesday, April 25, 2007 10:59 AM
> To: PostGIS Users Discussion
> Subject: RE: [postgis-users] Performance compared to large shapefiles?
> > 
> > PostGIS is a great tool, just for completeness: Have you 
> > tested indexes on the shape files?
> > http://mapserver.gis.umn.edu/docs/reference/utilityreference/shptree
> 
> You could also check out shp2tile 
> (http://swoodbridge.com/tools/).  One
> option is to run shp2tile on your data, then shptree on the output
> shapefiles, and then use tile4ms to create a tileindex.
> 
> ..Tom

We've done both.  We run shptree always.  We use shp2tile when
performance still isn't adequate after indexing.

There are two problems.  First the process takes forever, and second,
the result is tightly tied to a specific representation, which makes
things inflexible and harder to adapt to changes in requirements.

Some of it, of course, is inherent in the data, and needs to be
addressed at the data level.  I was originally directed towards PostGIS
after asking about polygon simplification tools.  We don't need to store
a shape with points drawn every ten meters apart when a pixel on the map
represents 300 meters on the ground.  Creating a simplified
approximation of the polygon can drastically reduce the data
requirements.

And PostGIS provides a function that can do that.

But another possibility is splitting features.  If you're working on a
layer of street data on a state-wide map, and your roads are all drawn
as single features running from one edge of the state to the other, your
spatial indexes aren't going to help as much as they could, if the
streets were instead drawn as a series of connected features, each of
limited length.

Does PostGIS provide a function that will take a long linear feature and
break it into a series of shorter linear features, while preserving the
attribute data?




More information about the postgis-users mailing list