[mapserver-dev] possible incomplet mapscript documentation ?

Alan Boudreault aboudreault at mapgears.com
Mon Apr 26 09:19:37 EDT 2010


Hi Olivier,

IIRC, MS_DONE simply means that the layer do not apply to the current query 
executed. ie. A queryByRect when the rect does not overlap the bounds of the 
layer. Also, if the layer is set to ignore missing data, it may returns 
MS_DONE.

Alan

On April 26, 2010 04:10:50 am Oliver Christen wrote:
> 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
> 
> _______________________________________________
> mapserver-dev mailing list
> mapserver-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-dev
> 

-- 
Alan Boudreault
Mapgears
http://www.mapgears.com


More information about the mapserver-dev mailing list