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 assefa, 15 years ago

Component: MapServer C LibraryMapScript-PHP
Owner: changed from sdlime to assefa

comment:2 by assefa, 15 years ago

In fact the swig versions have 2 functions:

getResult : which returns a ResultCacheMemberObj getResults: which return a resultCacheObj

comment:3 by assefa, 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 sdlime, 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 assefa, 15 years ago

Milestone: 6.0 release5.4.1 release

Good point. changing the target to 5.4.1.

comment:6 by assefa, 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 assefa, 15 years ago

Milestone: 5.6 release6.0 release

I believe this is still relevant for the 5.6/6.0 release.

comment:8 by assefa, 13 years ago

Cc: aboudreault added

Alan, is this still an issue?

comment:9 by assefa, 13 years ago

Resolution: fixed
Status: newclosed

please reopen if this is still an issue.

comment:10 by worthlutz, 13 years ago

Cc: worthlutz added
Resolution: fixed
Status: closedreopened

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 aboudreault, 13 years ago

Cc: sdlime 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:12 by worthlutz, 13 years ago

I only use PHP mapscript and do not know about the others.

comment:13 by sdlime, 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 aboudreault, 13 years ago

Owner: changed from assefa to aboudreault
Status: reopenednew

So, I should create a resultCacheObj PHP object then.

comment:15 by dmorissette, 13 years ago

Cc: dmorissette added

comment:16 by aboudreault, 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 sdlime, 13 years ago

Should probably have the same method in Swig-land then (layer.i)...

Steve

comment:18 by aboudreault, 13 years ago

Component: MapScript-PHPMapServer Documentation
Owner: changed from aboudreault to jmckenna

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 sdlime, 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:20 by aboudreault, 13 years ago

Added swig method in r11645. Steve, could you test it in perl?

comment:21 by sdlime, 13 years ago

Seems to work just dandy... Steve

comment:22 by worthlutz, 13 years ago

Works with PHP mapscript. Removes a loop from my code. Thanks!

comment:23 by havatv, 13 years ago

Cc: havatv added
Resolution: fixed
Status: newclosed

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.

Note: See TracTickets for help on using tickets.