[Mapserver-users] question re Perl queryByShape

Puneet Kishor pkishor at geoanalytics.com
Mon Sep 22 17:01:09 EDT 2003


Hi Lowell,

Thanks for your response. I got this one (Eric Bridger pointed me in the
same right direction as you). Of course, now I have a different but
related problem. I dunno if you saw my last message in this thread, but
queryByShape seems to be returning a wrong, much larger set than
queryByRect where the rect is the rect of the above mentioned shape.

Any ideas.



> -----Original Message-----
> From: Lowell Filak [mailto:lfilak at medinaco.org] 
> Sent: Monday, September 22, 2003 1:07 PM
> To: Puneet Kishor; Mapserver
> Subject: Re: [Mapserver-users] question re Perl queryByShape
> 
> 
> Please see below.
> 
> The following message was sent by Puneet Kishor
> <pkishor at geoanalytics.com> on Mon, 22 Sep 2003 08:59:52 -0500.
> 
> > as I understand, here's the logic for querying by shape --
> > 
> > 1. create a shape to query with (queryShpObj)
> > 
> > 	my $queryShpObj = new blah blah;
> > 
> > 2. call queryByShape on the map object (mapObj) using the 
> above shape
> > 
> > 	$mapObj->queryByShape($queryShpObj);
> > 
> > Now, herein lies my question -- how does mapobject know 
> which layer to 
> > query against? The intuitive model that I have learned (the 
> Pavlovian 
> > Arcview way) is that you have first choose a layer before 
> you can query 
> > against it. Even if we extend that model, we can make it plural... 
> > choose the layer or layers against which to query. So the 
> syntax should 
> > be somewhat like
> > 	my $queryLayerObj = new blah blah (proabably with a 
> getLayerByName);
> > 	$mapObj->queryByShape($queryShpObj, $queryLayerObj);
> 
> Isn't that what $layer->queryByShape is for?
> Lowell
> 
> > 
> > Once that is done then one could(should) work with the 
> $resultCacheObj
> > 
> > 	my $resultCacheObj = $queryLayerObj->{resultcache};
> > 
> > Not specifying the queryLayer(s) in step 2 above -- doesn't 
> that make 
> > things slower?
> > 
> > _______________________________________________
> > Mapserver-users mailing list
> > Mapserver-users at lists.gis.umn.edu
> > http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
> 
> 




More information about the mapserver-users mailing list