Opened 15 years ago
Closed 13 years ago
#2967 closed defect (fixed)
PHP mascript ResultCacheMemberObj Class is missing bounds and numresluts
Reported by: | assefa | Owned by: | jmckenna |
---|---|---|---|
Priority: | normal | Milestone: | 6.0 release |
Component: | Documentation - MapServer | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: | aboudreault, worthlutz, sdlime, dmorissette, havatv |
Description
ResultCacheMemberObj Class is missing bounds and numresults like the swig version
Change History (23)
comment:1 by , 15 years ago
Component: | MapServer C Library → MapScript-PHP |
---|---|
Owner: | changed from | to
comment:2 by , 15 years ago
comment:3 by , 15 years ago
there is also a getNumResults method on the layer (both in swig and php). I think It would be better to build a resultCacheObj and expose both numresults and bounds so that the if other members are added to the structure, It would be easy to support them in php/mapscript
comment:4 by , 15 years ago
Keep in mind this area of the code will be undergoing some change as part of the one-pass filtering. Not sure how/if the interface will change but it might.
Perhaps this fix should be target at 5.4.1 as well?
Steve
comment:5 by , 15 years ago
Milestone: | 6.0 release → 5.4.1 release |
---|
Good point. changing the target to 5.4.1.
comment:6 by , 15 years ago
Added the getResults method on the layer. Returns a resultcacheobj which has numresults and bounds as member of the object. committed in 5.4.x branch (r9099) Need to update docs
comment:7 by , 15 years ago
Milestone: | 5.6 release → 6.0 release |
---|
I believe this is still relevant for the 5.6/6.0 release.
comment:9 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
please reopen if this is still an issue.
comment:10 by , 13 years ago
Cc: | added |
---|---|
Resolution: | fixed |
Status: | closed → reopened |
This is still an issue for 6.0. This capability was lost in 5.6 and I cannot find it in 6.0.
I am having to loop through the results to get the bounds of the result set to adjust the map extents to the area relavant to the query.
I was starting to move my application to 6.0 yesterday and decided to look for this in 6.0 and cannot find the method to get the bounds.
I am assuming that it would be best to calculate these bounds on the query pass and not have to loop through the results again. Sometimes I only need to loop through the 1st N results and not the whole set (except that I need the bounds for the whole set).
comment:11 by , 13 years ago
Cc: | added |
---|
worthlutz, Is this available in other mapscript bindings? Steve, is this already computed in query pass? Is this something that could be added in a RC release?
comment:13 by , 13 years ago
The resultCacheObj still contains a "bounds" rectObj and it's still being populated as part of query processing (see addResult() in mapquery.c).
For Swig-based languages the numresult and bounds members are accessible (but immutable).
Steve
comment:14 by , 13 years ago
Owner: | changed from | to
---|---|
Status: | reopened → new |
So, I should create a resultCacheObj PHP object then.
comment:15 by , 13 years ago
Cc: | added |
---|
comment:16 by , 13 years ago
I'm not going to add a new object since the numresults is already exposed via layer->getNumResults(). I'm going to add a method getResultsBounds() in the layer object.
comment:17 by , 13 years ago
Should probably have the same method in Swig-land then (layer.i)...
Steve
comment:18 by , 13 years ago
Component: | MapScript-PHP → MapServer Documentation |
---|---|
Owner: | changed from | to
Fixed and committed in r11643. worthlutz, could you test it and confirm it does the job? Steve, SWIG already have the resultCacheObj exposed... Do you want I remove it and create a similar method in the layer.i ? or we let things as they are?
comment:19 by , 13 years ago
I mis-spoke. Looks like the resultcache object is hidden from Swig so we'll need the same method added to layer.i.
Steve
comment:23 by , 13 years ago
Cc: | added |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Attemted a fix for 6.0 and trunk documentation in r12036. Only added getresultsbounds (php and swig - very brief description). Please reopen with more instructions if more work is needed.
In fact the swig versions have 2 functions: