I'd try and narrow down the area in the code where the issue might be.
More specifically, start working with a pair of coordinates (in the
same CRS as your raster), for which you can look up the raster value
by other means (say, use qgis or write short gdal code). Then, knowing
what the end result should be, narrow it down to where you get issues
in your code.

On Wed, Apr 28, 2010 at 8:48 AM, Tom van der Putte <t...@vdputte.nl> wrote:
> Hi,
>
> I have the following code:
>
> $oMap->prepareQuery();
> $oPoint = ms_newPointObj();
> $oPoint->setXY($x,$y);   //coords received from a AJAX call
>
> $oLayer = $oMap->GetLayerByName($szLayer); //Name received from a AJAX call
> $status = $oLayer->queryByPoint($oPoint, MS_MULTIPLE, 1);
> $status = $oLayer->open();
> $result = $oLayer->getResult(0);
> $numResults = $oLayer->getNumResults();
> $shape = $oLayer->getShape($result->shapeindex,$result->tileindex);
> echo(var2json($shape));
>
> This results in the follwing json code to be returned:
>
> {"_handle_":Resource id #45,"numlines":1,"type":0,"index":-1,
>
> "tileindex":-1,"classindex":0,"numvalues":8,"text":"",
>
> "bounds":{"_handle_":Resource id #46,"minx":607000,
>
> "miny":677000,"maxx":607000,"maxy":677000},
>
> "values":[null,null,null,null,null,null,null,null]}
>
> No matter what I try, it keeps returning empty shapes. How can this be?
>
> P.S. I'm using mapserver 5.2.1 from the ms4w package.
>
> Cheers,
>
> Tom
>
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>
_______________________________________________
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to