[postgis-users] postgis and mapserver - queries

David Blasby dblasby at refractions.net
Mon Jun 9 10:24:32 PDT 2003


C F wrote:
> What does mappostgis.c do (I don't see it in my PostGIS source)?  I'm 
> curious, because I'm doing some similar operations using the EXPLAIN 
> VERBOSE method.  Without writing a full blown SQL parser, I don't see a 
> better way.  It seems like the best way would be to hook into the 
> actualy SQL parser being used by Postgres... but maybe that's too 
> difficult and that could change as well.

mappostgis.c is part of Mapserver.  Part of its functionality is to 
'query' for a layer.  Functionally it looks like this:

a. ask the layer for its columns
b. ask the layer to give you a feature with a specific id

It was orginally designed for Shapefiles, so this order makes sense (the 
columns are known apriori).  Unfortunately, for DB connections, this is 
backwards!

dave




More information about the postgis-users mailing list