[Fwd: Re: [UMN_MAPSERVER-USERS] Indexed Shapefile vs. PostGIS]

Stephen Woodbridge woodbri at SWOODBRIDGE.COM
Wed Aug 24 13:45:35 PDT 2005


cc the list for archive.

-------- Original Message --------
Subject: Re: [UMN_MAPSERVER-USERS] Indexed Shapefile vs. PostGIS
Date: Wed, 24 Aug 2005 16:44:53 -0400
From: Stephen Woodbridge <woodbri at swoodbridge.com>
To: Rob McCulley <RMcCulley at COUNTY24.COM>
References: 
<1E095D48112D90428817CB417AECDB62082981 at vermilion.county24.local>

Rob,

I love PostGIS for somethings, but from what you discribe I would start
with a tileindex. You can download shp2tile from http://imaptools.com/?tab=4

build it an run it like:

mkdir tiledata
./shp2tile -q 8000 polygon.shp tiledata
find tiledata -name "*.shp" -exec shptree {} \;
find tiledata -name "*.shp" > tiledata.in
tile4ms tiledata.in tiledata-idx
shptree tiledata-idx

and modify your mapfile to use the tileindex.

-Steve

Rob McCulley wrote:
> I have a polygon layer with about a million polygons.  The maxscale
> of the layer will be such that only about two dozen of the polygons
> will be visible at any one time.  I'm trying to decide on the best
> method to store this data.  What will be more efficient?
> 
> - Have the polygon layer split into smaller shapefiles and then use
> an index file.
> 
> - Have the polygon layer in a single table in PostGIS.
> 
> I'm leaning towards the index file setup, but if any of you have
> experience with large datasets in PostGIS, will it perform as well as
> using index shapefile?  It will take a lot less work on my part if I
> can simply import the shapefile into PostGIS.
> 
> Thanks, Rob McCulley
> 



More information about the MapServer-users mailing list