[mapserver-dev] possible incomplet mapscript documentation ?
Oliver Christen
oliver.christen at camptocamp.com
Mon Apr 26 04:10:50 EDT 2010
Hello
With php mapscript and swig mapscript, I noticed the whichShapes function
returns sometime a code "2", which is not documented.
I looked at Mapserver and Mapscript source code (I dont know C so I just
followed the logical calls)
whichShapes calls for msLayerWhichShapes or return MS_FAILURE
*msLayerWhichShapes calls for msInitializeVirtualTable and LayerWhichShapes
**msInitializeVirtualTable calls for destroyVirtualTable,
createVirtualTable, and (in my case) msShapeFileLayerInitializeVirtualTable
or returns MS_FAILURE
***destroyVirtualTable returns MS_SUCCESS
***createVirtualTable calls for populateVirtualTable or returns MS_FAILURE
****populateVirtualTable return only MS_SUCCESS
***msShapeFileLayerInitializeVirtualTable return only MS_SUCCESS
**LayerWhichShapes is msShapeFileLayerWhichShapes in my case
***msShapeFileLayerWhichShapes calls for msShapefileWhichShapes or returns
MS_FAILURE
****msShapefileWhichShapes returns MS_DONE, MS_FAILURE or MS_SUCCESS
if I do :
print mapscript.MS_DONE
(with python swig mapscript)
I get 2 so here is my culprit
so,
1) it seems the documentation in incomplet, mapscript whichshapes can return
MS_SUCCESS, MS_FAILURE or MS_DONE (and not only MS_SUCCESS or MS_FAILURE )
2) what means exactly MS_DONE ?
the code is in mapshape.c in function msShapefileWhichShapes :
/* rect and shapefile DON'T overlap... */
if(msRectOverlap(&shpfile->bounds, &rect) != MS_TRUE)
return(MS_DONE);
does that means the requested rect is completly outside of the shapefile
bbox ?
anyone can confirm that ?
thanks in advance
Oliver
More information about the mapserver-dev
mailing list