[postgis-users] MapServer with PostGIS: motivations

Stephen Woodbridge woodbri at swoodbridge.com
Mon Aug 28 12:25:03 PDT 2006


Bruno,

I think Frank did a pretty good job covering this. I would add that it 
is not possible to do any complex thematic mapping using shapefiles. 
That said there is some basic support for this in gdal, but but PostGIS 
will perform much better.

I think the key to performance is to use a hybrid approach, where you 
keep the data you need to be fast and don't need to perform fancy 
processing on in shapefiles and keep the other data in PostGIS.

If you have a mapfile working in shapefiles and just move it to PostGIS 
it will definitely be slower, may be a lot!

-Steve

Frank Warmerdam wrote:
> 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,




More information about the postgis-users mailing list