[Mapserver-users] mapserver 4.0 : queryByRect problem
fx gamoy
fx.gamoy at mapxplore.com
Mon Sep 29 08:04:48 PDT 2003
C'est un message de format MIME en plusieurs parties.
------=_NextPart_000_0043_01C386A3.6892D3B0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
hello,
i ve got a problem with the querybyrect method with mapserv4.0
for ($i=3D0;$i<$nblayer;$i++)
{
$oLayer =3D $oMap->getLayer( $i );
if (@$oLayer->queryByRect($oRect) =3D=3D MS_SUCCESS)
{
$oLayer->open();
$szResults=3D$oLayer->getNumResults();
if ( $szResults > 0) //i find 14 shapes
{
for ($j=3D0;$j<$szResults;$j++)
{
$oResults=3D$oLayer->getResult($j);
=
$oShape=3D$oLayer->getShape($oResults->tileindex,$oResults->shapeindex);
$oShape->free();
}
}// if ( $szResults >0
$oLayer->close();
} //if (@$oLayer->quer=20
}// for
i find 14 shapes but the getshape method crash
PHP Fatal error: [MapServer Error]: msOGRLayerNextShape(): Assertion =
failed: OGR layer not opened!!!
Any idea?
thanks=20
fx
------=_NextPart_000_0043_01C386A3.6892D3B0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 5.50.4134.600" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>hello,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>i ve got a problem with the querybyrect =
method with=20
mapserv4.0</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>for =
($i=3D0;$i<$nblayer;$i++)<BR>{</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>$oLayer =3D $oMap->getLayer( $i =
);</FONT></DIV>
<DIV><FONT face=3DArial=20
size=3D2> if=20
(@$oLayer->queryByRect($oRect) =3D=3D=20
MS_SUCCESS)<BR> {</FONT></DIV>
<DIV><FONT face=3DArial=20
size=3D2>$oLayer->open();<BR><BR> $szResu=
lts=3D$oLayer->getNumResults();<BR> if=20
( $szResults > 0) //i find 14=20
shapes<BR> {<BR> &nbs=
p; for=20
($j=3D0;$j<$szResults;$j++)<BR> &nb=
sp; =20
{<BR> =20
$oResults=3D$oLayer->getResult($j);<BR> &=
nbsp; =20
$oShape=3D$oLayer->getShape($oResults->tileindex,$oResults->shap=
eindex);</FONT></DIV>
<DIV><FONT face=3DArial=20
size=3D2> =20
$oShape->free();<BR> &n=
bsp;=20
}<BR> }// if ( $szResults=20
>0<BR> $oLayer->close();<BR> &nbs=
p; }=20
//if (@$oLayer->quer </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>}// for</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>i find 14 shapes but the getshape =
method=20
crash</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>PHP Fatal error: [MapServer =
Error]:=20
msOGRLayerNextShape(): Assertion failed: OGR layer not opened!!!<BR>Any=20
idea?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>thanks </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>fx</FONT></DIV></BODY></HTML>
------=_NextPart_000_0043_01C386A3.6892D3B0--
More information about the MapServer-users
mailing list