[postgis-users] MapServer with PostGIS: motivations

Frank Warmerdam warmerdam at pobox.com
Mon Aug 28 11:27:10 PDT 2006


Bruno Patini Furtado wrote:
> Hi,
> 
> I'd like to know what could motivate the usage of PostGIS behind 
> MapServer as a source of Vector Data instead of regular Shapefiles? 
> Could it be performance?
> I realize that updating raster data is easier on a spatial database than 
> on a shapefile.
> 
> Do we get a different set of features from MapServer if we use PostGIS 
> in the backend?

Bruno,

My understanding is that there are 4 main reasons folks use PostGIS with
MapServer instead of Shapefiles.

  * MapServer does not support attribute column indices on shapefiles so
    intensive filtering on attributes can be pretty slow with shapefiles
    compared to Postgres.
  * With PostGIS you can do some pretty esoteric on the fly processing
    by embedding complex SQL queries and operators in the layer DATA
    statement.  Shapefiles lack much of this.
  * PostGIS datasets are much more updatable than shapefiles, especially in a
    multi-user web environment.
  * PostGIS/Postgres may be used for it's other processing/management benefits
    outside mapserver, so it is better to use from MapServer.

That said, for simple raw feature rendering shapefiles are believed to be
somewhat higher performance than PostGIS.

I'd add I'm not a power user of PostGIS+MapServer so I may be missing some
reasons.

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    | President OSGeo, http://osgeo.org




More information about the postgis-users mailing list