[Mapserver-dev] Re: [Mapserver-users] Mapscript drawQuery() on big PostGIS layers doesn't work properly ?

David Blasby dblasby at refractions.net
Wed Oct 15 15:23:39 EDT 2003


Paul Ramsey wrote:
>> msLayerWhichShapes() is called to initialize the query.  In the case 
>> of shapefiles this means retrieving the list of shapeIds, but in the 
>> case of PostGIS it could be just performing the query to the DB.  I 
>> believe that's what msPOSTGISLayerWhichShapes() does today.
>>
>> Then msLayerNextShape() is called until there are no more shapes to 
>> read.  The postgis implementation of this could simply scroll through 
>> the resultset that was created in msLayerWhichShapes().

It could be possible to have msLayerWhichShapes()  (a query-by-rectangle 
with filter) cache the results so that msLayerGetShape( <record number> 
) works quickly.

I think that mapserv doesnt call msPOSTGISWhichItems() (or sets the 
items list) until *after* the  query-by-rectange, so I dont know what 
columns to grab from the DB.

I dont know why there's a separate query mechanism is mapserv - why 
doesnt it just call msLayerWhichShapes() then msLayerNextShape() like 
the normal drawing routines?  It seems there's twice as much code to 
maintain than necessary.

dave








More information about the mapserver-dev mailing list