SWIG Mapscript

Umberto Nicoletti unicoletti at PROMETEO.IT
Thu Sep 30 12:28:45 EDT 2004


You are right, in my case I have a ridiculous amount of data and I could
not wait for save/loadQuery so that is a workaround for me.

In the future I might switch to load/saveQuery.

Regards,
Umberto

On Thu, 2004-09-30 at 18:03, Ryan, Adam wrote:
> > -----Original Message-----
> > From: Umberto Nicoletti [mailto:unicoletti at PROMETEO.IT]
> > Sent: Thursday, September 30, 2004 12:08 AM
> > To: MAPSERVER-USERS at LISTS.UMN.EDU
> > Subject: Re: [UMN_MAPSERVER-USERS] SWIG Mapscript
> >
> >
> > Hi Adam,
> > some time time ago I also wanted to use save/loadQuery from
> > Java mapscript. My workaround is to save query parameters in
> > the user's session and run the query every time until it is
> > cleared on explicit user request or another query is run.
> > This keeps the result consistent even if the user changes
> > layers display properties (hides/shows a layer).
> >
> > I did not notice any significant slowdown.
> >
> > HTH,
> > Umberto
> >
> > On Wed, 2004-09-29 at 22:37, Ryan, Adam wrote:
> > > > -----Original Message-----
> > > > From: Sean Gillies [mailto:sgillies at FRII.COM]
> > > > Sent: Wednesday, September 29, 2004 12:19 PM
> > > > To: MAPSERVER-USERS at LISTS.UMN.EDU
> > > > Subject: Re: [UMN_MAPSERVER-USERS] SWIG Mapscript
> > > >
> > > >
> > > > On Sep 29, 2004, at 1:16 PM, Sean Gillies wrote:
> > > >
> > > > > On Sep 29, 2004, at 12:54 PM, Ryan, Adam wrote:
> > > > >
> > > > >> Mapservers,
> > > > >>
> > > > >> Two methods I use in php mapscript don't seem to be in
> > the SWIG
> > > > >> version.
> > > > >>
> > > > >> Layer->queryByIndex - this is non-critical since I can use
> > > > >> queryByAttribute
> > > > >> with an FID
> > > > >>
> > > > >> Map->loadQuery - this is critical.  There is a saveQuery
> > > > method, but
> > > > >> no
> > > > >> loadQuery?
> > > > >>
> > > > >> Thanks for any insight.
> > > > >>
> > > > >> Adam
> > > > >>
> > > > >
> > > > > Adam,
> > > > >
> > > > > Since I've used the PHP mapscript, I'm not sure what
> > loadQuery and
> > > > > saveQuery are for.  Explain?
> > > > >
> > > > > Sean
> > > > >
> > > >
> > > > Sorry, meant to say that I've *never* used the PHP mapscript and
> > > > don't understand the use for saving and loading queries.
> > > >
> > > > Sean
> > > >
> > >
> > > Hey, thanks for the reply.
> > >
> > > Am I the only one using saveQuery?  I think saveQuery and loadQuery
> > > are terrific methods.  They generate/read small files of
> > shape index
> > > values - similar, to a bitmap in Avenue I think.  By
> > loading a saved
> > > query, I can return a layer to a previous query 'state',
> > for lack of a
> > > better word (resultCacheObj state?).  This is extremely useful.
> > >
> > > Building shapefiles does not allow for dynamic queries
> > using AND, OR,
> > > or XOR with previous queries, and it's too slow.  The layer index
> > > problem is easily handled by changing the layer index value in the
> > > saved query file itself prior to loading.  As long as only
> > one layer
> > > is queried at a time, this works well.
> > >
> > > I'm trying to re-write an application using Python and without this
> > > functionality it's a no go.  I can't even emulate a
> > saveQuery because
> > > there is no queryByIndex method, and even if there was, stepping
> > > through a list of indexes and calling queryByIndex is MUCH
> > slower than
> > > the loadQuery method.
> > >
> > > I'm at a loss.
> > >
> > > Adam
> >
>
> Umberto,
>
> I thought about this too but running a query every time is too slow.  And,
> the only way to do succesive refining queries is to run multiple queries in
> every session, and that's WAY to slow.
>
> Adam
>
>



More information about the mapserver-users mailing list