Problem with queryByShape
Dirk Jesko
ml.dje at GEOCONTENT.DE
Fri Jul 22 07:27:36 PDT 2005
Hi,
I use the following code to query a layer in PHPMapscript:
$shape->project($layerSRS, $mapSRS);
$found = $layer->queryByShape($shape);
This only works with PHPMapScript 4.4 and Shape-layers. If I use 4.4
with PostGIS-layers PHP crashes with an error in the mapscript module
when executing queryByShape. Using version 4.6 the PHP process just runs
for ever in both cases (Shape and PostGIS), i.e. the
$layer->queryByShape($shape) does not return, but there is no crash and
no error message.
On the other hand, queryByRect works fine in all cases, i.e. there is no
problem with
$r = $shape->bounds;
$r->project($layerSRS, $mapSRS);
$found = $layer->queryByRect($r);
except that it returns more results than desired.
I found an older bug-report and some discussions on the list about
queryByShape issues, but non really helped to solve the problem.
Is this there still a know problem with that function and is there a
possible solution?
My configuration:
Windows XP Pro
Apache 2.0.54
PHP 4.4.0 (CGI) - same with 4.3.11
Mapserver/Mapscript 4.4.2/4.6.0 (binary from maptools.org)
Thanks for any help,
Dirk
More information about the MapServer-users
mailing list