[mapserver-users] couldn't get value from raster map

orkun temiz at deprem.gov.tr
Mon Sep 28 02:35:32 EDT 2009


Thank you

So, How can I retrieve the other values ?

especially class values such as 'NAME "0-5"' in map file

regards


On Sun, 2009-09-27 at 17:24 -0400, Frank Warmerdam wrote:
> > 2009/9/27 Ahmet Temiz <temiz at deprem.gov.tr <mailto:temiz at deprem.gov.tr>>
> > 
> >     hello
> > 
> >     I am using java mapscript and trying to get values from raster layer.
> > 
> >     But I can only get x,y values but not other values especially color
> >     values of
> >     the pixel I had clicked.
> > 
> >     here is the my code's fragment :
> > 
> >     int q = slplayer.queryByPoint(map0, qpt, mapscript.MS_MULTIPLE, 10.0 );
> >     int numResults = slplayer.getNumResults();
> > 
> >     if (numResults != 0) {
> >            for (int j = 0; j < numResults; j++) {
> >                    resultCacheMemberObj resultMember =
> ...
> >                    System.out.println(" *** shape.getValue
> >     "+shape.getValue(j));  -----> only
> >     gives x,y values bot not RGB values
> 
> Ahmet,
> 
> As I read this code, you are looking for field "j" of the shape, but
> j is actually the index into the resultset, not anything to do with fields.
> 
> Best regards,
> -- 
> ---------------------------------------+--------------------------------------
> I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
> light and sound - activate the windows | http://pobox.com/~warmerdam
> and watch the world go round - Rush    | Geospatial Programmer for Rent
> 
> 
-- 
Ahmet Temiz
Jeo. Müh.
Afet İşleri Gen. Md.lüğü
Deprem Ar. D.

Ahmet Temiz
Geo. Eng.
General Dir. of 
Disaster Affairs
TURKEY


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



More information about the mapserver-users mailing list