[Qgis-developer] Query Set using SetSubstring does not return record - resolved but with a question

maaza mekuria sailmcm at yahoo.com
Wed Jun 8 21:10:31 EDT 2011


I have learned from you how I can select all the features in a layer through code using extents and attribute lists. What I would like is to be able to use a simple command that says layer->selectall() or something like that. I think selection is very important method in GIS. 

I  think of Quantum GIS, which is in a league on its own as with Quantum Mechanics where one desperately tries to measure properties applying the Heisenberg Principle. 

We are in need of a way to select and measure the particles in as many ways as we can. 

What do you think?

Maaza


--- On Wed, 6/8/11, maaza mekuria <sailmcm at yahoo.com> wrote:

> From: maaza mekuria <sailmcm at yahoo.com>
> Subject: Re: [Qgis-developer] Query Set using SetSubstring does not return record - resolved but with a question
> To: "QGIS Developer" <qgis-developer at lists.osgeo.org>
> Date: Wednesday, June 8, 2011, 7:49 PM
> Let me lay bare my hearts desire, is
> it alright to have a method that updates the selection set
> using the setSubString query? What is the reason that such a
> powerful way to query the data does not also have a means to
> update the selection set?
> 
> I know I am pushing my luck or my providence. But God is
> generous to the rich as well as to the poor and I am told to
> ask always and I am sure there will be answer soon. Or am I
> talking only to myself here?
> 
> Maaza
> 
> --- On Wed, 6/8/11, maaza mekuria <sailmcm at yahoo.com>
> wrote:
> 
> > From: maaza mekuria <sailmcm at yahoo.com>
> > Subject: Re: [Qgis-developer] Query Set using
> SetSubstring does not return record
> > To: "QGIS Developer" <qgis-developer at lists.osgeo.org>
> > Date: Wednesday, June 8, 2011, 5:43 PM
> > I figured it out. I was assuming that
> > the setSubsetString would do the querying and update
> the
> > selection set, but I gather now after a few hours of
> > hardwork that is not its purpose, it just limits the
> > accessible features with out changing the selection
> set. 
> > 
> > How can I help update the documentation to reflect
> what the
> > methods are meant to do?
> > 
> > Thank you,
> > 
> > Maaza  
> > 
> > --- On Wed, 6/8/11, maaza mekuria <sailmcm at yahoo.com>
> > wrote:
> > 
> > > From: maaza mekuria <sailmcm at yahoo.com>
> > > Subject: [Qgis-developer] Query Set using
> SetSubstring
> > does not return record
> > > To: "QGIS Developer" <qgis-developer at lists.osgeo.org>
> > > Date: Wednesday, June 8, 2011, 2:25 PM
> > >        
> > > 
> > >             
> > > I have a subsetstring query applied in code to
> the
> > layer
> > > data. Yet I find that it does not return any
> records
> > that it
> > > should have
> > >  located.
> > > 
> > > 
> > > The code is pasted below, the setSubsetString
> passes
> > and
> > > yet the selected feature count is 0. What am I
> > missing
> > > here?
> > > 
> > >                //Query the edge table
> edge
> > field
> > > to find the two vertices 
> > >                strQryEdge = "EDGEID="
> +
> > > fld0.toString() + ""; 
> > >                if
> > > (inEdgeVectorProvider->supportsSubsetString())
> 
> > >                {
> > >                 
> > >
> >
>  blnQryCur=inEdgeVectorLayer->setSubsetString(strQryEdge);
> > >                   if (blnQryCur) 
> > >                   {
> > >  
> > >                      lstEdgeFeats
> =
> > > inEdgeVectorLayer->selectedFeatures();
> > >                      txtStream
> <<
> > "
> > > Recount -
> "<<lstEdgeFeats.count()<<endl;
> > >                   } // if network
> source
> > query
> > > returns edge result
> > >                } // if edge provider
> > supports
> > > query subst
> > > 
> > > 
> > > Thank you,
> > > 
> > > Maaza
> > > 
> > > _______________________________________________
> > > Qgis-developer mailing list
> > > Qgis-developer at lists.osgeo.org
> > > http://lists.osgeo.org/mailman/listinfo/qgis-developer
> > >
> > _______________________________________________
> > Qgis-developer mailing list
> > Qgis-developer at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/qgis-developer
> >
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
> 


More information about the Qgis-developer mailing list