[Mapserver-users] postgres 7.3.2.....
David Blasby
dblasby at refractions.net
Mon May 26 09:33:16 PDT 2003
Daniel Morissette wrote:
> This may be independent of the PostGIS bug after all... stay tuned on
> bug 316, it may be fixed soon in the 4.0 dev. version. This will not be
> fixed in 3.6.
>
> The root of the problem here is that getShape() doesn't like to return a
> shape with 0 attribute fields in it... it's really odd that postgis
> would return shapes with no attributes by default. Anyway, you could
> possibly work around the problem by forcing your layer definition to
> select some attribute fields, I think I've seen discussions of this in
> the archives in the past. (Don't email me directly to ask I don't know
> how to do it.)
PostGIS usually (when drawing) looks at the layer (layer->items) to
figure out what columns it should pull. If your mapfile LAYER
definition is really simple (ie. no classes, etc...) the only thing
getting pulled from the DB is the Geometry and the 'shapeid'.
During a query (and only during a query), mapserver calls
msPOSTGISLayerGetItems() and PostGIS will go to the database to find all
the possible columns that the DATA query can supply. The subsequent
query will pull a feature with the geometry, 'shapeid', plus all the
columns.
dave
More information about the MapServer-users
mailing list