[Mapserver-users] Perl $map->queryByRect() under 4.0.1 seems to ignores classexpressions

Lowell Filak lfilak at medinaco.org
Fri Apr 9 12:17:38 EDT 2004


It appears that your not getting an error but that the queryByRect is
not properly executing the 'filter_passed = msEvalExpression' part of
msLayerNextShape - a guess.?
There is now a layer->debug option passed to msSHPWhichShapes that may
be helpful if debugging is on - does anything appear in the log?
Also, does your copy of mapquery.c contain a call to msLayerNextShape
within the msQueryByRect function?
Does queryByRect return MS_SUCCESS or MS_DONE?

Lowell

The following message was sent by "PATTERSON KENNETH ALLEN"
<kapatter at srpnet.com> on Thu, 8 Apr 2004 17:07:33 -0700.

> 
> We are moving our Perl applications to 4.0.1.  The result returned by
queryByRect() and getResult() are a different set of data points
compared to the (somewhat) similar app under 3.6.7.  layer->getResult()
seems to be returning every point within the extent ignoring the class
expressions.  What is the intent of queryByRect()?  Should it reflect
what will be drawn or what is available to be drawn?  Are we missing
something in the port that will dictate how queryByRect()/getResult()
work?  We have looked through the online docs and have found no
reference to a different approach when using these methods.
> 
> This is an example of what we have found:  There may be 600 points in
the shape file for the current extent but only 100 total that are drawn
given the expressions in the classes.  Unfortunately our the code
creating the layers is somewhat different in 4.0.1 compared to 3.6.7. 
The code calling queryByRect() is the same.  In 3.6.7 we only get back
100 points (just the ones that are drawn) while under 4.0.1 we get 600
(all of them).  The number of point drawn in both versions are 100. 
> 
> In this application we create dynamic layer setting the shapefile and
adding classes such that the expression subsets the data drawing
different symbols.  Not all classes are added.  So the layer looks
something like:
> 	layer
> 		type POINT
> 		name "gauges"
> 		template "dummy"
> 		...
> 		class
> 			name "joes"
> 			...
> 			symbol 'circle'
> 			expression ([db_nm] = "joes")
> 		end
> 		class
> 			name "sams"
> 			...
> 			symbol 'square'
> 			expression ([db_nm] = "sams")
> 		end
> 	end
> 
> 
> 
> 	
> Thanks,
> 	Ken
> 
> 
> _______________________________________________
> 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