[mapserver-dev] PHP Mapscript - Differences between
whichShapeand queryByShape
Steve Lime
Steve.Lime at dnr.state.mn.us
Mon Mar 2 09:38:31 EST 2009
Can you post the dataset, mapfile and test script please? The function
whichShapes is
used internally in msQueryByShape() (and all the other query/drawing
routines) so something
isn't right in your test scenario.
Steve
>>> Nicol Hermann <mapserver at geoworld.de> 03/01/09 10:55 AM >>>
Hi Guillaume,
i attached a short sample script which executes both methods on the same
dataset.
The polygon is constructed from the coordinates of the rectangle.
Given this, i would expect the same number of query results from both
methods.
But this is not the case:
whichShapes returns 2673 records while queryByShape returns 2695
records.
Can someone explain which this is the case?
Best regards
Nicol
Am Samstag, den 28.02.2009, 20:48 +0100 schrieb Guillaume Sueur:
> Hi Nicol,
>
> In the first case, whichShapes uses a rectObj, where the queryByShape
> will use any kind of polygon. But I would be interested in knowing the
> difference between whichShapes and queryByRect ! Does whichShapes
> compute the intersection of bounding boxes instead of shapes
themselves ?
>
> Regards,
>
> Guillaume
>
>
> Nicol Hermann a écrit :
> > Hello Devs,
> >
> > i have a question concerning the function of the method
> > $layer->whichShapes($Map->extent);
> > of PHP mapscript.
> > As far as i understand the documentation
> > (http://mapserver.org/mapscript/php/) the method returns all shapes
> > within a given area (in this case $Map->extent).
> > I wonder what are the differences to the method
> > $layer->queryByShape( $shpobj );
> > $shpobj is defined as 'MS_SHAPE_POLYGON' and is constructed with the
> > same values like $Map->extent
> > To my understanding both methods should return the same number of
query
> > results.
> > Is this assumption correct?
> > Many thanks for your assistance.
> >
> > best regards
> > Nicol
> >
> > _______________________________________________
> > mapserver-dev mailing list
> > mapserver-dev at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/mapserver-dev
> >
> >
More information about the mapserver-dev
mailing list