[Mapserver-users] question re Perl queryByShape

Puneet Kishor pkishor at geoanalytics.com
Mon Sep 22 11:20:20 EDT 2003


ahhh.... now I know. And now it is also visible in the docs! go figure!

Thanks Eric.

;-)

On Monday, September 22, 2003, at 06:03  AM, Eric Bridger wrote:

> The functionality you want already exists.
>
> Both the map and layer objects have queryByShape() methods.  So
> $mapObj->queryByShape() will query all layers which are ON.
> $layerObj->queryByShape() queries only that layer.
>
>
>
> On Mon, 2003-09-22 at 13:59, Puneet Kishor wrote:
>> 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);
>>
>> 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