mapserver postgis connection
Frank Warmerdam
warmerdam at POBOX.COM
Mon Oct 31 06:32:06 PST 2005
On 10/31/05, Frans Knibbe <frans at geodan.nl> wrote:
> For large datasets, you need a spatial index. I
> understand that the native shapefile driver (which is the recommended
> way to access shapefiles according to the MapServer Reference Guide for
> Vector Data Access
> (http://www.maptools.org/dl/docs/mapserv/MsVectorDataGuide.pdf)) does
> not support ESRI's spatial index for shapefiles. OGR, on the other hand,
> can use a spatial index (see
> http://www.gdal.org/ogr/drv_shapefile.html).
Frans,
As SteveW mentions, MapServer's native shapefile support
has it's own spatial index (.qix files) and this is the same spatial
index format I recently implemented in OGR.
> Better still, it also
> supports an attribute index. An attribute index could be used by
> MapServer if a layer has a classification based on attribute values. I
> really don't know how MapServer reads and sorts its data, but I can
> imagine an attribute index will be beneficial for layers with
> symbolization based on attribute values. Still, if I understand
> correctly, the attribute index that OGR uses can not be used if a
> classification based on value ranges is wanted.
That is generally true. The currently very limited implementation of
attribute indexes for shapefiles in OGR is just for looking up unique
values for joins.
> So is it really true that shapefiles always outperform PostGIS data,
> even if we are talking about big datasets with classifications?
No, PostGIS can have better performance for operations that
require filtering on attribute columns.
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 | Geospatial Programmer for Rent
More information about the MapServer-users
mailing list